From e2bbae3896a9c4c0b8635f4c24720b314163443d Mon Sep 17 00:00:00 2001 From: DrChat Date: Tue, 13 Feb 2018 12:50:33 -0600 Subject: [PATCH 01/15] [JIT] Don't bother using a temp for constant addresses < 0x80000000 --- src/xenia/cpu/backend/x64/x64_sequences.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/xenia/cpu/backend/x64/x64_sequences.cc b/src/xenia/cpu/backend/x64/x64_sequences.cc index 0bd483caf..03a609ccb 100644 --- a/src/xenia/cpu/backend/x64/x64_sequences.cc +++ b/src/xenia/cpu/backend/x64/x64_sequences.cc @@ -2139,8 +2139,13 @@ RegExp ComputeMemoryAddress(X64Emitter& e, const T& guest) { // TODO(benvanik): figure out how to do this without a temp. // Since the constant is often 0x8... if we tried to use that as a // displacement it would be sign extended and mess things up. - e.mov(e.eax, static_cast(guest.constant())); - return e.GetMembaseReg() + e.rax; + uint32_t address = static_cast(guest.constant()); + if (address < 0x80000000) { + return e.GetMembaseReg() + address; + } else { + e.mov(e.eax, address); + return e.GetMembaseReg() + e.rax; + } } else { // Clear the top 32 bits, as they are likely garbage. // TODO(benvanik): find a way to avoid doing this. From 1d0b290c3de5b1ea3e79bd96d3ce72d08e91161f Mon Sep 17 00:00:00 2001 From: DrChat Date: Tue, 13 Feb 2018 13:31:43 -0600 Subject: [PATCH 02/15] [JIT] Remove all calls to ReloadMembase / ReloadContext (rcx/rdx free now) --- src/xenia/cpu/backend/x64/x64_sequences.cc | 51 ---------------------- 1 file changed, 51 deletions(-) diff --git a/src/xenia/cpu/backend/x64/x64_sequences.cc b/src/xenia/cpu/backend/x64/x64_sequences.cc index 03a609ccb..80da6a7eb 100644 --- a/src/xenia/cpu/backend/x64/x64_sequences.cc +++ b/src/xenia/cpu/backend/x64/x64_sequences.cc @@ -1663,7 +1663,6 @@ struct LOAD_VECTOR_SHL_I8 e.shl(e.dx, 4); e.mov(e.rax, (uintptr_t)lvsl_table); e.vmovaps(i.dest, e.ptr[e.rax + e.rdx]); - e.ReloadMembase(); } } }; @@ -1705,7 +1704,6 @@ struct LOAD_VECTOR_SHR_I8 e.shl(e.dx, 4); e.mov(e.rax, (uintptr_t)lvsr_table); e.vmovaps(i.dest, e.ptr[e.rax + e.rdx]); - e.ReloadMembase(); } } }; @@ -3868,8 +3866,6 @@ struct MUL_I8 : Sequence> { e.mov(i.dest, e.al); } } - - e.ReloadMembase(); } }; struct MUL_I16 : Sequence> { @@ -3911,8 +3907,6 @@ struct MUL_I16 : Sequence> { e.movzx(i.dest, e.ax); } } - - e.ReloadMembase(); } }; struct MUL_I32 : Sequence> { @@ -3955,8 +3949,6 @@ struct MUL_I32 : Sequence> { e.mov(i.dest, e.eax); } } - - e.ReloadMembase(); } }; struct MUL_I64 : Sequence> { @@ -3998,8 +3990,6 @@ struct MUL_I64 : Sequence> { e.mov(i.dest, e.rax); } } - - e.ReloadMembase(); } }; struct MUL_F32 : Sequence> { @@ -4077,7 +4067,6 @@ struct MUL_HI_I8 : Sequence> { } e.mov(i.dest, e.ah); } - e.ReloadMembase(); } }; struct MUL_HI_I16 @@ -4121,7 +4110,6 @@ struct MUL_HI_I16 } e.mov(i.dest, e.dx); } - e.ReloadMembase(); } }; struct MUL_HI_I32 @@ -4170,7 +4158,6 @@ struct MUL_HI_I32 } e.mov(i.dest, e.edx); } - e.ReloadMembase(); } }; struct MUL_HI_I64 @@ -4219,7 +4206,6 @@ struct MUL_HI_I64 } e.mov(i.dest, e.rdx); } - e.ReloadMembase(); } }; EMITTER_OPCODE_TABLE(OPCODE_MUL_HI, MUL_HI_I8, MUL_HI_I16, MUL_HI_I32, @@ -4235,11 +4221,8 @@ struct DIV_I8 : Sequence> { Xbyak::Label skip; e.inLocalLabel(); - // NOTE: RDX clobbered. - bool clobbered_rcx = false; if (i.src2.is_constant) { assert_true(!i.src1.is_constant); - clobbered_rcx = true; e.mov(e.cl, i.src2.constant()); if (i.instr->flags & ARITHMETIC_UNSIGNED) { e.movzx(e.ax, i.src1); @@ -4273,10 +4256,6 @@ struct DIV_I8 : Sequence> { e.L(skip); e.outLocalLabel(); e.mov(i.dest, e.al); - if (clobbered_rcx) { - e.ReloadContext(); - } - e.ReloadMembase(); } }; struct DIV_I16 : Sequence> { @@ -4284,11 +4263,8 @@ struct DIV_I16 : Sequence> { Xbyak::Label skip; e.inLocalLabel(); - // NOTE: RDX clobbered. - bool clobbered_rcx = false; if (i.src2.is_constant) { assert_true(!i.src1.is_constant); - clobbered_rcx = true; e.mov(e.cx, i.src2.constant()); if (i.instr->flags & ARITHMETIC_UNSIGNED) { e.mov(e.ax, i.src1); @@ -4328,10 +4304,6 @@ struct DIV_I16 : Sequence> { e.L(skip); e.outLocalLabel(); e.mov(i.dest, e.ax); - if (clobbered_rcx) { - e.ReloadContext(); - } - e.ReloadMembase(); } }; struct DIV_I32 : Sequence> { @@ -4339,11 +4311,8 @@ struct DIV_I32 : Sequence> { Xbyak::Label skip; e.inLocalLabel(); - // NOTE: RDX clobbered. - bool clobbered_rcx = false; if (i.src2.is_constant) { assert_true(!i.src1.is_constant); - clobbered_rcx = true; e.mov(e.ecx, i.src2.constant()); if (i.instr->flags & ARITHMETIC_UNSIGNED) { e.mov(e.eax, i.src1); @@ -4383,10 +4352,6 @@ struct DIV_I32 : Sequence> { e.L(skip); e.outLocalLabel(); e.mov(i.dest, e.eax); - if (clobbered_rcx) { - e.ReloadContext(); - } - e.ReloadMembase(); } }; struct DIV_I64 : Sequence> { @@ -4394,11 +4359,8 @@ struct DIV_I64 : Sequence> { Xbyak::Label skip; e.inLocalLabel(); - // NOTE: RDX clobbered. - bool clobbered_rcx = false; if (i.src2.is_constant) { assert_true(!i.src1.is_constant); - clobbered_rcx = true; e.mov(e.rcx, i.src2.constant()); if (i.instr->flags & ARITHMETIC_UNSIGNED) { e.mov(e.rax, i.src1); @@ -4438,10 +4400,6 @@ struct DIV_I64 : Sequence> { e.L(skip); e.outLocalLabel(); e.mov(i.dest, e.rax); - if (clobbered_rcx) { - e.ReloadContext(); - } - e.ReloadMembase(); } }; struct DIV_F32 : Sequence> { @@ -5324,7 +5282,6 @@ void EmitShlXX(X64Emitter& e, const ARGS& i) { } else { e.mov(e.cl, src); e.shl(dest_src, e.cl); - e.ReloadContext(); } }, [](X64Emitter& e, const REG& dest_src, int8_t constant) { @@ -5402,7 +5359,6 @@ void EmitShrXX(X64Emitter& e, const ARGS& i) { } else { e.mov(e.cl, src); e.shr(dest_src, e.cl); - e.ReloadContext(); } }, [](X64Emitter& e, const REG& dest_src, int8_t constant) { @@ -5478,7 +5434,6 @@ void EmitSarXX(X64Emitter& e, const ARGS& i) { } else { e.mov(e.cl, src); e.sar(dest_src, e.cl); - e.ReloadContext(); } }, [](X64Emitter& e, const REG& dest_src, int8_t constant) { @@ -6093,7 +6048,6 @@ void EmitRotateLeftXX(X64Emitter& e, const ARGS& i) { } } e.rol(i.dest, e.cl); - e.ReloadContext(); } } struct ROTATE_LEFT_I8 @@ -6584,7 +6538,6 @@ struct EXTRACT_I32 e.vmovaps(e.xmm0, e.ptr[e.rdx + e.rax]); e.vpshufb(e.xmm0, src1, e.xmm0); e.vpextrd(i.dest, e.xmm0, 0); - e.ReloadMembase(); } } }; @@ -7624,8 +7577,6 @@ struct ATOMIC_COMPARE_EXCHANGE_I32 e.lock(); e.cmpxchg(e.dword[e.GetMembaseReg() + e.rcx], i.src3); e.sete(i.dest); - - e.ReloadContext(); } }; struct ATOMIC_COMPARE_EXCHANGE_I64 @@ -7637,8 +7588,6 @@ struct ATOMIC_COMPARE_EXCHANGE_I64 e.lock(); e.cmpxchg(e.qword[e.GetMembaseReg() + e.rcx], i.src3); e.sete(i.dest); - - e.ReloadContext(); } }; EMITTER_OPCODE_TABLE(OPCODE_ATOMIC_COMPARE_EXCHANGE, From f20338004041cc8c29c9c02add7121d7811d323a Mon Sep 17 00:00:00 2001 From: DrChat Date: Tue, 13 Feb 2018 21:03:53 -0600 Subject: [PATCH 03/15] [Travis] Update libvulkan version --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1003f5409..87b692bfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,9 @@ addons: #- libvulkan-dev - libx11-dev - liblz4-dev + +env: + - LIBVULKAN_VERSION=1.0.61.1 matrix: include: @@ -48,9 +51,9 @@ before_script: - $CXX --version - python3 --version # Add Vulkan dependencies - - travis_retry wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan1_1.0.42.0+dfsg1-1ubuntu1~16.04.1_amd64.deb - - travis_retry wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan-dev_1.0.42.0+dfsg1-1ubuntu1~16.04.1_amd64.deb - - if [[ $BUILD == true ]]; then sudo dpkg -i libvulkan1_1.0.42.0+dfsg1-1ubuntu1~16.04.1_amd64.deb libvulkan-dev_1.0.42.0+dfsg1-1ubuntu1~16.04.1_amd64.deb; fi + - travis_retry wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan1_$LIBVULKAN_VERSION+dfsg1-1ubuntu1~16.04.1_amd64.deb + - travis_retry wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan-dev_$LIBVULKAN_VERSION+dfsg1-1ubuntu1~16.04.1_amd64.deb + - if [[ $BUILD == true ]]; then sudo dpkg -i libvulkan1_$LIBVULKAN_VERSION+dfsg1-1ubuntu1~16.04.1_amd64.deb libvulkan-dev_$LIBVULKAN_VERSION+dfsg1-1ubuntu1~16.04.1_amd64.deb; fi # Prepare environment (pull dependencies, build tools). - travis_retry ./xenia-build setup From bbafcc089db7d89def739e3faceac4d669d74649 Mon Sep 17 00:00:00 2001 From: DrChat Date: Wed, 14 Feb 2018 07:44:21 -0600 Subject: [PATCH 04/15] [Travis] Fix Travis --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87b692bfb..430b2f08a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,9 +29,6 @@ addons: #- libvulkan-dev - libx11-dev - liblz4-dev - -env: - - LIBVULKAN_VERSION=1.0.61.1 matrix: include: @@ -45,6 +42,7 @@ git: submodules: false before_script: + - export LIBVULKAN_VERSION=1.0.61.1 - export CXX=$CXX_COMPILER - export CC=$C_COMPILER # Dump useful info. From 02b5a07bc9e2df713a42198ab09506669977454d Mon Sep 17 00:00:00 2001 From: DrChat Date: Wed, 14 Feb 2018 13:50:57 -0600 Subject: [PATCH 05/15] [JIT] rlwinmx: Use Truncate/ZeroExtend instead of And 0xFFFFFFFF --- src/xenia/cpu/ppc/ppc_emit_alu.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xenia/cpu/ppc/ppc_emit_alu.cc b/src/xenia/cpu/ppc/ppc_emit_alu.cc index 265fb1267..9dbe68286 100644 --- a/src/xenia/cpu/ppc/ppc_emit_alu.cc +++ b/src/xenia/cpu/ppc/ppc_emit_alu.cc @@ -984,8 +984,10 @@ int InstrEmit_rlwinmx(PPCHIRBuilder& f, const InstrData& i) { // m <- MASK(MB+32, ME+32) // RA <- r & m Value* v = f.LoadGPR(i.M.RT); + // (x||x) - v = f.Or(f.Shl(v, 32), f.And(v, f.LoadConstantUint64(0xFFFFFFFF))); + v = f.Or(f.Shl(v, 32), f.ZeroExtend(f.Truncate(v, INT32_TYPE), INT64_TYPE)); + // TODO(benvanik): optimize srwi // TODO(benvanik): optimize slwi // The compiler will generate a bunch of these for the special case of SH=0. From 7818cdab60c571f162b8bb752a1e817b1db108f2 Mon Sep 17 00:00:00 2001 From: DrChat Date: Wed, 14 Feb 2018 16:21:16 -0600 Subject: [PATCH 06/15] [CPU] Check for RawModule memory allocation success --- src/xenia/cpu/raw_module.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/xenia/cpu/raw_module.cc b/src/xenia/cpu/raw_module.cc index 583a66922..ae51067c7 100644 --- a/src/xenia/cpu/raw_module.cc +++ b/src/xenia/cpu/raw_module.cc @@ -33,15 +33,18 @@ bool RawModule::LoadFile(uint32_t base_address, const std::wstring& path) { // Allocate memory. // Since we have no real heap just load it wherever. base_address_ = base_address; - memory_->LookupHeap(base_address_) - ->AllocFixed(base_address_, file_length, 0, - kMemoryAllocationReserve | kMemoryAllocationCommit, - kMemoryProtectRead | kMemoryProtectWrite); + auto heap = memory_->LookupHeap(base_address_); + if (!heap || + !heap->AllocFixed(base_address_, file_length, 0, + kMemoryAllocationReserve | kMemoryAllocationCommit, + kMemoryProtectRead | kMemoryProtectWrite)) { + return false; + } + uint8_t* p = memory_->TranslateVirtual(base_address_); // Read into memory. fread(p, file_length, 1, file); - fclose(file); // Setup debug info. From 1de598e4cea07c4c933df4a20a072eeb5275c2d2 Mon Sep 17 00:00:00 2001 From: DrChat Date: Wed, 14 Feb 2018 16:22:14 -0600 Subject: [PATCH 07/15] [JIT] Comment the offsets in PPCContext --- src/xenia/cpu/ppc/ppc_context.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/xenia/cpu/ppc/ppc_context.h b/src/xenia/cpu/ppc/ppc_context.h index 9c96daa6b..2732fdc41 100644 --- a/src/xenia/cpu/ppc/ppc_context.h +++ b/src/xenia/cpu/ppc/ppc_context.h @@ -249,22 +249,22 @@ enum class PPCRegister { typedef struct PPCContext_s { // Must be stored at 0x0 for now. // TODO(benvanik): find a nice way to describe this to the JIT. - ThreadState* thread_state; + ThreadState* thread_state; // 0x0 // TODO(benvanik): this is getting nasty. Must be here. - uint8_t* virtual_membase; + uint8_t* virtual_membase; // 0x8 // Most frequently used registers first. - uint64_t lr; // Link register - uint64_t ctr; // Count register - uint64_t r[32]; // General purpose registers - double f[32]; // Floating-point registers - vec128_t v[128]; // VMX128 vector registers + uint64_t lr; // 0x10 Link register + uint64_t ctr; // 0x18 Count register + uint64_t r[32]; // 0x20 General purpose registers + double f[32]; // 0x120 Floating-point registers + vec128_t v[128]; // 0x220 VMX128 vector registers // XER register: // Split to make it easier to do individual updates. - uint8_t xer_ca; - uint8_t xer_ov; - uint8_t xer_so; + uint8_t xer_ca; // 0xA20 + uint8_t xer_ov; // 0xA21 + uint8_t xer_so; // 0xA22 // Condition registers: // These are split to make it easier to do DCE on unused stores. @@ -279,7 +279,7 @@ typedef struct PPCContext_s { // successfully uint8_t cr0_so; // Summary Overflow (SO) - copy of XER[SO] }; - } cr0; + } cr0; // 0xA24 union { uint32_t value; struct { From e54c24e1505e597ed29a133f162686e13d7294c5 Mon Sep 17 00:00:00 2001 From: DrChat Date: Wed, 14 Feb 2018 16:26:49 -0600 Subject: [PATCH 08/15] [JIT] New opcodes: OPCODE_LOAD_OFFSET and OPCODE_STORE_OFFSET These take full advantage of x86 addressing, and eliminate extra add operations. --- src/xenia/cpu/backend/x64/x64_sequences.cc | 172 ++++++++++++++++++ .../passes/constant_propagation_pass.cc | 14 ++ .../memory_sequence_combination_pass.cc | 16 +- src/xenia/cpu/hir/hir_builder.cc | 19 ++ src/xenia/cpu/hir/hir_builder.h | 5 + src/xenia/cpu/hir/opcodes.h | 2 + src/xenia/cpu/hir/opcodes.inl | 12 ++ src/xenia/cpu/ppc/ppc_emit_memory.cc | 147 +++++++++++---- 8 files changed, 352 insertions(+), 35 deletions(-) diff --git a/src/xenia/cpu/backend/x64/x64_sequences.cc b/src/xenia/cpu/backend/x64/x64_sequences.cc index 80da6a7eb..ac2a158c0 100644 --- a/src/xenia/cpu/backend/x64/x64_sequences.cc +++ b/src/xenia/cpu/backend/x64/x64_sequences.cc @@ -2127,6 +2127,176 @@ struct STORE_MMIO_I32 }; EMITTER_OPCODE_TABLE(OPCODE_STORE_MMIO, STORE_MMIO_I32); +// ============================================================================ +// OPCODE_LOAD_OFFSET +// ============================================================================ +template +RegExp ComputeMemoryAddressOffset(X64Emitter& e, const T& guest, + const T& offset) { + int32_t offset_const = static_cast(offset.constant()); + + if (guest.is_constant) { + uint32_t address = static_cast(guest.constant()); + address += static_cast(offset.constant()); + if (address < 0x80000000) { + return e.GetMembaseReg() + address; + } else { + e.mov(e.eax, address); + return e.GetMembaseReg() + e.rax; + } + } else { + // Clear the top 32 bits, as they are likely garbage. + // TODO(benvanik): find a way to avoid doing this. + e.mov(e.eax, guest.reg().cvt32()); + return e.GetMembaseReg() + e.rax + offset_const; + } +} + +struct LOAD_OFFSET_I8 + : Sequence> { + static void Emit(X64Emitter& e, const EmitArgType& i) { + auto addr = ComputeMemoryAddressOffset(e, i.src1, i.src2); + e.mov(i.dest, e.byte[addr]); + } +}; + +struct LOAD_OFFSET_I16 + : Sequence> { + static void Emit(X64Emitter& e, const EmitArgType& i) { + auto addr = ComputeMemoryAddressOffset(e, i.src1, i.src2); + if (i.instr->flags & LoadStoreFlags::LOAD_STORE_BYTE_SWAP) { + if (e.IsFeatureEnabled(kX64EmitMovbe)) { + e.movbe(i.dest, e.word[addr]); + } else { + e.mov(i.dest, e.word[addr]); + e.ror(i.dest, 8); + } + } else { + e.mov(i.dest, e.word[addr]); + } + } +}; + +struct LOAD_OFFSET_I32 + : Sequence> { + static void Emit(X64Emitter& e, const EmitArgType& i) { + auto addr = ComputeMemoryAddressOffset(e, i.src1, i.src2); + if (i.instr->flags & LoadStoreFlags::LOAD_STORE_BYTE_SWAP) { + if (e.IsFeatureEnabled(kX64EmitMovbe)) { + e.movbe(i.dest, e.dword[addr]); + } else { + e.mov(i.dest, e.dword[addr]); + e.bswap(i.dest); + } + } else { + e.mov(i.dest, e.dword[addr]); + } + } +}; + +struct LOAD_OFFSET_I64 + : Sequence> { + static void Emit(X64Emitter& e, const EmitArgType& i) { + auto addr = ComputeMemoryAddressOffset(e, i.src1, i.src2); + if (i.instr->flags & LoadStoreFlags::LOAD_STORE_BYTE_SWAP) { + if (e.IsFeatureEnabled(kX64EmitMovbe)) { + e.movbe(i.dest, e.qword[addr]); + } else { + e.mov(i.dest, e.qword[addr]); + e.bswap(i.dest); + } + } else { + e.mov(i.dest, e.qword[addr]); + } + } +}; +EMITTER_OPCODE_TABLE(OPCODE_LOAD_OFFSET, LOAD_OFFSET_I8, LOAD_OFFSET_I16, + LOAD_OFFSET_I32, LOAD_OFFSET_I64); + +// ============================================================================ +// OPCODE_STORE_OFFSET +// ============================================================================ +struct STORE_OFFSET_I8 + : Sequence> { + static void Emit(X64Emitter& e, const EmitArgType& i) { + auto addr = ComputeMemoryAddressOffset(e, i.src1, i.src2); + if (i.src3.is_constant) { + e.mov(e.byte[addr], i.src3.constant()); + } else { + e.mov(e.byte[addr], i.src3); + } + } +}; + +struct STORE_OFFSET_I16 + : Sequence> { + static void Emit(X64Emitter& e, const EmitArgType& i) { + auto addr = ComputeMemoryAddressOffset(e, i.src1, i.src2); + if (i.instr->flags & LoadStoreFlags::LOAD_STORE_BYTE_SWAP) { + assert_false(i.src3.is_constant); + if (e.IsFeatureEnabled(kX64EmitMovbe)) { + e.movbe(e.word[addr], i.src3); + } else { + assert_always("not implemented"); + } + } else { + if (i.src3.is_constant) { + e.mov(e.word[addr], i.src3.constant()); + } else { + e.mov(e.word[addr], i.src3); + } + } + } +}; + +struct STORE_OFFSET_I32 + : Sequence> { + static void Emit(X64Emitter& e, const EmitArgType& i) { + auto addr = ComputeMemoryAddressOffset(e, i.src1, i.src2); + if (i.instr->flags & LoadStoreFlags::LOAD_STORE_BYTE_SWAP) { + assert_false(i.src3.is_constant); + if (e.IsFeatureEnabled(kX64EmitMovbe)) { + e.movbe(e.dword[addr], i.src3); + } else { + assert_always("not implemented"); + } + } else { + if (i.src3.is_constant) { + e.mov(e.dword[addr], i.src3.constant()); + } else { + e.mov(e.dword[addr], i.src3); + } + } + } +}; + +struct STORE_OFFSET_I64 + : Sequence> { + static void Emit(X64Emitter& e, const EmitArgType& i) { + auto addr = ComputeMemoryAddressOffset(e, i.src1, i.src2); + if (i.instr->flags & LoadStoreFlags::LOAD_STORE_BYTE_SWAP) { + assert_false(i.src3.is_constant); + if (e.IsFeatureEnabled(kX64EmitMovbe)) { + e.movbe(e.qword[addr], i.src3); + } else { + assert_always("not implemented"); + } + } else { + if (i.src3.is_constant) { + e.MovMem64(addr, i.src3.constant()); + } else { + e.mov(e.qword[addr], i.src3); + } + } + } +}; +EMITTER_OPCODE_TABLE(OPCODE_STORE_OFFSET, STORE_OFFSET_I8, STORE_OFFSET_I16, + STORE_OFFSET_I32, STORE_OFFSET_I64); + // ============================================================================ // OPCODE_LOAD // ============================================================================ @@ -7650,6 +7820,8 @@ void RegisterSequences() { Register_OPCODE_CONTEXT_BARRIER(); Register_OPCODE_LOAD_MMIO(); Register_OPCODE_STORE_MMIO(); + Register_OPCODE_LOAD_OFFSET(); + Register_OPCODE_STORE_OFFSET(); Register_OPCODE_LOAD(); Register_OPCODE_STORE(); Register_OPCODE_MEMSET(); diff --git a/src/xenia/cpu/compiler/passes/constant_propagation_pass.cc b/src/xenia/cpu/compiler/passes/constant_propagation_pass.cc index 187ab5470..bc59c7eab 100644 --- a/src/xenia/cpu/compiler/passes/constant_propagation_pass.cc +++ b/src/xenia/cpu/compiler/passes/constant_propagation_pass.cc @@ -195,10 +195,15 @@ bool ConstantPropagationPass::Run(HIRBuilder* builder) { break; case OPCODE_LOAD: + case OPCODE_LOAD_OFFSET: if (i->src1.value->IsConstant()) { assert_false(i->flags & LOAD_STORE_BYTE_SWAP); auto memory = processor_->memory(); auto address = i->src1.value->constant.i32; + if (i->opcode->num == OPCODE_LOAD_OFFSET) { + address += i->src2.value->constant.i32; + } + auto mmio_range = processor_->memory()->LookupVirtualMappedRange(address); if (FLAGS_inline_mmio_access && mmio_range) { @@ -246,12 +251,21 @@ bool ConstantPropagationPass::Run(HIRBuilder* builder) { } break; case OPCODE_STORE: + case OPCODE_STORE_OFFSET: if (FLAGS_inline_mmio_access && i->src1.value->IsConstant()) { auto address = i->src1.value->constant.i32; + if (i->opcode->num == OPCODE_STORE_OFFSET) { + address += i->src2.value->constant.i32; + } + auto mmio_range = processor_->memory()->LookupVirtualMappedRange(address); if (mmio_range) { auto value = i->src2.value; + if (i->opcode->num == OPCODE_STORE_OFFSET) { + value = i->src3.value; + } + i->Replace(&OPCODE_STORE_MMIO_info, 0); i->src1.offset = reinterpret_cast(mmio_range); i->src2.offset = address; diff --git a/src/xenia/cpu/compiler/passes/memory_sequence_combination_pass.cc b/src/xenia/cpu/compiler/passes/memory_sequence_combination_pass.cc index 051e3185f..33cebc4d1 100644 --- a/src/xenia/cpu/compiler/passes/memory_sequence_combination_pass.cc +++ b/src/xenia/cpu/compiler/passes/memory_sequence_combination_pass.cc @@ -35,9 +35,11 @@ bool MemorySequenceCombinationPass::Run(HIRBuilder* builder) { while (block) { auto i = block->instr_head; while (i) { - if (i->opcode == &OPCODE_LOAD_info) { + if (i->opcode == &OPCODE_LOAD_info || + i->opcode == &OPCODE_LOAD_OFFSET_info) { CombineLoadSequence(i); - } else if (i->opcode == &OPCODE_STORE_info) { + } else if (i->opcode == &OPCODE_STORE_info || + i->opcode == &OPCODE_STORE_OFFSET_info) { CombineStoreSequence(i); } i = i->next; @@ -112,6 +114,10 @@ void MemorySequenceCombinationPass::CombineStoreSequence(Instr* i) { // store_convert v0, v1.i64, [swap|i64->i32,trunc] auto src = i->src2.value; + if (i->opcode == &OPCODE_STORE_OFFSET_info) { + src = i->src3.value; + } + if (src->IsConstant()) { // Constant value write - ignore. return; @@ -135,7 +141,11 @@ void MemorySequenceCombinationPass::CombineStoreSequence(Instr* i) { // Pull the original value (from before the byte swap). // The byte swap itself will go away in DCE. - i->set_src2(def->src1.value); + if (i->opcode == &OPCODE_STORE_info) { + i->set_src2(def->src1.value); + } else if (i->opcode == &OPCODE_STORE_OFFSET_info) { + i->set_src3(def->src1.value); + } // TODO(benvanik): extend/truncate. } diff --git a/src/xenia/cpu/hir/hir_builder.cc b/src/xenia/cpu/hir/hir_builder.cc index a74e28377..af954ca6c 100644 --- a/src/xenia/cpu/hir/hir_builder.cc +++ b/src/xenia/cpu/hir/hir_builder.cc @@ -1232,6 +1232,25 @@ void HIRBuilder::StoreMmio(cpu::MMIORange* mmio_range, uint32_t address, i->set_src3(value); } +Value* HIRBuilder::LoadOffset(Value* address, Value* offset, TypeName type, + uint32_t load_flags) { + ASSERT_ADDRESS_TYPE(address); + Instr* i = AppendInstr(OPCODE_LOAD_OFFSET_info, load_flags, AllocValue(type)); + i->set_src1(address); + i->set_src2(offset); + i->src3.value = NULL; + return i->dest; +} + +void HIRBuilder::StoreOffset(Value* address, Value* offset, Value* value, + uint32_t store_flags) { + ASSERT_ADDRESS_TYPE(address); + Instr* i = AppendInstr(OPCODE_STORE_OFFSET_info, store_flags); + i->set_src1(address); + i->set_src2(offset); + i->set_src3(value); +} + Value* HIRBuilder::Load(Value* address, TypeName type, uint32_t load_flags) { ASSERT_ADDRESS_TYPE(address); Instr* i = AppendInstr(OPCODE_LOAD_info, load_flags, AllocValue(type)); diff --git a/src/xenia/cpu/hir/hir_builder.h b/src/xenia/cpu/hir/hir_builder.h index 41fbf7c1e..6f860249b 100644 --- a/src/xenia/cpu/hir/hir_builder.h +++ b/src/xenia/cpu/hir/hir_builder.h @@ -147,6 +147,11 @@ class HIRBuilder { Value* LoadMmio(cpu::MMIORange* mmio_range, uint32_t address, TypeName type); void StoreMmio(cpu::MMIORange* mmio_range, uint32_t address, Value* value); + Value* LoadOffset(Value* address, Value* offset, TypeName type, + uint32_t load_flags = 0); + void StoreOffset(Value* address, Value* offset, Value* value, + uint32_t store_flags = 0); + Value* Load(Value* address, TypeName type, uint32_t load_flags = 0); void Store(Value* address, Value* value, uint32_t store_flags = 0); void Memset(Value* address, Value* value, Value* length); diff --git a/src/xenia/cpu/hir/opcodes.h b/src/xenia/cpu/hir/opcodes.h index bfdb7fd15..ce232fd1d 100644 --- a/src/xenia/cpu/hir/opcodes.h +++ b/src/xenia/cpu/hir/opcodes.h @@ -152,6 +152,8 @@ enum Opcode { OPCODE_CONTEXT_BARRIER, OPCODE_LOAD_MMIO, OPCODE_STORE_MMIO, + OPCODE_LOAD_OFFSET, + OPCODE_STORE_OFFSET, OPCODE_LOAD, OPCODE_STORE, OPCODE_MEMSET, diff --git a/src/xenia/cpu/hir/opcodes.inl b/src/xenia/cpu/hir/opcodes.inl index 9930cfe8d..389570f50 100644 --- a/src/xenia/cpu/hir/opcodes.inl +++ b/src/xenia/cpu/hir/opcodes.inl @@ -231,6 +231,18 @@ DEFINE_OPCODE( OPCODE_SIG_X_O_O_V, OPCODE_FLAG_MEMORY) +DEFINE_OPCODE( + OPCODE_LOAD_OFFSET, + "load_offset", + OPCODE_SIG_V_V_V, + OPCODE_FLAG_MEMORY) + +DEFINE_OPCODE( + OPCODE_STORE_OFFSET, + "store_offset", + OPCODE_SIG_X_V_V_V, + OPCODE_FLAG_MEMORY) + DEFINE_OPCODE( OPCODE_LOAD, "load", diff --git a/src/xenia/cpu/ppc/ppc_emit_memory.cc b/src/xenia/cpu/ppc/ppc_emit_memory.cc index da93f403a..7cd4f19c1 100644 --- a/src/xenia/cpu/ppc/ppc_emit_memory.cc +++ b/src/xenia/cpu/ppc/ppc_emit_memory.cc @@ -63,8 +63,15 @@ int InstrEmit_lbz(PPCHIRBuilder& f, const InstrData& i) { // b <- (RA) // EA <- b + EXTS(D) // RT <- i56.0 || MEM(EA, 1) - Value* ea = CalculateEA_0_i(f, i.D.RA, XEEXTS16(i.D.DS)); - Value* rt = f.ZeroExtend(f.Load(ea, INT8_TYPE), INT64_TYPE); + Value* b; + if (i.D.RA == 0) { + b = f.LoadZeroInt64(); + } else { + b = f.LoadGPR(i.D.RA); + } + + Value* offset = f.LoadConstantInt64(XEEXTS16(i.D.DS)); + Value* rt = f.ZeroExtend(f.LoadOffset(b, offset, INT8_TYPE), INT64_TYPE); f.StoreGPR(i.D.RT, rt); return 0; } @@ -73,10 +80,11 @@ int InstrEmit_lbzu(PPCHIRBuilder& f, const InstrData& i) { // EA <- (RA) + EXTS(D) // RT <- i56.0 || MEM(EA, 1) // RA <- EA - Value* ea = CalculateEA_i(f, i.D.RA, XEEXTS16(i.D.DS)); - Value* rt = f.ZeroExtend(f.Load(ea, INT8_TYPE), INT64_TYPE); + Value* ra = f.LoadGPR(i.D.RA); + Value* offset = f.LoadConstantInt64(XEEXTS16(i.D.DS)); + Value* rt = f.ZeroExtend(f.LoadOffset(ra, offset, INT8_TYPE), INT64_TYPE); f.StoreGPR(i.D.RT, rt); - StoreEA(f, i.D.RA, ea); + StoreEA(f, i.D.RA, f.Add(ra, offset)); return 0; } @@ -111,8 +119,16 @@ int InstrEmit_lha(PPCHIRBuilder& f, const InstrData& i) { // b <- (RA) // EA <- b + EXTS(D) // RT <- EXTS(MEM(EA, 2)) - Value* ea = CalculateEA_0_i(f, i.D.RA, XEEXTS16(i.D.DS)); - Value* rt = f.SignExtend(f.ByteSwap(f.Load(ea, INT16_TYPE)), INT64_TYPE); + Value* b; + if (i.D.RA == 0) { + b = f.LoadZeroInt64(); + } else { + b = f.LoadGPR(i.D.RA); + } + + Value* offset = f.LoadConstantInt64(XEEXTS16(i.D.DS)); + Value* rt = + f.SignExtend(f.ByteSwap(f.LoadOffset(b, offset, INT16_TYPE)), INT64_TYPE); f.StoreGPR(i.D.RT, rt); return 0; } @@ -121,10 +137,12 @@ int InstrEmit_lhau(PPCHIRBuilder& f, const InstrData& i) { // EA <- (RA) + EXTS(D) // RT <- EXTS(MEM(EA, 2)) // RA <- EA - Value* ea = CalculateEA_i(f, i.D.RA, XEEXTS16(i.D.DS)); - Value* rt = f.SignExtend(f.ByteSwap(f.Load(ea, INT16_TYPE)), INT64_TYPE); + Value* ra = f.LoadGPR(i.D.RA); + Value* offset = f.LoadConstantInt64(XEEXTS16(i.D.DS)); + Value* rt = f.SignExtend(f.ByteSwap(f.LoadOffset(ra, offset, INT16_TYPE)), + INT64_TYPE); f.StoreGPR(i.D.RT, rt); - StoreEA(f, i.D.RA, ea); + StoreEA(f, i.D.RA, f.Add(ra, offset)); return 0; } @@ -159,8 +177,16 @@ int InstrEmit_lhz(PPCHIRBuilder& f, const InstrData& i) { // b <- (RA) // EA <- b + EXTS(D) // RT <- i48.0 || MEM(EA, 2) - Value* ea = CalculateEA_0_i(f, i.D.RA, XEEXTS16(i.D.DS)); - Value* rt = f.ZeroExtend(f.ByteSwap(f.Load(ea, INT16_TYPE)), INT64_TYPE); + Value* b; + if (i.D.RA == 0) { + b = f.LoadZeroInt64(); + } else { + b = f.LoadGPR(i.D.RA); + } + + Value* offset = f.LoadConstantInt64(XEEXTS16(i.D.DS)); + Value* rt = + f.ZeroExtend(f.ByteSwap(f.LoadOffset(b, offset, INT16_TYPE)), INT64_TYPE); f.StoreGPR(i.D.RT, rt); return 0; } @@ -169,10 +195,12 @@ int InstrEmit_lhzu(PPCHIRBuilder& f, const InstrData& i) { // EA <- (RA) + EXTS(D) // RT <- i48.0 || MEM(EA, 2) // RA <- EA - Value* ea = CalculateEA_i(f, i.D.RA, XEEXTS16(i.D.DS)); - Value* rt = f.ZeroExtend(f.ByteSwap(f.Load(ea, INT16_TYPE)), INT64_TYPE); + Value* ra = f.LoadGPR(i.D.RA); + Value* offset = f.LoadConstantInt64(XEEXTS16(i.D.DS)); + Value* rt = f.ZeroExtend(f.ByteSwap(f.LoadOffset(ra, offset, INT16_TYPE)), + INT64_TYPE); f.StoreGPR(i.D.RT, rt); - StoreEA(f, i.D.RA, ea); + StoreEA(f, i.D.RA, f.Add(ra, offset)); return 0; } @@ -207,8 +235,16 @@ int InstrEmit_lwa(PPCHIRBuilder& f, const InstrData& i) { // b <- (RA) // EA <- b + EXTS(D || 00) // RT <- EXTS(MEM(EA, 4)) - Value* ea = CalculateEA_0_i(f, i.DS.RA, XEEXTS16(i.DS.DS << 2)); - Value* rt = f.SignExtend(f.ByteSwap(f.Load(ea, INT32_TYPE)), INT64_TYPE); + Value* b; + if (i.DS.RA == 0) { + b = f.LoadZeroInt64(); + } else { + b = f.LoadGPR(i.DS.RA); + } + + Value* offset = f.LoadConstantInt64(XEEXTS16(i.DS.DS << 2)); + Value* rt = + f.SignExtend(f.ByteSwap(f.LoadOffset(b, offset, INT32_TYPE)), INT64_TYPE); f.StoreGPR(i.DS.RT, rt); return 0; } @@ -244,8 +280,16 @@ int InstrEmit_lwz(PPCHIRBuilder& f, const InstrData& i) { // b <- (RA) // EA <- b + EXTS(D) // RT <- i32.0 || MEM(EA, 4) - Value* ea = CalculateEA_0_i(f, i.D.RA, XEEXTS16(i.D.DS)); - Value* rt = f.ZeroExtend(f.ByteSwap(f.Load(ea, INT32_TYPE)), INT64_TYPE); + Value* b; + if (i.D.RA == 0) { + b = f.LoadZeroInt64(); + } else { + b = f.LoadGPR(i.D.RA); + } + + Value* offset = f.LoadConstantInt64(XEEXTS16(i.D.DS)); + Value* rt = + f.ZeroExtend(f.ByteSwap(f.LoadOffset(b, offset, INT32_TYPE)), INT64_TYPE); f.StoreGPR(i.D.RT, rt); return 0; } @@ -254,10 +298,12 @@ int InstrEmit_lwzu(PPCHIRBuilder& f, const InstrData& i) { // EA <- (RA) + EXTS(D) // RT <- i32.0 || MEM(EA, 4) // RA <- EA - Value* ea = CalculateEA_i(f, i.D.RA, XEEXTS16(i.D.DS)); - Value* rt = f.ZeroExtend(f.ByteSwap(f.Load(ea, INT32_TYPE)), INT64_TYPE); + Value* ra = f.LoadGPR(i.D.RA); + Value* offset = f.LoadConstantInt64(XEEXTS16(i.D.DS)); + Value* rt = f.ZeroExtend(f.ByteSwap(f.LoadOffset(ra, offset, INT32_TYPE)), + INT64_TYPE); f.StoreGPR(i.D.RT, rt); - StoreEA(f, i.D.RA, ea); + StoreEA(f, i.D.RA, f.Add(ra, offset)); return 0; } @@ -292,8 +338,15 @@ int InstrEmit_ld(PPCHIRBuilder& f, const InstrData& i) { // b <- (RA) // EA <- b + EXTS(DS || 0b00) // RT <- MEM(EA, 8) - Value* ea = CalculateEA_0_i(f, i.DS.RA, XEEXTS16(i.DS.DS << 2)); - Value* rt = f.ByteSwap(f.Load(ea, INT64_TYPE)); + Value* b; + if (i.DS.RA == 0) { + b = f.LoadZeroInt64(); + } else { + b = f.LoadGPR(i.DS.RA); + } + + Value* offset = f.LoadConstantInt64(XEEXTS16(i.DS.DS << 2)); + Value* rt = f.ByteSwap(f.LoadOffset(b, offset, INT64_TYPE)); f.StoreGPR(i.DS.RT, rt); return 0; } @@ -342,8 +395,15 @@ int InstrEmit_stb(PPCHIRBuilder& f, const InstrData& i) { // b <- (RA) // EA <- b + EXTS(D) // MEM(EA, 1) <- (RS)[56:63] - Value* ea = CalculateEA_0_i(f, i.D.RA, XEEXTS16(i.D.DS)); - f.Store(ea, f.Truncate(f.LoadGPR(i.D.RT), INT8_TYPE)); + Value* b; + if (i.D.RA == 0) { + b = f.LoadZeroInt64(); + } else { + b = f.LoadGPR(i.D.RA); + } + + Value* offset = f.LoadConstantInt64(XEEXTS16(i.D.DS)); + f.StoreOffset(b, offset, f.Truncate(f.LoadGPR(i.D.RT), INT8_TYPE)); return 0; } @@ -386,8 +446,16 @@ int InstrEmit_sth(PPCHIRBuilder& f, const InstrData& i) { // b <- (RA) // EA <- b + EXTS(D) // MEM(EA, 2) <- (RS)[48:63] - Value* ea = CalculateEA_0_i(f, i.D.RA, XEEXTS16(i.D.DS)); - f.Store(ea, f.ByteSwap(f.Truncate(f.LoadGPR(i.D.RT), INT16_TYPE))); + Value* b; + if (i.D.RA == 0) { + b = f.LoadZeroInt64(); + } else { + b = f.LoadGPR(i.D.RA); + } + + Value* offset = f.LoadConstantInt64(XEEXTS16(i.D.DS)); + f.StoreOffset(b, offset, + f.ByteSwap(f.Truncate(f.LoadGPR(i.D.RT), INT16_TYPE))); return 0; } @@ -430,8 +498,16 @@ int InstrEmit_stw(PPCHIRBuilder& f, const InstrData& i) { // b <- (RA) // EA <- b + EXTS(D) // MEM(EA, 4) <- (RS)[32:63] - Value* ea = CalculateEA_0_i(f, i.D.RA, XEEXTS16(i.D.DS)); - f.Store(ea, f.ByteSwap(f.Truncate(f.LoadGPR(i.D.RT), INT32_TYPE))); + Value* b; + if (i.D.RA == 0) { + b = f.LoadZeroInt64(); + } else { + b = f.LoadGPR(i.D.RA); + } + + Value* offset = f.LoadConstantInt64(XEEXTS16(i.D.DS)); + f.StoreOffset(b, offset, + f.ByteSwap(f.Truncate(f.LoadGPR(i.D.RT), INT32_TYPE))); return 0; } @@ -474,8 +550,15 @@ int InstrEmit_std(PPCHIRBuilder& f, const InstrData& i) { // b <- (RA) // EA <- b + EXTS(DS || 0b00) // MEM(EA, 8) <- (RS) - Value* ea = CalculateEA_0_i(f, i.DS.RA, XEEXTS16(i.DS.DS << 2)); - f.Store(ea, f.ByteSwap(f.LoadGPR(i.DS.RT))); + Value* b; + if (i.DS.RA == 0) { + b = f.LoadZeroInt64(); + } else { + b = f.LoadGPR(i.DS.RA); + } + + Value* offset = f.LoadConstantInt64(XEEXTS16(i.DS.DS << 2)); + f.StoreOffset(b, offset, f.ByteSwap(f.LoadGPR(i.DS.RT))); return 0; } From b17d6f5088976b5aed12e45d44bf5c73d91bc41d Mon Sep 17 00:00:00 2001 From: DrChat Date: Wed, 14 Feb 2018 20:28:34 -0600 Subject: [PATCH 09/15] [Base] Enable aligned copy and swap routines --- src/xenia/base/memory.cc | 88 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 8 deletions(-) diff --git a/src/xenia/base/memory.cc b/src/xenia/base/memory.cc index 1179ecc1f..3ddef8113 100644 --- a/src/xenia/base/memory.cc +++ b/src/xenia/base/memory.cc @@ -24,8 +24,20 @@ void copy_128_aligned(void* dest, const void* src, size_t count) { } #if XE_ARCH_AMD64 -void copy_and_swap_16_aligned(void* dest, const void* src, size_t count) { - return copy_and_swap_16_unaligned(dest, src, count); +void copy_and_swap_16_aligned(void* dest_ptr, const void* src_ptr, + size_t count) { + auto dest = reinterpret_cast(dest_ptr); + auto src = reinterpret_cast(src_ptr); + size_t i; + for (i = 0; i + 8 <= count; i += 8) { + __m128i input = _mm_load_si128(reinterpret_cast(&src[i])); + __m128i output = + _mm_or_si128(_mm_slli_epi16(input, 8), _mm_srli_epi16(input, 8)); + _mm_store_si128(reinterpret_cast<__m128i*>(&dest[i]), output); + } + for (; i < count; ++i) { // handle residual elements + dest[i] = byte_swap(src[i]); + } } void copy_and_swap_16_unaligned(void* dest_ptr, const void* src_ptr, @@ -44,8 +56,31 @@ void copy_and_swap_16_unaligned(void* dest_ptr, const void* src_ptr, } } -void copy_and_swap_32_aligned(void* dest, const void* src, size_t count) { - return copy_and_swap_32_unaligned(dest, src, count); +void copy_and_swap_32_aligned(void* dest_ptr, const void* src_ptr, + size_t count) { + auto dest = reinterpret_cast(dest_ptr); + auto src = reinterpret_cast(src_ptr); + __m128i byte2mask = _mm_set1_epi32(0x00FF0000); + __m128i byte3mask = _mm_set1_epi32(0x0000FF00); + size_t i; + for (i = 0; i + 4 <= count; i += 4) { + __m128i input = _mm_load_si128(reinterpret_cast(&src[i])); + // Do the four shifts. + __m128i byte1 = _mm_slli_epi32(input, 24); + __m128i byte2 = _mm_slli_epi32(input, 8); + __m128i byte3 = _mm_srli_epi32(input, 8); + __m128i byte4 = _mm_srli_epi32(input, 24); + // OR bytes together. + __m128i output = _mm_or_si128(byte1, byte4); + byte2 = _mm_and_si128(byte2, byte2mask); + output = _mm_or_si128(output, byte2); + byte3 = _mm_and_si128(byte3, byte3mask); + output = _mm_or_si128(output, byte3); + _mm_store_si128(reinterpret_cast<__m128i*>(&dest[i]), output); + } + for (; i < count; ++i) { // handle residual elements + dest[i] = byte_swap(src[i]); + } } void copy_and_swap_32_unaligned(void* dest_ptr, const void* src_ptr, @@ -75,8 +110,33 @@ void copy_and_swap_32_unaligned(void* dest_ptr, const void* src_ptr, } } -void copy_and_swap_64_aligned(void* dest, const void* src, size_t count) { - return copy_and_swap_64_unaligned(dest, src, count); +void copy_and_swap_64_aligned(void* dest_ptr, const void* src_ptr, + size_t count) { + auto dest = reinterpret_cast(dest_ptr); + auto src = reinterpret_cast(src_ptr); + __m128i byte2mask = _mm_set1_epi32(0x00FF0000); + __m128i byte3mask = _mm_set1_epi32(0x0000FF00); + size_t i; + for (i = 0; i + 2 <= count; i += 2) { + __m128i input = _mm_load_si128(reinterpret_cast(&src[i])); + // Do the four shifts. + __m128i byte1 = _mm_slli_epi32(input, 24); + __m128i byte2 = _mm_slli_epi32(input, 8); + __m128i byte3 = _mm_srli_epi32(input, 8); + __m128i byte4 = _mm_srli_epi32(input, 24); + // OR bytes together. + __m128i output = _mm_or_si128(byte1, byte4); + byte2 = _mm_and_si128(byte2, byte2mask); + output = _mm_or_si128(output, byte2); + byte3 = _mm_and_si128(byte3, byte3mask); + output = _mm_or_si128(output, byte3); + // Reorder the two words. + output = _mm_shuffle_epi32(output, _MM_SHUFFLE(2, 3, 0, 1)); + _mm_store_si128(reinterpret_cast<__m128i*>(&dest[i]), output); + } + for (; i < count; ++i) { // handle residual elements + dest[i] = byte_swap(src[i]); + } } void copy_and_swap_64_unaligned(void* dest_ptr, const void* src_ptr, @@ -108,8 +168,20 @@ void copy_and_swap_64_unaligned(void* dest_ptr, const void* src_ptr, } } -void copy_and_swap_16_in_32_aligned(void* dest, const void* src, size_t count) { - return copy_and_swap_16_in_32_unaligned(dest, src, count); +void copy_and_swap_16_in_32_aligned(void* dest_ptr, const void* src_ptr, + size_t count) { + auto dest = reinterpret_cast(dest_ptr); + auto src = reinterpret_cast(src_ptr); + size_t i; + for (i = 0; i + 4 <= count; i += 4) { + __m128i input = _mm_load_si128(reinterpret_cast(&src[i])); + __m128i output = + _mm_or_si128(_mm_slli_epi32(input, 16), _mm_srli_epi32(input, 16)); + _mm_store_si128(reinterpret_cast<__m128i*>(&dest[i]), output); + } + for (; i < count; ++i) { // handle residual elements + dest[i] = (src[i] >> 16) | (src[i] << 16); + } } void copy_and_swap_16_in_32_unaligned(void* dest_ptr, const void* src_ptr, From 0cc2b0fc9f12e222d4da00926e14c90c0bf891b3 Mon Sep 17 00:00:00 2001 From: DrChat Date: Wed, 14 Feb 2018 21:58:05 -0600 Subject: [PATCH 10/15] [Core] Protect the last 64kb of memory --- src/xenia/memory.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xenia/memory.cc b/src/xenia/memory.cc index 5461f027a..87f135682 100644 --- a/src/xenia/memory.cc +++ b/src/xenia/memory.cc @@ -171,12 +171,14 @@ bool Memory::Initialize() { heaps_.vE0000000.Initialize(virtual_membase_, 0xE0000000, 0x1FD00000, 4096, &heaps_.physical); - // Protect the first 64kb of memory. + // Protect the first and last 64kb of memory. heaps_.v00000000.AllocFixed( - 0x00000000, 64 * 1024, 64 * 1024, + 0x00000000, 0x10000, 0x10000, kMemoryAllocationReserve | kMemoryAllocationCommit, !FLAGS_protect_zero ? kMemoryProtectRead | kMemoryProtectWrite : kMemoryProtectNoAccess); + heaps_.physical.AllocFixed(0x1FFF0000, 0x10000, 0x10000, + kMemoryAllocationReserve, kMemoryProtectNoAccess); // GPU writeback. // 0xC... is physical, 0x7F... is virtual. We may need to overlay these. From ec501a32c66fcb083da2cff591c93c7d780779b7 Mon Sep 17 00:00:00 2001 From: DrChat Date: Wed, 14 Feb 2018 22:05:54 -0600 Subject: [PATCH 11/15] [JIT] Apply the same ZeroExtend/Truncate to rlwimix and rlwnmx --- src/xenia/cpu/ppc/ppc_emit_alu.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/cpu/ppc/ppc_emit_alu.cc b/src/xenia/cpu/ppc/ppc_emit_alu.cc index 9dbe68286..72780974f 100644 --- a/src/xenia/cpu/ppc/ppc_emit_alu.cc +++ b/src/xenia/cpu/ppc/ppc_emit_alu.cc @@ -960,7 +960,7 @@ int InstrEmit_rlwimix(PPCHIRBuilder& f, const InstrData& i) { // RA <- r&m | (RA)&¬m Value* v = f.LoadGPR(i.M.RT); // (x||x) - v = f.Or(f.Shl(v, 32), f.And(v, f.LoadConstantUint64(0xFFFFFFFF))); + v = f.Or(f.Shl(v, 32), f.ZeroExtend(f.Truncate(v, INT32_TYPE), INT64_TYPE)); if (i.M.SH) { v = f.RotateLeft(v, f.LoadConstantInt8(i.M.SH)); } @@ -1018,7 +1018,7 @@ int InstrEmit_rlwnmx(PPCHIRBuilder& f, const InstrData& i) { f.And(f.Truncate(f.LoadGPR(i.M.SH), INT8_TYPE), f.LoadConstantInt8(0x1F)); Value* v = f.LoadGPR(i.M.RT); // (x||x) - v = f.Or(f.Shl(v, 32), f.And(v, f.LoadConstantUint64(0xFFFFFFFF))); + v = f.Or(f.Shl(v, 32), f.ZeroExtend(f.Truncate(v, INT32_TYPE), INT64_TYPE)); v = f.RotateLeft(v, sh); v = f.And(v, f.LoadConstantUint64(XEMASK(i.M.MB + 32, i.M.ME + 32))); f.StoreGPR(i.M.RA, v); From abd21e5034f931ad6bdc58e8b58202bc2995995f Mon Sep 17 00:00:00 2001 From: DrChat Date: Thu, 15 Feb 2018 11:14:47 -0600 Subject: [PATCH 12/15] [Vulkan] Update the loader to SDK 1.0.68.0 --- third_party/vulkan/loader/loader.c | 726 ++- third_party/vulkan/loader/loader.h | 7 + third_party/vulkan/loader/premake5.lua | 3 + third_party/vulkan/loader/trampoline.c | 234 +- .../vulkan/loader/unknown_ext_chain_gas.asm | 873 +++ .../vulkan/loader/unknown_ext_chain_masm.asm | 883 +++ .../vulkan/loader/vk_loader_extensions.c | 354 +- .../vulkan/loader/vk_loader_extensions.h | 5 + .../vulkan/loader/vk_loader_platform.h | 63 +- third_party/vulkan/vk_icd.h | 2 +- third_party/vulkan/vk_layer.h | 39 + third_party/vulkan/vk_layer_dispatch_table.h | 30 +- third_party/vulkan/vk_sdk_platform.h | 25 +- third_party/vulkan/vulkan.h | 800 ++- third_party/vulkan/vulkan.hpp | 5606 +++++++++++++---- 15 files changed, 7919 insertions(+), 1731 deletions(-) create mode 100644 third_party/vulkan/loader/unknown_ext_chain_gas.asm create mode 100644 third_party/vulkan/loader/unknown_ext_chain_masm.asm diff --git a/third_party/vulkan/loader/loader.c b/third_party/vulkan/loader/loader.c index a3f4a5980..f1bc58976 100644 --- a/third_party/vulkan/loader/loader.c +++ b/third_party/vulkan/loader/loader.c @@ -1,8 +1,8 @@ /* * - * Copyright (c) 2014-2017 The Khronos Group Inc. - * Copyright (c) 2014-2017 Valve Corporation - * Copyright (c) 2014-2017 LunarG, Inc. + * Copyright (c) 2014-2018 The Khronos Group Inc. + * Copyright (c) 2014-2018 Valve Corporation + * Copyright (c) 2014-2018 LunarG, Inc. * Copyright (C) 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,6 +21,7 @@ * Author: Jon Ashburn * Author: Courtney Goeltzenleuchter * Author: Mark Young + * Author: Lenny Komow * */ @@ -47,6 +48,12 @@ #include "cJSON.h" #include "murmurhash.h" +#if defined(_WIN32) +#include +#include +#include +#endif + // This is a CMake generated file with #defines for any functions/includes // that it found present. This is currently necessary to properly determine // if secure_getenv or __secure_getenv are present @@ -400,7 +407,260 @@ VKAPI_ATTR VkResult VKAPI_CALL vkSetDeviceDispatch(VkDevice device, void *object return VK_SUCCESS; } -#if defined(WIN32) +#if defined(_WIN32) +// Find the list of registry files (names VulkanDriverName/VulkanDriverNameWow) in hkr. +// +// This function looks for filename in given device handle, filename is then added to return list +// function return true if filename was appended to reg_data list +// If error occures result is updated with failure reason +bool loaderGetDeviceRegistryEntry(const struct loader_instance *inst, char **reg_data, PDWORD total_size, DEVINST dev_id, LPCTSTR value_name, VkResult *result) +{ + HKEY hkrKey = INVALID_HANDLE_VALUE; + DWORD requiredSize, data_type; + char *manifest_path = NULL; + bool found = false; + + if (NULL == total_size || NULL == reg_data) { + *result = VK_ERROR_INITIALIZATION_FAILED; + return false; + } + + CONFIGRET status = CM_Open_DevNode_Key(dev_id, KEY_QUERY_VALUE, 0, RegDisposition_OpenExisting, &hkrKey, CM_REGISTRY_SOFTWARE); + if (status != CR_SUCCESS) { + loader_log(inst, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0, + "loaderGetDeviceRegistryEntry: Failed to open registry key for DeviceID(%d)", dev_id); + *result = VK_ERROR_INITIALIZATION_FAILED; + return false; + } + + // query value + LSTATUS ret = RegQueryValueEx( + hkrKey, + value_name, + NULL, + NULL, + NULL, + &requiredSize); + + if (ret != ERROR_SUCCESS) { + if (ret == ERROR_FILE_NOT_FOUND) { + loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0, + "loaderGetDeviceRegistryEntry: Device ID(%d) Does not contain a value for \"%s\"", dev_id, value_name); + } else { + loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0, + "loaderGetDeviceRegistryEntry: DeviceID(%d) Failed to obtain %s size", dev_id, value_name); + } + goto out; + } + + manifest_path = loader_instance_heap_alloc(inst, requiredSize, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); + if (manifest_path == NULL) { + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, + "loaderGetDeviceRegistryEntry: Failed to allocate space for DriverName."); + *result = VK_ERROR_OUT_OF_HOST_MEMORY; + goto out; + } + + ret = RegQueryValueEx( + hkrKey, + value_name, + NULL, + &data_type, + (BYTE *)manifest_path, + &requiredSize + ); + + if (ret != ERROR_SUCCESS) { + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, + "loaderGetDeviceRegistryEntry: DeviceID(%d) Failed to obtain %s", value_name); + + *result = VK_ERROR_INITIALIZATION_FAILED; + goto out; + } + + if (data_type != REG_SZ && data_type != REG_MULTI_SZ) { + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, + "loaderGetDeviceRegistryEntry: Invalid %s data type. Expected REG_SZ or REG_MULTI_SZ.", value_name); + *result = VK_ERROR_INITIALIZATION_FAILED; + goto out; + } + + if (NULL == *reg_data) { + *reg_data = loader_instance_heap_alloc(inst, *total_size, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); + if (NULL == *reg_data) { + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, + "loaderGetDeviceRegistryEntry: Failed to allocate space for registry data for key %s", manifest_path); + *result = VK_ERROR_OUT_OF_HOST_MEMORY; + goto out; + } + *reg_data[0] = '\0'; + } else if (strlen(*reg_data) + requiredSize + 1 > *total_size) { + void *new_ptr = loader_instance_heap_realloc(inst, *reg_data, *total_size, *total_size * 2, + VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); + if (NULL == new_ptr) { + loader_log( + inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, + "loaderGetDeviceRegistryEntry: Failed to reallocate space for registry value of size %d for key %s", + *total_size * 2, manifest_path); + *result = VK_ERROR_OUT_OF_HOST_MEMORY; + goto out; + } + *reg_data = new_ptr; + *total_size *= 2; + } + + for (char *curr_filename = manifest_path; curr_filename[0] != '\0'; curr_filename += strlen(curr_filename) + 1) { + if (strlen(*reg_data) == 0) { + (void)snprintf(*reg_data, requiredSize + 1, "%s", curr_filename); + } else { + (void)snprintf(*reg_data + strlen(*reg_data), requiredSize + 2, "%c%s", PATH_SEPARATOR, curr_filename); + } + loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0, "%s: Located json file \"%s\" from PnP registry: %s", __FUNCTION__, curr_filename, value_name); + + if (data_type == REG_SZ) { + break; + } + } + found = true; + +out: + if (manifest_path != NULL) { + loader_instance_heap_free(inst, manifest_path); + } + RegCloseKey(hkrKey); + return found; +} + +// Find the list of registry files (names VulkanDriverName/VulkanDriverNameWow) in hkr . +// +// This function looks for display devices and childish software components +// for a list of files which are added to a returned list (function return +// value). +// Function return is a string with a ';' separated list of filenames. +// Function return is NULL if no valid name/value pairs are found in the key, +// or the key is not found. +// +// *reg_data contains a string list of filenames as pointer. +// When done using the returned string list, the caller should free the pointer. +VkResult loaderGetDeviceRegistryFiles(const struct loader_instance *inst, char **reg_data, PDWORD reg_data_size, LPCTSTR value_name) { + static const char* softwareComponentGUID = "{5c4c3332-344d-483c-8739-259e934c9cc8}"; + static const char* displayGUID = "{4d36e968-e325-11ce-bfc1-08002be10318}"; + const ULONG flags = CM_GETIDLIST_FILTER_CLASS | CM_GETIDLIST_FILTER_PRESENT; + + char childGuid[MAX_GUID_STRING_LEN + 2]; // +2 for brackets {} + ULONG childGuidSize = sizeof(childGuid); + + DEVINST devID = 0, childID = 0; + char *pDeviceNames = NULL; + ULONG deviceNamesSize = 0; + VkResult result = VK_SUCCESS; + bool found = false; + + if (NULL == reg_data) { + result = VK_ERROR_INITIALIZATION_FAILED; + return result; + } + + // if after obtaining the DeviceNameSize, new device is added start over + do { + CM_Get_Device_ID_List_Size(&deviceNamesSize, displayGUID, flags); + + if (pDeviceNames != NULL) { + loader_instance_heap_free(inst, pDeviceNames); + } + + pDeviceNames = loader_instance_heap_alloc(inst, deviceNamesSize, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); + if (pDeviceNames == NULL) { + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, + "loaderGetDeviceRegistryFiles: Failed to allocate space for display device names."); + result = VK_ERROR_OUT_OF_HOST_MEMORY; + return result; + } + } while (CM_Get_Device_ID_List(displayGUID, pDeviceNames, deviceNamesSize, flags) == CR_BUFFER_SMALL); + + if (pDeviceNames) { + + for (char *deviceName = pDeviceNames; *deviceName; deviceName += strlen(deviceName) + 1) { + CONFIGRET status = CM_Locate_DevNode(&devID, deviceName, CM_LOCATE_DEVNODE_NORMAL); + if (CR_SUCCESS != status) { + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, + "loaderGetRegistryFiles: failed to open DevNode %s", deviceName); + continue; + } + ULONG ulStatus, ulProblem; + status = CM_Get_DevNode_Status(&ulStatus, &ulProblem, devID, 0); + + if (CR_SUCCESS != status) + { + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, + "loaderGetRegistryFiles: failed to probe device status %s", deviceName); + continue; + } + if ((ulStatus & DN_HAS_PROBLEM) && (ulProblem == CM_PROB_NEED_RESTART || ulProblem == DN_NEED_RESTART)) + { + loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0, + "loaderGetRegistryFiles: device %s is pending reboot, skipping ...", deviceName); + continue; + } + + loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0, + "loaderGetRegistryFiles: opening device %s", deviceName); + + if (loaderGetDeviceRegistryEntry(inst, reg_data, reg_data_size, devID, value_name, &result)) { + found = true; + continue; + } + else if (result == VK_ERROR_OUT_OF_HOST_MEMORY) { + break; + } + + status = CM_Get_Child(&childID, devID, 0); + if (status != CR_SUCCESS) { + loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0, + "loaderGetRegistryFiles: unable to open child-device error:%d", status); + continue; + } + + do { + char buffer[MAX_DEVICE_ID_LEN]; + CM_Get_Device_ID(childID, buffer, MAX_DEVICE_ID_LEN, 0); + + loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0, + "loaderGetRegistryFiles: Opening child device %d - %s", childID, buffer); + + status = CM_Get_DevNode_Registry_Property(childID, CM_DRP_CLASSGUID, NULL, &childGuid, &childGuidSize, 0); + if (status != CR_SUCCESS) { + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, + "loaderGetRegistryFiles: unable to obtain GUID for:%d error:%d", childID, status); + + result = VK_ERROR_INITIALIZATION_FAILED; + continue; + } + + if (strcmp(childGuid, softwareComponentGUID) != 0) { + loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, + "loaderGetRegistryFiles: GUID for %d is not SoftwareComponent skipping", childID); + continue; + } + + if (loaderGetDeviceRegistryEntry(inst, reg_data, reg_data_size, childID, value_name, &result)) { + found = true; + break; // check next-display-device + } + + } while (CM_Get_Sibling(&childID, childID, 0) == CR_SUCCESS); + } + + loader_instance_heap_free(inst, pDeviceNames); + } + + if (!found && result != VK_ERROR_OUT_OF_HOST_MEMORY) { + result = VK_ERROR_INITIALIZATION_FAILED; + } + + return result; +} + static char *loader_get_next_path(char *path); // Find the list of registry files (names within a key) in key "location". @@ -416,7 +676,7 @@ static char *loader_get_next_path(char *path); // // *reg_data contains a string list of filenames as pointer. // When done using the returned string list, the caller should free the pointer. -VkResult loaderGetRegistryFiles(const struct loader_instance *inst, char *location, bool use_secondary_hive, char **reg_data) { +VkResult loaderGetRegistryFiles(const struct loader_instance *inst, char *location, bool use_secondary_hive, char **reg_data, PDWORD reg_data_size) { LONG rtn_value; HKEY hive = DEFAULT_VK_REGISTRY_HIVE, key; DWORD access_flags; @@ -426,7 +686,6 @@ VkResult loaderGetRegistryFiles(const struct loader_instance *inst, char *locati DWORD idx; DWORD name_size = sizeof(name); DWORD value; - DWORD total_size = 4096; DWORD value_size = sizeof(value); VkResult result = VK_SUCCESS; bool found = false; @@ -446,27 +705,29 @@ VkResult loaderGetRegistryFiles(const struct loader_instance *inst, char *locati ERROR_SUCCESS) { if (value_size == sizeof(value) && value == 0) { if (NULL == *reg_data) { - *reg_data = loader_instance_heap_alloc(inst, total_size, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); + *reg_data = loader_instance_heap_alloc(inst, *reg_data_size, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (NULL == *reg_data) { loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loaderGetRegistryFiles: Failed to allocate space for registry data for key %s", name); + RegCloseKey(key); result = VK_ERROR_OUT_OF_HOST_MEMORY; goto out; } *reg_data[0] = '\0'; - } else if (strlen(*reg_data) + name_size + 1 > total_size) { - void *new_ptr = loader_instance_heap_realloc(inst, *reg_data, total_size, total_size * 2, + } else if (strlen(*reg_data) + name_size + 1 > *reg_data_size) { + void *new_ptr = loader_instance_heap_realloc(inst, *reg_data, *reg_data_size, *reg_data_size * 2, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (NULL == new_ptr) { loader_log( inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loaderGetRegistryFiles: Failed to reallocate space for registry value of size %d for key %s", - total_size * 2, name); + *reg_data_size * 2, name); + RegCloseKey(key); result = VK_ERROR_OUT_OF_HOST_MEMORY; goto out; } *reg_data = new_ptr; - total_size *= 2; + *reg_data_size *= 2; } loader_log( inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0, "Located json file \"%s\" from registry \"%s\\%s\"", name, @@ -480,6 +741,7 @@ VkResult loaderGetRegistryFiles(const struct loader_instance *inst, char *locati } name_size = 2048; } + RegCloseKey(key); } // Advance the location - if the next location is in the secondary hive, then reset the locations and advance the hive @@ -491,7 +753,7 @@ VkResult loaderGetRegistryFiles(const struct loader_instance *inst, char *locati } } - if (!found) { + if (!found && result != VK_ERROR_OUT_OF_HOST_MEMORY) { result = VK_ERROR_INITIALIZATION_FAILED; } @@ -643,8 +905,9 @@ static struct loader_layer_properties *loader_get_next_layer_property(const stru // Remove all layer properties entries from the list void loader_delete_layer_properties(const struct loader_instance *inst, struct loader_layer_list *layer_list) { - uint32_t i, j; + uint32_t i, j, k; struct loader_device_extension_list *dev_ext_list; + struct loader_dev_ext_props *ext_props; if (!layer_list) return; for (i = 0; i < layer_list->count; i++) { @@ -654,11 +917,16 @@ void loader_delete_layer_properties(const struct loader_instance *inst, struct l } loader_destroy_generic_list(inst, (struct loader_generic_list *)&layer_list->list[i].instance_extension_list); dev_ext_list = &layer_list->list[i].device_extension_list; - if (dev_ext_list->capacity > 0 && NULL != dev_ext_list->list && dev_ext_list->list->entrypoint_count > 0) { - for (j = 0; j < dev_ext_list->list->entrypoint_count; j++) { - loader_instance_heap_free(inst, dev_ext_list->list->entrypoints[j]); + if (dev_ext_list->capacity > 0 && NULL != dev_ext_list->list) { + for (j = 0; j < dev_ext_list->count; j++) { + ext_props = &dev_ext_list->list[j]; + if (ext_props->entrypoint_count > 0) { + for (k = 0; k < ext_props->entrypoint_count; k++) { + loader_instance_heap_free(inst, ext_props->entrypoints[k]); + } + loader_instance_heap_free(inst, ext_props->entrypoints); + } } - loader_instance_heap_free(inst, dev_ext_list->list->entrypoints); } loader_destroy_generic_list(inst, (struct loader_generic_list *)dev_ext_list); } @@ -1077,32 +1345,10 @@ VkResult loader_add_to_layer_list(const struct loader_instance *inst, struct loa static void loader_add_implicit_layer(const struct loader_instance *inst, const struct loader_layer_properties *prop, struct loader_layer_list *target_list, struct loader_layer_list *expanded_target_list, const struct loader_layer_list *source_list) { - bool enable = false; - char *env_value = NULL; - - // if no enable_environment variable is specified, this implicit layer - // should always be enabled. Otherwise check if the variable is set - if (prop->enable_env_var.name[0] == 0) { - enable = true; - } else { - env_value = loader_secure_getenv(prop->enable_env_var.name, inst); - if (env_value && !strcmp(prop->enable_env_var.value, env_value)) enable = true; - loader_free_getenv(env_value, inst); - } - - // disable_environment has priority, i.e. if both enable and disable - // environment variables are set, the layer is disabled. Implicit - // layers are required to have a disable_environment variables - env_value = loader_secure_getenv(prop->disable_env_var.name, inst); - if (env_value) { - enable = false; - } - loader_free_getenv(env_value, inst); - + bool enable = loader_is_implicit_layer_enabled(inst, prop); if (enable) { - // If not a meta-layer, simply add it. if (0 == (prop->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER)) { - if (!has_vk_layer_property(&prop->info, target_list)) { + if (NULL != target_list && !has_vk_layer_property(&prop->info, target_list)) { loader_add_to_layer_list(inst, target_list, 1, prop); } if (NULL != expanded_target_list && !has_vk_layer_property(&prop->info, expanded_target_list)) { @@ -1136,10 +1382,6 @@ bool loader_add_meta_layer(const struct loader_instance *inst, const struct load if (0 == (search_prop->type_flags & VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER)) { loader_add_implicit_layer(inst, search_prop, target_list, expanded_target_list, source_list); } else { - // Otherwise, just make sure it hasn't already been added to either list before we add it - if (!has_vk_layer_property(&search_prop->info, target_list)) { - loader_add_to_layer_list(inst, target_list, 1, search_prop); - } if (NULL != expanded_target_list && !has_vk_layer_property(&search_prop->info, expanded_target_list)) { loader_add_to_layer_list(inst, expanded_target_list, 1, search_prop); } @@ -1153,6 +1395,12 @@ bool loader_add_meta_layer(const struct loader_instance *inst, const struct load found = false; } } + + // Add this layer to the overall target list (not the expanded one) + if (found && !has_vk_layer_property(&prop->info, target_list)) { + loader_add_to_layer_list(inst, target_list, 1, prop); + } + return found; } @@ -1168,11 +1416,11 @@ void loader_find_layer_name_add_list(const struct loader_instance *inst, const c if (0 == strcmp(source_prop->info.layerName, name) && (source_prop->type_flags & type_flags) == type_flags) { // If not a meta-layer, simply add it. if (0 == (source_prop->type_flags & VK_LAYER_TYPE_FLAG_META_LAYER)) { - if (!has_vk_layer_property(&source_prop->info, target_list) && + if (NULL != target_list && !has_vk_layer_property(&source_prop->info, target_list) && VK_SUCCESS == loader_add_to_layer_list(inst, target_list, 1, source_prop)) { found = true; } - if (!has_vk_layer_property(&source_prop->info, expanded_target_list) && + if (NULL != expanded_target_list && !has_vk_layer_property(&source_prop->info, expanded_target_list) && VK_SUCCESS == loader_add_to_layer_list(inst, expanded_target_list, 1, source_prop)) { found = true; } @@ -1679,6 +1927,12 @@ struct loader_manifest_files { char **filename_list; }; +void loader_release() { + // release mutexs + loader_platform_thread_delete_mutex(&loader_lock); + loader_platform_thread_delete_mutex(&loader_json_lock); +} + // Get next file or dirname given a string list or registry key path // // \returns @@ -1891,9 +2145,8 @@ static bool loader_add_legacy_std_val_layer(const struct loader_instance *inst, bool success = true; struct loader_layer_properties *props = loader_get_next_layer_property(inst, layer_instance_list); const char std_validation_names[6][VK_MAX_EXTENSION_NAME_SIZE] = { - "VK_LAYER_GOOGLE_threading", "VK_LAYER_LUNARG_parameter_validation", - "VK_LAYER_LUNARG_object_tracker", "VK_LAYER_LUNARG_core_validation", - "VK_LAYER_GOOGLE_unique_objects"}; + "VK_LAYER_GOOGLE_threading", "VK_LAYER_LUNARG_parameter_validation", "VK_LAYER_LUNARG_object_tracker", + "VK_LAYER_LUNARG_core_validation", "VK_LAYER_GOOGLE_unique_objects"}; uint32_t layer_count = sizeof(std_validation_names) / sizeof(std_validation_names[0]); loader_log(inst, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, @@ -2062,6 +2315,28 @@ typedef struct { uint16_t patch; } layer_json_version; +static inline bool is_valid_layer_json_version(const layer_json_version *layer_json) { + // Supported versions are: 1.0.0, 1.0.1, 1.1.0, 1.1.1, and 1.1.2. + if ((layer_json->major == 1 && layer_json->minor == 1 && layer_json->patch < 3) || + (layer_json->major == 1 && layer_json->minor == 0 && layer_json->patch < 2)) { + return true; + } + return false; +} + +static inline bool layer_json_supports_layers_tag(const layer_json_version *layer_json) { + // Supported versions started in 1.0.1, so anything newer + if ((layer_json->major > 1 || layer_json->minor > 0 || layer_json->patch > 1)) { + return true; + } + return false; +} + +static inline bool layer_json_supports_pre_instance_tag(const layer_json_version *layer_json) { + // Supported versions started in 1.1.2, so anything newer + return layer_json->major > 1 || layer_json->minor > 1 || (layer_json->minor == 1 && layer_json->patch > 1); +} + static VkResult loader_read_json_layer(const struct loader_instance *inst, struct loader_layer_list *layer_instance_list, cJSON *layer_node, layer_json_version version, cJSON *item, cJSON *disable_environment, bool is_implicit, char *filename) { @@ -2437,6 +2712,40 @@ static VkResult loader_read_json_layer(const struct loader_instance *inst, struc } } + // Read in the pre-instance stuff + cJSON *pre_instance = cJSON_GetObjectItem(layer_node, "pre_instance_functions"); + if (pre_instance) { + if (!layer_json_supports_pre_instance_tag(&version)) { + loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, + "Found pre_instance_functions section in layer from \"%s\". " + "This section is only valid in manifest version 1.1.2 or later. The section will be ignored", + filename); + } else if (!is_implicit) { + loader_log(inst, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0, + "Found pre_instance_functions section in explicit layer from " + "\"%s\". This section is only valid in implicit layers. The section will be ignored", + filename); + } else { + cJSON *inst_ext_json = cJSON_GetObjectItem(pre_instance, "vkEnumerateInstanceExtensionProperties"); + if (inst_ext_json) { + char *inst_ext_name = cJSON_Print(inst_ext_json); + size_t len = strlen(inst_ext_name) >= MAX_STRING_SIZE ? MAX_STRING_SIZE - 3 : strlen(inst_ext_name) - 2; + strncpy(props->pre_instance_functions.enumerate_instance_extension_properties, inst_ext_name + 1, len); + props->pre_instance_functions.enumerate_instance_extension_properties[len] = '\0'; + cJSON_Free(inst_ext_name); + } + + cJSON *inst_layer_json = cJSON_GetObjectItem(pre_instance, "vkEnumerateInstanceLayerProperties"); + if (inst_layer_json) { + char *inst_layer_name = cJSON_Print(inst_layer_json); + size_t len = strlen(inst_layer_name) >= MAX_STRING_SIZE ? MAX_STRING_SIZE - 3 : strlen(inst_layer_name) - 2; + strncpy(props->pre_instance_functions.enumerate_instance_layer_properties, inst_layer_name + 1, len); + props->pre_instance_functions.enumerate_instance_layer_properties[len] = '\0'; + cJSON_Free(inst_layer_name); + } + } + } + result = VK_SUCCESS; out: @@ -2455,23 +2764,6 @@ out: return result; } -static inline bool is_valid_layer_json_version(const layer_json_version *layer_json) { - // Supported versions are: 1.0.0, 1.0.1, and 1.1.0. - if ((layer_json->major == 1 && layer_json->minor == 1 && layer_json->patch < 2) || - (layer_json->major == 1 && layer_json->minor == 0 && layer_json->patch < 2)) { - return true; - } - return false; -} - -static inline bool layer_json_supports_layers_tag(const layer_json_version *layer_json) { - // Supported versions started in 1.0.1, so anything newer - if ((layer_json->major > 1 || layer_json->minor > 0 || layer_json->patch > 1)) { - return true; - } - return false; -} - // Given a cJSON struct (json) of the top level JSON object from layer manifest // file, add entry to the layer_list. Fill out the layer_properties in this list // entry from the input cJSON object. @@ -2767,14 +3059,29 @@ static VkResult loader_get_manifest_files(const struct loader_instance *inst, co *loc_write = '\0'; #if defined(_WIN32) - VkResult reg_result = loaderGetRegistryFiles(inst, loc, is_layer, ®); - if (VK_SUCCESS != reg_result || NULL == reg) { + VkResult regHKR_result = VK_SUCCESS; + + DWORD reg_size = 4096; + + if (!strncmp(loc, DEFAULT_VK_DRIVERS_INFO, sizeof(DEFAULT_VK_DRIVERS_INFO))) { + regHKR_result = loaderGetDeviceRegistryFiles(inst, ®, ®_size, LoaderPnpDriverRegistry()); + } else if (!strncmp(loc, DEFAULT_VK_ELAYERS_INFO, sizeof(DEFAULT_VK_ELAYERS_INFO))) { + regHKR_result = loaderGetDeviceRegistryFiles(inst, ®, ®_size, LoaderPnpELayerRegistry()); + } else if (!strncmp(loc, DEFAULT_VK_ILAYERS_INFO, sizeof(DEFAULT_VK_ILAYERS_INFO))) { + regHKR_result = loaderGetDeviceRegistryFiles(inst, ®, ®_size, LoaderPnpILayerRegistry()); + } + + VkResult reg_result = loaderGetRegistryFiles(inst, loc, is_layer, ®, ®_size); + + if ((VK_SUCCESS != reg_result && VK_SUCCESS != regHKR_result) || NULL == reg) { if (!is_layer) { loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loader_get_manifest_files: Registry lookup failed " "to get ICD manifest files. Possibly missing Vulkan" " driver?"); - if (VK_SUCCESS == reg_result || VK_ERROR_OUT_OF_HOST_MEMORY == reg_result) { + if (VK_SUCCESS == regHKR_result || VK_ERROR_OUT_OF_HOST_MEMORY == regHKR_result) { + res = regHKR_result; + } else if (VK_SUCCESS == reg_result || VK_ERROR_OUT_OF_HOST_MEMORY == reg_result) { res = reg_result; } else { res = VK_ERROR_INCOMPATIBLE_DRIVER; @@ -2853,7 +3160,16 @@ static VkResult loader_get_manifest_files(const struct loader_instance *inst, co // Look for files ending with ".json" suffix uint32_t nlen = (uint32_t)strlen(name); const char *suf = name + nlen - 5; - if ((nlen > 5) && !strncmp(suf, ".json", 5)) { + + // Check if the file is already present + bool file_already_loaded = false; + for (uint32_t i = 0; i < out_files->count; ++i) { + if (!strcmp(out_files->filename_list[i], name)) { + file_already_loaded = true; + } + } + + if (!file_already_loaded && (nlen > 5) && !strncmp(suf, ".json", 5)) { if (out_files->count == 0) { out_files->filename_list = loader_instance_heap_alloc(inst, alloced_count * sizeof(char *), VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); @@ -2888,6 +3204,9 @@ static VkResult loader_get_manifest_files(const struct loader_instance *inst, co } strcpy(out_files->filename_list[out_files->count], name); out_files->count++; + } else if(file_already_loaded) { + loader_log(inst, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0, + "Skipping manifest file %s - The file has already been read once", name); } else if (!list_is_dirs) { loader_log(inst, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0, "Skipping manifest file %s, file name must end in .json", name); @@ -3402,6 +3721,31 @@ void loader_implicit_layer_scan(const struct loader_instance *inst, struct loade loader_platform_thread_unlock_mutex(&loader_json_lock); } +// Check if an implicit layer should be enabled. +bool loader_is_implicit_layer_enabled(const struct loader_instance *inst, const struct loader_layer_properties *prop) { + bool enable = false; + char *env_value = NULL; + + // if no enable_environment variable is specified, this implicit layer + // should always be enabled. Otherwise check if the variable is set + if (prop->enable_env_var.name[0] == 0) { + enable = true; + } else { + env_value = loader_secure_getenv(prop->enable_env_var.name, inst); + if (env_value && !strcmp(prop->enable_env_var.value, env_value)) enable = true; + loader_free_getenv(env_value, inst); + } + + // disable_environment has priority, i.e. if both enable and disable + // environment variables are set, the layer is disabled. Implicit + // layers are required to have a disable_environment variables + env_value = loader_secure_getenv(prop->disable_env_var.name, inst); + if (env_value && !strcmp(prop->disable_env_var.value, env_value)) enable = false; + loader_free_getenv(env_value, inst); + + return enable; +} + static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL loader_gpdpa_instance_internal(VkInstance inst, const char *pName) { // inst is not wrapped if (inst == VK_NULL_HANDLE) { @@ -3705,7 +4049,7 @@ void *loader_dev_ext_gpa(struct loader_instance *inst, const char *funcName) { // Check if funcName is supported in either ICDs or a layer library if (!loader_check_icds_for_dev_ext_address(inst, funcName) && - !loader_check_layer_list_for_dev_ext_address(&inst->instance_layer_list, funcName)) { + !loader_check_layer_list_for_dev_ext_address(&inst->app_activated_layer_list, funcName)) { // if support found in layers continue on return NULL; } @@ -4005,7 +4349,7 @@ static void loader_add_implicit_layers(const struct loader_instance *inst, struc // Get the layer name(s) from the env_name environment variable. If layer is found in // search_list then add it to layer_list. But only add it to layer_list if type_flags matches. -static void loader_add_env_layers(struct loader_instance *inst, const enum layer_type_flags type_flags, const char *env_name, +static void loader_add_env_layers(const struct loader_instance *inst, const enum layer_type_flags type_flags, const char *env_name, struct loader_layer_list *target_list, struct loader_layer_list *expanded_target_list, const struct loader_layer_list *source_list) { char *next, *name; @@ -4058,7 +4402,7 @@ VkResult loader_enable_instance_layers(struct loader_instance *inst, const VkIns loader_add_implicit_layers(inst, &inst->app_activated_layer_list, &inst->expanded_activated_layer_list, instance_layers); // Add any layers specified via environment variable next - loader_add_env_layers(inst, VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER, "VK_INSTANCE_LAYERS", &inst->app_activated_layer_list, + loader_add_env_layers(inst, VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER, ENABLED_LAYERS_ENV, &inst->app_activated_layer_list, &inst->expanded_activated_layer_list, instance_layers); // Add layers specified by the application @@ -4425,7 +4769,7 @@ VkResult loader_create_device_chain(const struct loader_physical_device_tramp *p nextGIPA = fpGIPA; nextGDPA = fpGDPA; - loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0, "Insert device layer %s (%s)", layer_prop->info.layerName, + loader_log(inst, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, 0, "Inserted device layer %s (%s)", layer_prop->info.layerName, layer_prop->lib_name); activated_layers++; @@ -4479,8 +4823,7 @@ VkResult loader_validate_layers(const struct loader_instance *inst, const uint32 prop = loader_get_layer_property(ppEnabledLayerNames[i], list); if (NULL == prop) { loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, - "loader_validate_layers: Layer %d does not exist in the list of available layers", - i); + "loader_validate_layers: Layer %d does not exist in the list of available layers", i); return VK_ERROR_LAYER_NOT_PRESENT; } } @@ -4491,9 +4834,32 @@ VkResult loader_validate_instance_extensions(const struct loader_instance *inst, const struct loader_layer_list *instance_layers, const VkInstanceCreateInfo *pCreateInfo) { VkExtensionProperties *extension_prop; - struct loader_layer_properties *layer_prop; char *env_value; bool check_if_known = true; + VkResult res = VK_SUCCESS; + + struct loader_layer_list active_layers; + struct loader_layer_list expanded_layers; + memset(&active_layers, 0, sizeof(active_layers)); + memset(&expanded_layers, 0, sizeof(expanded_layers)); + if (!loader_init_layer_list(inst, &active_layers)) { + res = VK_ERROR_OUT_OF_HOST_MEMORY; + goto out; + } + if (!loader_init_layer_list(inst, &expanded_layers)) { + res = VK_ERROR_OUT_OF_HOST_MEMORY; + goto out; + } + + // Build the lists of active layers (including metalayers) and expanded layers (with metalayers resolved to their components) + loader_add_implicit_layers(inst, &active_layers, &expanded_layers, instance_layers); + loader_add_env_layers(inst, VK_LAYER_TYPE_FLAG_EXPLICIT_LAYER, ENABLED_LAYERS_ENV, &active_layers, &expanded_layers, + instance_layers); + res = loader_add_layer_names_to_list(inst, &active_layers, &expanded_layers, pCreateInfo->enabledLayerCount, + pCreateInfo->ppEnabledLayerNames, instance_layers); + if (VK_SUCCESS != res) { + goto out; + } for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) { VkStringErrorFlags result = vk_string_validate(MaxLoaderStringLength, pCreateInfo->ppEnabledExtensionNames[i]); @@ -4501,7 +4867,8 @@ VkResult loader_validate_instance_extensions(const struct loader_instance *inst, loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loader_validate_instance_extensions: Instance ppEnabledExtensionNames contains " "string that is too long or is badly formed"); - return VK_ERROR_EXTENSION_NOT_PRESENT; + res = VK_ERROR_EXTENSION_NOT_PRESENT; + goto out; } // Check if a user wants to disable the instance extension filtering behavior @@ -4526,7 +4893,8 @@ VkResult loader_validate_instance_extensions(const struct loader_instance *inst, loader_log(inst, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, "loader_validate_instance_extensions: Extension %s not found in list of known instance extensions.", pCreateInfo->ppEnabledExtensionNames[i]); - return VK_ERROR_EXTENSION_NOT_PRESENT; + res = VK_ERROR_EXTENSION_NOT_PRESENT; + goto out; } } @@ -4538,19 +4906,10 @@ VkResult loader_validate_instance_extensions(const struct loader_instance *inst, extension_prop = NULL; - // Not in global list, search layer extension lists - for (uint32_t j = 0; j < pCreateInfo->enabledLayerCount; j++) { - layer_prop = loader_get_layer_property(pCreateInfo->ppEnabledLayerNames[j], instance_layers); - if (NULL == layer_prop) { - // Should NOT get here, loader_validate_layers should have already filtered this case out. - continue; - } - - extension_prop = get_extension_property(pCreateInfo->ppEnabledExtensionNames[i], &layer_prop->instance_extension_list); - if (extension_prop) { - // Found the extension in one of the layers enabled by the app. - break; - } + // Not in global list, search expanded layer extension list + for (uint32_t j = 0; NULL == extension_prop && j < expanded_layers.count; ++j) { + extension_prop = + get_extension_property(pCreateInfo->ppEnabledExtensionNames[i], &expanded_layers.list[j].instance_extension_list); } if (!extension_prop) { @@ -4559,10 +4918,15 @@ VkResult loader_validate_instance_extensions(const struct loader_instance *inst, "loader_validate_instance_extensions: Instance extension %s not supported by available ICDs or enabled " "layers.", pCreateInfo->ppEnabledExtensionNames[i]); - return VK_ERROR_EXTENSION_NOT_PRESENT; + res = VK_ERROR_EXTENSION_NOT_PRESENT; + goto out; } } - return VK_SUCCESS; + +out: + loader_destroy_layer_list(inst, NULL, &active_layers); + loader_destroy_layer_list(inst, NULL, &expanded_layers); + return res; } VkResult loader_validate_device_extensions(struct loader_physical_device_tramp *phys_dev, @@ -4645,12 +5009,14 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateInstance(const VkInstanceCreateI icd_term = loader_icd_add(ptr_instance, &ptr_instance->icd_tramp_list.scanned_list[i]); if (NULL == icd_term) { loader_log(ptr_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, - "terminator_CreateInstance: Failed to add ICD %d to ICD trampoline list.", - i); + "terminator_CreateInstance: Failed to add ICD %d to ICD trampoline list.", i); res = VK_ERROR_OUT_OF_HOST_MEMORY; goto out; } + // If any error happens after here, we need to remove the ICD from the list, + // because we've already added it, but haven't validated it + icd_create_info.enabledExtensionCount = 0; struct loader_extension_list icd_exts; @@ -4717,6 +5083,9 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateInstance(const VkInstanceCreateI loader_log(ptr_instance, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0, "terminator_CreateInstance: Failed to CreateInstance and find " "entrypoints with ICD. Skipping ICD."); + ptr_instance->icd_terms = icd_term->next; + icd_term->next = NULL; + loader_icd_destroy(ptr_instance, icd_term, pAllocator); continue; } @@ -4811,6 +5180,9 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDevice(VkPhysicalDevice physical PFN_vkCreateDevice fpCreateDevice = icd_term->dispatch.CreateDevice; struct loader_extension_list icd_exts; + struct VkStructureHeader *caller_dgci_container = NULL; + VkDeviceGroupDeviceCreateInfoKHX *caller_dgci = NULL; + dev->phys_dev_term = phys_dev_term; icd_exts.list = NULL; @@ -4867,7 +5239,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDevice(VkPhysicalDevice physical filtered_extension_names[localCreateInfo.enabledExtensionCount] = (char *)extension_name; localCreateInfo.enabledExtensionCount++; } else { - loader_log(icd_term->this_instance, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0, + loader_log(icd_term->this_instance, VK_DEBUG_REPORT_DEBUG_BIT_EXT, 0, "vkCreateDevice extension %s not available for " "devices associated with ICD %s", extension_name, icd_term->scanned_icd->lib_name); @@ -4904,6 +5276,10 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDevice(VkPhysicalDevice physical } temp_struct->pPhysicalDevices = phys_dev_array; + // Keep track of pointers to restore pNext chain before returning + caller_dgci_container = pPrev; + caller_dgci = cur_struct; + // Replace the old struct in the pNext chain with this one. pPrev->pNext = (const void *)temp_struct; pNext = (struct VkStructureHeader *)(temp_struct); @@ -4995,6 +5371,12 @@ out: loader_destroy_generic_list(icd_term->this_instance, (struct loader_generic_list *)&icd_exts); } + // Restore pNext pointer to old VkDeviceGroupDeviceCreateInfoKHX + // in the chain to maintain consistency for the caller. + if (caller_dgci_container != NULL) { + caller_dgci_container->pNext = caller_dgci; + } + return res; } @@ -5533,3 +5915,151 @@ VkStringErrorFlags vk_string_validate(const int max_length, const char *utf8) { } return result; } + +VKAPI_ATTR VkResult VKAPI_CALL +terminator_EnumerateInstanceExtensionProperties(const VkEnumerateInstanceExtensionPropertiesChain *chain, const char *pLayerName, + uint32_t *pPropertyCount, VkExtensionProperties *pProperties) { + struct loader_extension_list *global_ext_list = NULL; + struct loader_layer_list instance_layers; + struct loader_extension_list local_ext_list; + struct loader_icd_tramp_list icd_tramp_list; + uint32_t copy_size; + VkResult res = VK_SUCCESS; + + // tls_instance = NULL; + memset(&local_ext_list, 0, sizeof(local_ext_list)); + memset(&instance_layers, 0, sizeof(instance_layers)); + + // Get layer libraries if needed + if (pLayerName && strlen(pLayerName) != 0) { + if (vk_string_validate(MaxLoaderStringLength, pLayerName) != VK_STRING_ERROR_NONE) { + assert(VK_FALSE && + "vkEnumerateInstanceExtensionProperties: " + "pLayerName is too long or is badly formed"); + res = VK_ERROR_EXTENSION_NOT_PRESENT; + goto out; + } + + loader_layer_scan(NULL, &instance_layers); + for (uint32_t i = 0; i < instance_layers.count; i++) { + struct loader_layer_properties *props = &instance_layers.list[i]; + if (strcmp(props->info.layerName, pLayerName) == 0) { + global_ext_list = &props->instance_extension_list; + break; + } + } + } else { + // Scan/discover all ICD libraries + memset(&icd_tramp_list, 0, sizeof(icd_tramp_list)); + res = loader_icd_scan(NULL, &icd_tramp_list); + if (VK_SUCCESS != res) { + goto out; + } + // Get extensions from all ICD's, merge so no duplicates + res = loader_get_icd_loader_instance_extensions(NULL, &icd_tramp_list, &local_ext_list); + if (VK_SUCCESS != res) { + goto out; + } + loader_scanned_icd_clear(NULL, &icd_tramp_list); + + // Append enabled implicit layers. + loader_implicit_layer_scan(NULL, &instance_layers); + for (uint32_t i = 0; i < instance_layers.count; i++) { + if (!loader_is_implicit_layer_enabled(NULL, &instance_layers.list[i])) { + continue; + } + struct loader_extension_list *ext_list = &instance_layers.list[i].instance_extension_list; + loader_add_to_ext_list(NULL, &local_ext_list, ext_list->count, ext_list->list); + } + + global_ext_list = &local_ext_list; + } + + if (global_ext_list == NULL) { + res = VK_ERROR_LAYER_NOT_PRESENT; + goto out; + } + + if (pProperties == NULL) { + *pPropertyCount = global_ext_list->count; + goto out; + } + + copy_size = *pPropertyCount < global_ext_list->count ? *pPropertyCount : global_ext_list->count; + for (uint32_t i = 0; i < copy_size; i++) { + memcpy(&pProperties[i], &global_ext_list->list[i], sizeof(VkExtensionProperties)); + } + *pPropertyCount = copy_size; + + if (copy_size < global_ext_list->count) { + res = VK_INCOMPLETE; + goto out; + } + +out: + + loader_destroy_generic_list(NULL, (struct loader_generic_list *)&local_ext_list); + loader_delete_layer_properties(NULL, &instance_layers); + return res; +} + +VKAPI_ATTR VkResult VKAPI_CALL terminator_EnumerateInstanceLayerProperties(const VkEnumerateInstanceLayerPropertiesChain *chain, + uint32_t *pPropertyCount, + VkLayerProperties *pProperties) { + VkResult result = VK_SUCCESS; + struct loader_layer_list instance_layer_list; + tls_instance = NULL; + + LOADER_PLATFORM_THREAD_ONCE(&once_init, loader_initialize); + + uint32_t copy_size; + + // Get layer libraries + memset(&instance_layer_list, 0, sizeof(instance_layer_list)); + loader_layer_scan(NULL, &instance_layer_list); + + if (pProperties == NULL) { + *pPropertyCount = instance_layer_list.count; + goto out; + } + + copy_size = (*pPropertyCount < instance_layer_list.count) ? *pPropertyCount : instance_layer_list.count; + for (uint32_t i = 0; i < copy_size; i++) { + memcpy(&pProperties[i], &instance_layer_list.list[i].info, sizeof(VkLayerProperties)); + } + + *pPropertyCount = copy_size; + + if (copy_size < instance_layer_list.count) { + result = VK_INCOMPLETE; + goto out; + } + +out: + + loader_delete_layer_properties(NULL, &instance_layer_list); + return result; +} + +#if defined(_WIN32) && defined(LOADER_DYNAMIC_LIB) +BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) { + switch (reason) { + case DLL_PROCESS_ATTACH: + loader_initialize(); + break; + case DLL_PROCESS_DETACH: + if (NULL == reserved) { + loader_release(); + } + break; + default: + // Do nothing + break; + } + return TRUE; +} +#elif !defined(_WIN32) +__attribute__((constructor)) void loader_init_library() { loader_initialize(); } + +__attribute__((destructor)) void loader_free_library() { loader_release(); } +#endif diff --git a/third_party/vulkan/loader/loader.h b/third_party/vulkan/loader/loader.h index 3a80657d9..58dfefedc 100644 --- a/third_party/vulkan/loader/loader.h +++ b/third_party/vulkan/loader/loader.h @@ -137,6 +137,10 @@ struct loader_layer_properties { struct loader_name_value enable_env_var; uint32_t num_component_layers; char (*component_layer_names)[MAX_STRING_SIZE]; + struct { + char enumerate_instance_extension_properties[MAX_STRING_SIZE]; + char enumerate_instance_layer_properties[MAX_STRING_SIZE]; + } pre_instance_functions; }; struct loader_layer_list { @@ -375,7 +379,9 @@ static inline void loader_init_dispatch(void *obj, const void *data) { // Global variables used across files extern struct loader_struct loader; extern THREAD_LOCAL_DECL struct loader_instance *tls_instance; +#if defined(_WIN32) && !defined(LOADER_DYNAMIC_LIB) extern LOADER_PLATFORM_THREAD_ONCE_DEFINITION(once_init); +#endif extern loader_platform_thread_mutex loader_lock; extern loader_platform_thread_mutex loader_json_lock; @@ -437,6 +443,7 @@ void loader_scanned_icd_clear(const struct loader_instance *inst, struct loader_ VkResult loader_icd_scan(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list); void loader_layer_scan(const struct loader_instance *inst, struct loader_layer_list *instance_layers); void loader_implicit_layer_scan(const struct loader_instance *inst, struct loader_layer_list *instance_layers); +bool loader_is_implicit_layer_enabled(const struct loader_instance *inst, const struct loader_layer_properties *prop); VkResult loader_get_icd_loader_instance_extensions(const struct loader_instance *inst, struct loader_icd_tramp_list *icd_tramp_list, struct loader_extension_list *inst_exts); struct loader_icd_term *loader_get_icd_and_device(const VkDevice device, struct loader_device **found_dev, uint32_t *icd_index); diff --git a/third_party/vulkan/loader/premake5.lua b/third_party/vulkan/loader/premake5.lua index e653b278b..112936c27 100644 --- a/third_party/vulkan/loader/premake5.lua +++ b/third_party/vulkan/loader/premake5.lua @@ -26,6 +26,9 @@ project("vulkan-loader") defines({ "VK_USE_PLATFORM_WIN32_KHR", }) + links({ + "Cfgmgr32" + }) filter("platforms:not Windows") removefiles("dirent_on_windows.c") filter("platforms:Linux") diff --git a/third_party/vulkan/loader/trampoline.c b/third_party/vulkan/loader/trampoline.c index 1d6105d95..607085c69 100644 --- a/third_party/vulkan/loader/trampoline.c +++ b/third_party/vulkan/loader/trampoline.c @@ -46,13 +46,8 @@ LOADER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkI void *addr; addr = globalGetProcAddr(pName); - if (instance == VK_NULL_HANDLE) { - // Get entrypoint addresses that are global (no dispatchable object) - + if (instance == VK_NULL_HANDLE || addr != NULL) { return addr; - } else { - // If a global entrypoint return NULL - if (addr) return NULL; } struct loader_instance *ptr_instance = loader_get_instance(instance); @@ -99,123 +94,178 @@ LOADER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDev LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) { - struct loader_extension_list *global_ext_list = NULL; - struct loader_layer_list instance_layers; - struct loader_extension_list local_ext_list; - struct loader_icd_tramp_list icd_tramp_list; - uint32_t copy_size; - VkResult res = VK_SUCCESS; - tls_instance = NULL; - memset(&local_ext_list, 0, sizeof(local_ext_list)); - memset(&instance_layers, 0, sizeof(instance_layers)); - loader_platform_thread_once(&once_init, loader_initialize); + LOADER_PLATFORM_THREAD_ONCE(&once_init, loader_initialize); - // Get layer libraries if needed - if (pLayerName && strlen(pLayerName) != 0) { - if (vk_string_validate(MaxLoaderStringLength, pLayerName) != VK_STRING_ERROR_NONE) { - assert(VK_FALSE && - "vkEnumerateInstanceExtensionProperties: " - "pLayerName is too long or is badly formed"); - res = VK_ERROR_EXTENSION_NOT_PRESENT; - goto out; + // We know we need to call at least the terminator + VkResult res = VK_SUCCESS; + VkEnumerateInstanceExtensionPropertiesChain chain_tail = { + .header = + { + .type = VK_CHAIN_TYPE_ENUMERATE_INSTANCE_EXTENSION_PROPERTIES, + .version = VK_CURRENT_CHAIN_VERSION, + .size = sizeof(chain_tail), + }, + .pfnNextLayer = &terminator_EnumerateInstanceExtensionProperties, + .pNextLink = NULL, + }; + VkEnumerateInstanceExtensionPropertiesChain *chain_head = &chain_tail; + + // Get the implicit layers + struct loader_layer_list layers; + memset(&layers, 0, sizeof(layers)); + loader_implicit_layer_scan(NULL, &layers); + + // We'll need to save the dl handles so we can close them later + loader_platform_dl_handle *libs = malloc(sizeof(loader_platform_dl_handle) * layers.count); + if (libs == NULL) { + return VK_ERROR_OUT_OF_HOST_MEMORY; + } + size_t lib_count = 0; + + // Prepend layers onto the chain if they implment this entry point + for (uint32_t i = 0; i < layers.count; ++i) { + if (!loader_is_implicit_layer_enabled(NULL, layers.list + i) || + layers.list[i].pre_instance_functions.enumerate_instance_extension_properties[0] == '\0') { + continue; } - loader_layer_scan(NULL, &instance_layers); - for (uint32_t i = 0; i < instance_layers.count; i++) { - struct loader_layer_properties *props = &instance_layers.list[i]; - if (strcmp(props->info.layerName, pLayerName) == 0) { - global_ext_list = &props->instance_extension_list; - break; - } - } - } else { - // Scan/discover all ICD libraries - memset(&icd_tramp_list, 0, sizeof(struct loader_icd_tramp_list)); - res = loader_icd_scan(NULL, &icd_tramp_list); - if (VK_SUCCESS != res) { - goto out; - } - // Get extensions from all ICD's, merge so no duplicates - res = loader_get_icd_loader_instance_extensions(NULL, &icd_tramp_list, &local_ext_list); - if (VK_SUCCESS != res) { - goto out; - } - loader_scanned_icd_clear(NULL, &icd_tramp_list); - - // Append implicit layers. - loader_implicit_layer_scan(NULL, &instance_layers); - for (uint32_t i = 0; i < instance_layers.count; i++) { - struct loader_extension_list *ext_list = &instance_layers.list[i].instance_extension_list; - loader_add_to_ext_list(NULL, &local_ext_list, ext_list->count, ext_list->list); + loader_platform_dl_handle layer_lib = loader_platform_open_library(layers.list[i].lib_name); + libs[lib_count++] = layer_lib; + void *pfn = loader_platform_get_proc_address(layer_lib, + layers.list[i].pre_instance_functions.enumerate_instance_extension_properties); + if (pfn == NULL) { + loader_log(NULL, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0, + "%s: Unable to resolve symbol \"%s\" in implicit layer library \"%s\"", __FUNCTION__, + layers.list[i].pre_instance_functions.enumerate_instance_extension_properties, layers.list[i].lib_name); + continue; } - global_ext_list = &local_ext_list; + VkEnumerateInstanceExtensionPropertiesChain *chain_link = malloc(sizeof(VkEnumerateInstanceExtensionPropertiesChain)); + if (chain_link == NULL) { + res = VK_ERROR_OUT_OF_HOST_MEMORY; + break; + } + + chain_link->header.type = VK_CHAIN_TYPE_ENUMERATE_INSTANCE_EXTENSION_PROPERTIES; + chain_link->header.version = VK_CURRENT_CHAIN_VERSION; + chain_link->header.size = sizeof(*chain_link); + chain_link->pfnNextLayer = pfn; + chain_link->pNextLink = chain_head; + + chain_head = chain_link; } - if (global_ext_list == NULL) { - res = VK_ERROR_LAYER_NOT_PRESENT; - goto out; + // Call down the chain + if (res == VK_SUCCESS) { + res = chain_head->pfnNextLayer(chain_head->pNextLink, pLayerName, pPropertyCount, pProperties); } - if (pProperties == NULL) { - *pPropertyCount = global_ext_list->count; - goto out; + // Free up the layers + loader_delete_layer_properties(NULL, &layers); + + // Tear down the chain + while (chain_head != &chain_tail) { + VkEnumerateInstanceExtensionPropertiesChain *holder = chain_head; + chain_head = (VkEnumerateInstanceExtensionPropertiesChain *)chain_head->pNextLink; + free(holder); } - copy_size = *pPropertyCount < global_ext_list->count ? *pPropertyCount : global_ext_list->count; - for (uint32_t i = 0; i < copy_size; i++) { - memcpy(&pProperties[i], &global_ext_list->list[i], sizeof(VkExtensionProperties)); + // Close the dl handles + for (size_t i = 0; i < lib_count; ++i) { + loader_platform_close_library(libs[i]); } - *pPropertyCount = copy_size; + free(libs); - if (copy_size < global_ext_list->count) { - res = VK_INCOMPLETE; - goto out; - } - -out: - - loader_destroy_generic_list(NULL, (struct loader_generic_list *)&local_ext_list); - loader_delete_layer_properties(NULL, &instance_layers); return res; } LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t *pPropertyCount, VkLayerProperties *pProperties) { - VkResult result = VK_SUCCESS; - struct loader_layer_list instance_layer_list; tls_instance = NULL; + LOADER_PLATFORM_THREAD_ONCE(&once_init, loader_initialize); - loader_platform_thread_once(&once_init, loader_initialize); + // We know we need to call at least the terminator + VkResult res = VK_SUCCESS; + VkEnumerateInstanceLayerPropertiesChain chain_tail = { + .header = + { + .type = VK_CHAIN_TYPE_ENUMERATE_INSTANCE_LAYER_PROPERTIES, + .version = VK_CURRENT_CHAIN_VERSION, + .size = sizeof(chain_tail), + }, + .pfnNextLayer = &terminator_EnumerateInstanceLayerProperties, + .pNextLink = NULL, + }; + VkEnumerateInstanceLayerPropertiesChain *chain_head = &chain_tail; - uint32_t copy_size; + // Get the implicit layers + struct loader_layer_list layers; + memset(&layers, 0, sizeof(layers)); + loader_implicit_layer_scan(NULL, &layers); - // Get layer libraries - memset(&instance_layer_list, 0, sizeof(instance_layer_list)); - loader_layer_scan(NULL, &instance_layer_list); + // We'll need to save the dl handles so we can close them later + loader_platform_dl_handle *libs = malloc(sizeof(loader_platform_dl_handle) * layers.count); + if (libs == NULL) { + return VK_ERROR_OUT_OF_HOST_MEMORY; + } + size_t lib_count = 0; - if (pProperties == NULL) { - *pPropertyCount = instance_layer_list.count; - goto out; + // Prepend layers onto the chain if they implment this entry point + for (uint32_t i = 0; i < layers.count; ++i) { + if (!loader_is_implicit_layer_enabled(NULL, layers.list + i) || + layers.list[i].pre_instance_functions.enumerate_instance_layer_properties[0] == '\0') { + continue; + } + + loader_platform_dl_handle layer_lib = loader_platform_open_library(layers.list[i].lib_name); + libs[lib_count++] = layer_lib; + void *pfn = + loader_platform_get_proc_address(layer_lib, layers.list[i].pre_instance_functions.enumerate_instance_layer_properties); + if (pfn == NULL) { + loader_log(NULL, VK_DEBUG_REPORT_WARNING_BIT_EXT, 0, + "%s: Unable to resolve symbol \"%s\" in implicit layer library \"%s\"", __FUNCTION__, + layers.list[i].pre_instance_functions.enumerate_instance_layer_properties, layers.list[i].lib_name); + continue; + } + + VkEnumerateInstanceLayerPropertiesChain *chain_link = malloc(sizeof(VkEnumerateInstanceLayerPropertiesChain)); + if (chain_link == NULL) { + res = VK_ERROR_OUT_OF_HOST_MEMORY; + break; + } + + chain_link->header.type = VK_CHAIN_TYPE_ENUMERATE_INSTANCE_LAYER_PROPERTIES; + chain_link->header.version = VK_CURRENT_CHAIN_VERSION; + chain_link->header.size = sizeof(*chain_link); + chain_link->pfnNextLayer = pfn; + chain_link->pNextLink = chain_head; + + chain_head = chain_link; } - copy_size = (*pPropertyCount < instance_layer_list.count) ? *pPropertyCount : instance_layer_list.count; - for (uint32_t i = 0; i < copy_size; i++) { - memcpy(&pProperties[i], &instance_layer_list.list[i].info, sizeof(VkLayerProperties)); + // Call down the chain + if (res == VK_SUCCESS) { + res = chain_head->pfnNextLayer(chain_head->pNextLink, pPropertyCount, pProperties); } - *pPropertyCount = copy_size; + // Free up the layers + loader_delete_layer_properties(NULL, &layers); - if (copy_size < instance_layer_list.count) { - result = VK_INCOMPLETE; - goto out; + // Tear down the chain + while (chain_head != &chain_tail) { + VkEnumerateInstanceLayerPropertiesChain *holder = chain_head; + chain_head = (VkEnumerateInstanceLayerPropertiesChain *)chain_head->pNextLink; + free(holder); } -out: + // Close the dl handles + for (size_t i = 0; i < lib_count; ++i) { + loader_platform_close_library(libs[i]); + } + free(libs); - loader_delete_layer_properties(NULL, &instance_layer_list); - return result; + return res; } LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, @@ -225,7 +275,7 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCr bool loaderLocked = false; VkResult res = VK_ERROR_INITIALIZATION_FAILED; - loader_platform_thread_once(&once_init, loader_initialize); + LOADER_PLATFORM_THREAD_ONCE(&once_init, loader_initialize); // Fail if the requested Vulkan apiVersion is > 1.0 since the loader only supports 1.0. // Having pCreateInfo == NULL, pCreateInfo->pApplication == NULL, or diff --git a/third_party/vulkan/loader/unknown_ext_chain_gas.asm b/third_party/vulkan/loader/unknown_ext_chain_gas.asm new file mode 100644 index 000000000..aca92ea5b --- /dev/null +++ b/third_party/vulkan/loader/unknown_ext_chain_gas.asm @@ -0,0 +1,873 @@ +# +# Copyright (c) 2017 The Khronos Group Inc. +# Copyright (c) 2017 Valve Corporation +# 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. +# +# Author: Lenny Komow +# + +# This code is used to pass on device (including physical device) extensions through the call chain. It must do this without +# creating a stack frame, because the actual parameters of the call are not known. Since the first parameter is known to be a +# VkPhysicalDevice or a dispatchable object it can unwrap the object, possibly overwriting the wrapped physical device, and then +# jump to the next function in the call chain + +.intel_syntax noprefix +.include "gen_defines.asm" + +.ifdef X86_64 + +.macro PhysDevExtTramp num +.global vkPhysDevExtTramp\num +vkPhysDevExtTramp\num: + mov rax, [rdi] + mov rdi, [rdi + PHYS_DEV_OFFSET_PHYS_DEV_TRAMP] + jmp [rax + (PHYS_DEV_OFFSET_INST_DISPATCH + (PTR_SIZE * \num))] +.endm + +.macro PhysDevExtTermin num +.global vkPhysDevExtTermin\num +vkPhysDevExtTermin\num: + mov rax, [rdi + ICD_TERM_OFFSET_PHYS_DEV_TERM] # Store the loader_icd_term* in rax + cmp qword ptr [rax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * \num))], 0 # Check if the next function in the chain is NULL + je terminError\num # Go to the error section if it is NULL + mov rdi, [rdi + PHYS_DEV_OFFSET_PHYS_DEV_TERM] # Load the unwrapped VkPhysicalDevice into the first arg + jmp [rax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * \num))] # Jump to the next function in the chain +terminError\num: + sub rsp, 56 # Create the stack frame + mov rdi, [rax + INSTANCE_OFFSET_ICD_TERM] # Load the loader_instance into rdi (first arg) + mov r8, [rdi + (HASH_OFFSET_INSTANCE + (HASH_SIZE * \num) + FUNC_NAME_OFFSET_HASH)] # Load the func name into r8 (fifth arg) + lea rcx, termin_error_string@GOTPCREL # Load the error string into rcx (fourth arg) + xor edx, edx # Set rdx to zero (third arg) + lea esi, [rdx + VK_DEBUG_REPORT_ERROR_BIT_EXT] # Write the error logging bit to rsi (second arg) + call loader_log # Log the error message before we crash + add rsp, 56 # Clean up the stack frame + mov rax, 0 + jmp rax # Crash intentionally by jumping to address zero +.endm + +.macro DevExtTramp num +.global vkdev_ext\num +vkdev_ext\num: + mov rax, [rdi] # Dereference the handle to get the dispatch table + jmp [rax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * \num))] # Jump to the appropriate call chain +.endm + +.else + +.macro PhysDevExtTramp num +.global vkPhysDevExtTramp\num +vkPhysDevExtTramp\num: + mov eax, [esp + 4] # Load the wrapped VkPhysicalDevice into eax + mov ecx, [eax + PHYS_DEV_OFFSET_PHYS_DEV_TRAMP] # Load the unwrapped VkPhysicalDevice into ecx + mov [esp + 4], ecx # Overwrite the wrapped VkPhysicalDevice with the unwrapped one (on the stack) + mov eax, [eax] # Dereference the wrapped VkPhysicalDevice to get the dispatch table in eax + jmp [eax + (PHYS_DEV_OFFSET_INST_DISPATCH + (PTR_SIZE * \num))] # Dereference the wrapped VkPhysicalDevice to get the dispatch table in eax +.endm + +.macro PhysDevExtTermin num +.global vkPhysDevExtTermin\num +vkPhysDevExtTermin\num: + mov ecx, [esp + 4] # Move the wrapped VkPhysicalDevice into ecx + mov eax, [ecx + ICD_TERM_OFFSET_PHYS_DEV_TERM] # Store the loader_icd_term* in eax + cmp dword ptr [eax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * \num))], 0 # Check if the next function in the chain is NULL + je terminError\num # Go to the error section if it is NULL + mov ecx, [ecx + PHYS_DEV_OFFSET_PHYS_DEV_TERM] # Unwrap the VkPhysicalDevice in ecx + mov [esp + 4], ecx # Copy the unwrapped VkPhysicalDevice into the first arg + jmp [eax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * \num))] # Jump to the next function in the chain +terminError\num: + mov eax, [eax + INSTANCE_OFFSET_ICD_TERM] # Load the loader_instance into eax + push [eax + (HASH_OFFSET_INSTANCE + (HASH_SIZE * \num) + FUNC_NAME_OFFSET_HASH)] # Push the func name (fifth arg) + push offset termin_error_string@GOT # Push the error string (fourth arg) + push 0 # Push zero (third arg) + push VK_DEBUG_REPORT_ERROR_BIT_EXT # Push the error logging bit (second arg) + push eax # Push the loader_instance (first arg) + call loader_log # Log the error message before we crash + add esp, 20 # Clean up the args + mov eax, 0 + jmp eax # Crash intentionally by jumping to address zero +.endm + +.macro DevExtTramp num +.global vkdev_ext\num +vkdev_ext\num: + mov eax, [esp + 4] # Dereference the handle to get the dispatch table + jmp [eax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * \num))] # Jump to the appropriate call chain +.endm + +.endif + +#if defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif + +.data + +termin_error_string: +.string "Extension %s not supported for this physical device" + +.text + + PhysDevExtTramp 0 + PhysDevExtTramp 1 + PhysDevExtTramp 2 + PhysDevExtTramp 3 + PhysDevExtTramp 4 + PhysDevExtTramp 5 + PhysDevExtTramp 6 + PhysDevExtTramp 7 + PhysDevExtTramp 8 + PhysDevExtTramp 9 + PhysDevExtTramp 10 + PhysDevExtTramp 11 + PhysDevExtTramp 12 + PhysDevExtTramp 13 + PhysDevExtTramp 14 + PhysDevExtTramp 15 + PhysDevExtTramp 16 + PhysDevExtTramp 17 + PhysDevExtTramp 18 + PhysDevExtTramp 19 + PhysDevExtTramp 20 + PhysDevExtTramp 21 + PhysDevExtTramp 22 + PhysDevExtTramp 23 + PhysDevExtTramp 24 + PhysDevExtTramp 25 + PhysDevExtTramp 26 + PhysDevExtTramp 27 + PhysDevExtTramp 28 + PhysDevExtTramp 29 + PhysDevExtTramp 30 + PhysDevExtTramp 31 + PhysDevExtTramp 32 + PhysDevExtTramp 33 + PhysDevExtTramp 34 + PhysDevExtTramp 35 + PhysDevExtTramp 36 + PhysDevExtTramp 37 + PhysDevExtTramp 38 + PhysDevExtTramp 39 + PhysDevExtTramp 40 + PhysDevExtTramp 41 + PhysDevExtTramp 42 + PhysDevExtTramp 43 + PhysDevExtTramp 44 + PhysDevExtTramp 45 + PhysDevExtTramp 46 + PhysDevExtTramp 47 + PhysDevExtTramp 48 + PhysDevExtTramp 49 + PhysDevExtTramp 50 + PhysDevExtTramp 51 + PhysDevExtTramp 52 + PhysDevExtTramp 53 + PhysDevExtTramp 54 + PhysDevExtTramp 55 + PhysDevExtTramp 56 + PhysDevExtTramp 57 + PhysDevExtTramp 58 + PhysDevExtTramp 59 + PhysDevExtTramp 60 + PhysDevExtTramp 61 + PhysDevExtTramp 62 + PhysDevExtTramp 63 + PhysDevExtTramp 64 + PhysDevExtTramp 65 + PhysDevExtTramp 66 + PhysDevExtTramp 67 + PhysDevExtTramp 68 + PhysDevExtTramp 69 + PhysDevExtTramp 70 + PhysDevExtTramp 71 + PhysDevExtTramp 72 + PhysDevExtTramp 73 + PhysDevExtTramp 74 + PhysDevExtTramp 75 + PhysDevExtTramp 76 + PhysDevExtTramp 77 + PhysDevExtTramp 78 + PhysDevExtTramp 79 + PhysDevExtTramp 80 + PhysDevExtTramp 81 + PhysDevExtTramp 82 + PhysDevExtTramp 83 + PhysDevExtTramp 84 + PhysDevExtTramp 85 + PhysDevExtTramp 86 + PhysDevExtTramp 87 + PhysDevExtTramp 88 + PhysDevExtTramp 89 + PhysDevExtTramp 90 + PhysDevExtTramp 91 + PhysDevExtTramp 92 + PhysDevExtTramp 93 + PhysDevExtTramp 94 + PhysDevExtTramp 95 + PhysDevExtTramp 96 + PhysDevExtTramp 97 + PhysDevExtTramp 98 + PhysDevExtTramp 99 + PhysDevExtTramp 100 + PhysDevExtTramp 101 + PhysDevExtTramp 102 + PhysDevExtTramp 103 + PhysDevExtTramp 104 + PhysDevExtTramp 105 + PhysDevExtTramp 106 + PhysDevExtTramp 107 + PhysDevExtTramp 108 + PhysDevExtTramp 109 + PhysDevExtTramp 110 + PhysDevExtTramp 111 + PhysDevExtTramp 112 + PhysDevExtTramp 113 + PhysDevExtTramp 114 + PhysDevExtTramp 115 + PhysDevExtTramp 116 + PhysDevExtTramp 117 + PhysDevExtTramp 118 + PhysDevExtTramp 119 + PhysDevExtTramp 120 + PhysDevExtTramp 121 + PhysDevExtTramp 122 + PhysDevExtTramp 123 + PhysDevExtTramp 124 + PhysDevExtTramp 125 + PhysDevExtTramp 126 + PhysDevExtTramp 127 + PhysDevExtTramp 128 + PhysDevExtTramp 129 + PhysDevExtTramp 130 + PhysDevExtTramp 131 + PhysDevExtTramp 132 + PhysDevExtTramp 133 + PhysDevExtTramp 134 + PhysDevExtTramp 135 + PhysDevExtTramp 136 + PhysDevExtTramp 137 + PhysDevExtTramp 138 + PhysDevExtTramp 139 + PhysDevExtTramp 140 + PhysDevExtTramp 141 + PhysDevExtTramp 142 + PhysDevExtTramp 143 + PhysDevExtTramp 144 + PhysDevExtTramp 145 + PhysDevExtTramp 146 + PhysDevExtTramp 147 + PhysDevExtTramp 148 + PhysDevExtTramp 149 + PhysDevExtTramp 150 + PhysDevExtTramp 151 + PhysDevExtTramp 152 + PhysDevExtTramp 153 + PhysDevExtTramp 154 + PhysDevExtTramp 155 + PhysDevExtTramp 156 + PhysDevExtTramp 157 + PhysDevExtTramp 158 + PhysDevExtTramp 159 + PhysDevExtTramp 160 + PhysDevExtTramp 161 + PhysDevExtTramp 162 + PhysDevExtTramp 163 + PhysDevExtTramp 164 + PhysDevExtTramp 165 + PhysDevExtTramp 166 + PhysDevExtTramp 167 + PhysDevExtTramp 168 + PhysDevExtTramp 169 + PhysDevExtTramp 170 + PhysDevExtTramp 171 + PhysDevExtTramp 172 + PhysDevExtTramp 173 + PhysDevExtTramp 174 + PhysDevExtTramp 175 + PhysDevExtTramp 176 + PhysDevExtTramp 177 + PhysDevExtTramp 178 + PhysDevExtTramp 179 + PhysDevExtTramp 180 + PhysDevExtTramp 181 + PhysDevExtTramp 182 + PhysDevExtTramp 183 + PhysDevExtTramp 184 + PhysDevExtTramp 185 + PhysDevExtTramp 186 + PhysDevExtTramp 187 + PhysDevExtTramp 188 + PhysDevExtTramp 189 + PhysDevExtTramp 190 + PhysDevExtTramp 191 + PhysDevExtTramp 192 + PhysDevExtTramp 193 + PhysDevExtTramp 194 + PhysDevExtTramp 195 + PhysDevExtTramp 196 + PhysDevExtTramp 197 + PhysDevExtTramp 198 + PhysDevExtTramp 199 + PhysDevExtTramp 200 + PhysDevExtTramp 201 + PhysDevExtTramp 202 + PhysDevExtTramp 203 + PhysDevExtTramp 204 + PhysDevExtTramp 205 + PhysDevExtTramp 206 + PhysDevExtTramp 207 + PhysDevExtTramp 208 + PhysDevExtTramp 209 + PhysDevExtTramp 210 + PhysDevExtTramp 211 + PhysDevExtTramp 212 + PhysDevExtTramp 213 + PhysDevExtTramp 214 + PhysDevExtTramp 215 + PhysDevExtTramp 216 + PhysDevExtTramp 217 + PhysDevExtTramp 218 + PhysDevExtTramp 219 + PhysDevExtTramp 220 + PhysDevExtTramp 221 + PhysDevExtTramp 222 + PhysDevExtTramp 223 + PhysDevExtTramp 224 + PhysDevExtTramp 225 + PhysDevExtTramp 226 + PhysDevExtTramp 227 + PhysDevExtTramp 228 + PhysDevExtTramp 229 + PhysDevExtTramp 230 + PhysDevExtTramp 231 + PhysDevExtTramp 232 + PhysDevExtTramp 233 + PhysDevExtTramp 234 + PhysDevExtTramp 235 + PhysDevExtTramp 236 + PhysDevExtTramp 237 + PhysDevExtTramp 238 + PhysDevExtTramp 239 + PhysDevExtTramp 240 + PhysDevExtTramp 241 + PhysDevExtTramp 242 + PhysDevExtTramp 243 + PhysDevExtTramp 244 + PhysDevExtTramp 245 + PhysDevExtTramp 246 + PhysDevExtTramp 247 + PhysDevExtTramp 248 + PhysDevExtTramp 249 + + PhysDevExtTermin 0 + PhysDevExtTermin 1 + PhysDevExtTermin 2 + PhysDevExtTermin 3 + PhysDevExtTermin 4 + PhysDevExtTermin 5 + PhysDevExtTermin 6 + PhysDevExtTermin 7 + PhysDevExtTermin 8 + PhysDevExtTermin 9 + PhysDevExtTermin 10 + PhysDevExtTermin 11 + PhysDevExtTermin 12 + PhysDevExtTermin 13 + PhysDevExtTermin 14 + PhysDevExtTermin 15 + PhysDevExtTermin 16 + PhysDevExtTermin 17 + PhysDevExtTermin 18 + PhysDevExtTermin 19 + PhysDevExtTermin 20 + PhysDevExtTermin 21 + PhysDevExtTermin 22 + PhysDevExtTermin 23 + PhysDevExtTermin 24 + PhysDevExtTermin 25 + PhysDevExtTermin 26 + PhysDevExtTermin 27 + PhysDevExtTermin 28 + PhysDevExtTermin 29 + PhysDevExtTermin 30 + PhysDevExtTermin 31 + PhysDevExtTermin 32 + PhysDevExtTermin 33 + PhysDevExtTermin 34 + PhysDevExtTermin 35 + PhysDevExtTermin 36 + PhysDevExtTermin 37 + PhysDevExtTermin 38 + PhysDevExtTermin 39 + PhysDevExtTermin 40 + PhysDevExtTermin 41 + PhysDevExtTermin 42 + PhysDevExtTermin 43 + PhysDevExtTermin 44 + PhysDevExtTermin 45 + PhysDevExtTermin 46 + PhysDevExtTermin 47 + PhysDevExtTermin 48 + PhysDevExtTermin 49 + PhysDevExtTermin 50 + PhysDevExtTermin 51 + PhysDevExtTermin 52 + PhysDevExtTermin 53 + PhysDevExtTermin 54 + PhysDevExtTermin 55 + PhysDevExtTermin 56 + PhysDevExtTermin 57 + PhysDevExtTermin 58 + PhysDevExtTermin 59 + PhysDevExtTermin 60 + PhysDevExtTermin 61 + PhysDevExtTermin 62 + PhysDevExtTermin 63 + PhysDevExtTermin 64 + PhysDevExtTermin 65 + PhysDevExtTermin 66 + PhysDevExtTermin 67 + PhysDevExtTermin 68 + PhysDevExtTermin 69 + PhysDevExtTermin 70 + PhysDevExtTermin 71 + PhysDevExtTermin 72 + PhysDevExtTermin 73 + PhysDevExtTermin 74 + PhysDevExtTermin 75 + PhysDevExtTermin 76 + PhysDevExtTermin 77 + PhysDevExtTermin 78 + PhysDevExtTermin 79 + PhysDevExtTermin 80 + PhysDevExtTermin 81 + PhysDevExtTermin 82 + PhysDevExtTermin 83 + PhysDevExtTermin 84 + PhysDevExtTermin 85 + PhysDevExtTermin 86 + PhysDevExtTermin 87 + PhysDevExtTermin 88 + PhysDevExtTermin 89 + PhysDevExtTermin 90 + PhysDevExtTermin 91 + PhysDevExtTermin 92 + PhysDevExtTermin 93 + PhysDevExtTermin 94 + PhysDevExtTermin 95 + PhysDevExtTermin 96 + PhysDevExtTermin 97 + PhysDevExtTermin 98 + PhysDevExtTermin 99 + PhysDevExtTermin 100 + PhysDevExtTermin 101 + PhysDevExtTermin 102 + PhysDevExtTermin 103 + PhysDevExtTermin 104 + PhysDevExtTermin 105 + PhysDevExtTermin 106 + PhysDevExtTermin 107 + PhysDevExtTermin 108 + PhysDevExtTermin 109 + PhysDevExtTermin 110 + PhysDevExtTermin 111 + PhysDevExtTermin 112 + PhysDevExtTermin 113 + PhysDevExtTermin 114 + PhysDevExtTermin 115 + PhysDevExtTermin 116 + PhysDevExtTermin 117 + PhysDevExtTermin 118 + PhysDevExtTermin 119 + PhysDevExtTermin 120 + PhysDevExtTermin 121 + PhysDevExtTermin 122 + PhysDevExtTermin 123 + PhysDevExtTermin 124 + PhysDevExtTermin 125 + PhysDevExtTermin 126 + PhysDevExtTermin 127 + PhysDevExtTermin 128 + PhysDevExtTermin 129 + PhysDevExtTermin 130 + PhysDevExtTermin 131 + PhysDevExtTermin 132 + PhysDevExtTermin 133 + PhysDevExtTermin 134 + PhysDevExtTermin 135 + PhysDevExtTermin 136 + PhysDevExtTermin 137 + PhysDevExtTermin 138 + PhysDevExtTermin 139 + PhysDevExtTermin 140 + PhysDevExtTermin 141 + PhysDevExtTermin 142 + PhysDevExtTermin 143 + PhysDevExtTermin 144 + PhysDevExtTermin 145 + PhysDevExtTermin 146 + PhysDevExtTermin 147 + PhysDevExtTermin 148 + PhysDevExtTermin 149 + PhysDevExtTermin 150 + PhysDevExtTermin 151 + PhysDevExtTermin 152 + PhysDevExtTermin 153 + PhysDevExtTermin 154 + PhysDevExtTermin 155 + PhysDevExtTermin 156 + PhysDevExtTermin 157 + PhysDevExtTermin 158 + PhysDevExtTermin 159 + PhysDevExtTermin 160 + PhysDevExtTermin 161 + PhysDevExtTermin 162 + PhysDevExtTermin 163 + PhysDevExtTermin 164 + PhysDevExtTermin 165 + PhysDevExtTermin 166 + PhysDevExtTermin 167 + PhysDevExtTermin 168 + PhysDevExtTermin 169 + PhysDevExtTermin 170 + PhysDevExtTermin 171 + PhysDevExtTermin 172 + PhysDevExtTermin 173 + PhysDevExtTermin 174 + PhysDevExtTermin 175 + PhysDevExtTermin 176 + PhysDevExtTermin 177 + PhysDevExtTermin 178 + PhysDevExtTermin 179 + PhysDevExtTermin 180 + PhysDevExtTermin 181 + PhysDevExtTermin 182 + PhysDevExtTermin 183 + PhysDevExtTermin 184 + PhysDevExtTermin 185 + PhysDevExtTermin 186 + PhysDevExtTermin 187 + PhysDevExtTermin 188 + PhysDevExtTermin 189 + PhysDevExtTermin 190 + PhysDevExtTermin 191 + PhysDevExtTermin 192 + PhysDevExtTermin 193 + PhysDevExtTermin 194 + PhysDevExtTermin 195 + PhysDevExtTermin 196 + PhysDevExtTermin 197 + PhysDevExtTermin 198 + PhysDevExtTermin 199 + PhysDevExtTermin 200 + PhysDevExtTermin 201 + PhysDevExtTermin 202 + PhysDevExtTermin 203 + PhysDevExtTermin 204 + PhysDevExtTermin 205 + PhysDevExtTermin 206 + PhysDevExtTermin 207 + PhysDevExtTermin 208 + PhysDevExtTermin 209 + PhysDevExtTermin 210 + PhysDevExtTermin 211 + PhysDevExtTermin 212 + PhysDevExtTermin 213 + PhysDevExtTermin 214 + PhysDevExtTermin 215 + PhysDevExtTermin 216 + PhysDevExtTermin 217 + PhysDevExtTermin 218 + PhysDevExtTermin 219 + PhysDevExtTermin 220 + PhysDevExtTermin 221 + PhysDevExtTermin 222 + PhysDevExtTermin 223 + PhysDevExtTermin 224 + PhysDevExtTermin 225 + PhysDevExtTermin 226 + PhysDevExtTermin 227 + PhysDevExtTermin 228 + PhysDevExtTermin 229 + PhysDevExtTermin 230 + PhysDevExtTermin 231 + PhysDevExtTermin 232 + PhysDevExtTermin 233 + PhysDevExtTermin 234 + PhysDevExtTermin 235 + PhysDevExtTermin 236 + PhysDevExtTermin 237 + PhysDevExtTermin 238 + PhysDevExtTermin 239 + PhysDevExtTermin 240 + PhysDevExtTermin 241 + PhysDevExtTermin 242 + PhysDevExtTermin 243 + PhysDevExtTermin 244 + PhysDevExtTermin 245 + PhysDevExtTermin 246 + PhysDevExtTermin 247 + PhysDevExtTermin 248 + PhysDevExtTermin 249 + + DevExtTramp 0 + DevExtTramp 1 + DevExtTramp 2 + DevExtTramp 3 + DevExtTramp 4 + DevExtTramp 5 + DevExtTramp 6 + DevExtTramp 7 + DevExtTramp 8 + DevExtTramp 9 + DevExtTramp 10 + DevExtTramp 11 + DevExtTramp 12 + DevExtTramp 13 + DevExtTramp 14 + DevExtTramp 15 + DevExtTramp 16 + DevExtTramp 17 + DevExtTramp 18 + DevExtTramp 19 + DevExtTramp 20 + DevExtTramp 21 + DevExtTramp 22 + DevExtTramp 23 + DevExtTramp 24 + DevExtTramp 25 + DevExtTramp 26 + DevExtTramp 27 + DevExtTramp 28 + DevExtTramp 29 + DevExtTramp 30 + DevExtTramp 31 + DevExtTramp 32 + DevExtTramp 33 + DevExtTramp 34 + DevExtTramp 35 + DevExtTramp 36 + DevExtTramp 37 + DevExtTramp 38 + DevExtTramp 39 + DevExtTramp 40 + DevExtTramp 41 + DevExtTramp 42 + DevExtTramp 43 + DevExtTramp 44 + DevExtTramp 45 + DevExtTramp 46 + DevExtTramp 47 + DevExtTramp 48 + DevExtTramp 49 + DevExtTramp 50 + DevExtTramp 51 + DevExtTramp 52 + DevExtTramp 53 + DevExtTramp 54 + DevExtTramp 55 + DevExtTramp 56 + DevExtTramp 57 + DevExtTramp 58 + DevExtTramp 59 + DevExtTramp 60 + DevExtTramp 61 + DevExtTramp 62 + DevExtTramp 63 + DevExtTramp 64 + DevExtTramp 65 + DevExtTramp 66 + DevExtTramp 67 + DevExtTramp 68 + DevExtTramp 69 + DevExtTramp 70 + DevExtTramp 71 + DevExtTramp 72 + DevExtTramp 73 + DevExtTramp 74 + DevExtTramp 75 + DevExtTramp 76 + DevExtTramp 77 + DevExtTramp 78 + DevExtTramp 79 + DevExtTramp 80 + DevExtTramp 81 + DevExtTramp 82 + DevExtTramp 83 + DevExtTramp 84 + DevExtTramp 85 + DevExtTramp 86 + DevExtTramp 87 + DevExtTramp 88 + DevExtTramp 89 + DevExtTramp 90 + DevExtTramp 91 + DevExtTramp 92 + DevExtTramp 93 + DevExtTramp 94 + DevExtTramp 95 + DevExtTramp 96 + DevExtTramp 97 + DevExtTramp 98 + DevExtTramp 99 + DevExtTramp 100 + DevExtTramp 101 + DevExtTramp 102 + DevExtTramp 103 + DevExtTramp 104 + DevExtTramp 105 + DevExtTramp 106 + DevExtTramp 107 + DevExtTramp 108 + DevExtTramp 109 + DevExtTramp 110 + DevExtTramp 111 + DevExtTramp 112 + DevExtTramp 113 + DevExtTramp 114 + DevExtTramp 115 + DevExtTramp 116 + DevExtTramp 117 + DevExtTramp 118 + DevExtTramp 119 + DevExtTramp 120 + DevExtTramp 121 + DevExtTramp 122 + DevExtTramp 123 + DevExtTramp 124 + DevExtTramp 125 + DevExtTramp 126 + DevExtTramp 127 + DevExtTramp 128 + DevExtTramp 129 + DevExtTramp 130 + DevExtTramp 131 + DevExtTramp 132 + DevExtTramp 133 + DevExtTramp 134 + DevExtTramp 135 + DevExtTramp 136 + DevExtTramp 137 + DevExtTramp 138 + DevExtTramp 139 + DevExtTramp 140 + DevExtTramp 141 + DevExtTramp 142 + DevExtTramp 143 + DevExtTramp 144 + DevExtTramp 145 + DevExtTramp 146 + DevExtTramp 147 + DevExtTramp 148 + DevExtTramp 149 + DevExtTramp 150 + DevExtTramp 151 + DevExtTramp 152 + DevExtTramp 153 + DevExtTramp 154 + DevExtTramp 155 + DevExtTramp 156 + DevExtTramp 157 + DevExtTramp 158 + DevExtTramp 159 + DevExtTramp 160 + DevExtTramp 161 + DevExtTramp 162 + DevExtTramp 163 + DevExtTramp 164 + DevExtTramp 165 + DevExtTramp 166 + DevExtTramp 167 + DevExtTramp 168 + DevExtTramp 169 + DevExtTramp 170 + DevExtTramp 171 + DevExtTramp 172 + DevExtTramp 173 + DevExtTramp 174 + DevExtTramp 175 + DevExtTramp 176 + DevExtTramp 177 + DevExtTramp 178 + DevExtTramp 179 + DevExtTramp 180 + DevExtTramp 181 + DevExtTramp 182 + DevExtTramp 183 + DevExtTramp 184 + DevExtTramp 185 + DevExtTramp 186 + DevExtTramp 187 + DevExtTramp 188 + DevExtTramp 189 + DevExtTramp 190 + DevExtTramp 191 + DevExtTramp 192 + DevExtTramp 193 + DevExtTramp 194 + DevExtTramp 195 + DevExtTramp 196 + DevExtTramp 197 + DevExtTramp 198 + DevExtTramp 199 + DevExtTramp 200 + DevExtTramp 201 + DevExtTramp 202 + DevExtTramp 203 + DevExtTramp 204 + DevExtTramp 205 + DevExtTramp 206 + DevExtTramp 207 + DevExtTramp 208 + DevExtTramp 209 + DevExtTramp 210 + DevExtTramp 211 + DevExtTramp 212 + DevExtTramp 213 + DevExtTramp 214 + DevExtTramp 215 + DevExtTramp 216 + DevExtTramp 217 + DevExtTramp 218 + DevExtTramp 219 + DevExtTramp 220 + DevExtTramp 221 + DevExtTramp 222 + DevExtTramp 223 + DevExtTramp 224 + DevExtTramp 225 + DevExtTramp 226 + DevExtTramp 227 + DevExtTramp 228 + DevExtTramp 229 + DevExtTramp 230 + DevExtTramp 231 + DevExtTramp 232 + DevExtTramp 233 + DevExtTramp 234 + DevExtTramp 235 + DevExtTramp 236 + DevExtTramp 237 + DevExtTramp 238 + DevExtTramp 239 + DevExtTramp 240 + DevExtTramp 241 + DevExtTramp 242 + DevExtTramp 243 + DevExtTramp 244 + DevExtTramp 245 + DevExtTramp 246 + DevExtTramp 247 + DevExtTramp 248 + DevExtTramp 249 diff --git a/third_party/vulkan/loader/unknown_ext_chain_masm.asm b/third_party/vulkan/loader/unknown_ext_chain_masm.asm new file mode 100644 index 000000000..34bc7c2fc --- /dev/null +++ b/third_party/vulkan/loader/unknown_ext_chain_masm.asm @@ -0,0 +1,883 @@ +; +; Copyright (c) 2017 The Khronos Group Inc. +; Copyright (c) 2017 Valve Corporation +; 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. +; +; Author: Lenny Komow +; + +; This code is used to pass on device (including physical device) extensions through the call chain. It must do this without +; creating a stack frame, because the actual parameters of the call are not known. Since the first parameter is known to be a +; VkPhysicalDevice or a dispatchable object it can unwrap the object, possibly overwriting the wrapped physical device, and then +; jump to the next function in the call chain + +; Codegen defines a number of values, chiefly offsets of members within structs and sizes of data types within gen_defines.asm. +; Struct member offsets are defined in the format "XX_OFFSET_YY" where XX indicates the member within the struct and YY indicates +; the struct type that it is a member of. Data type sizes are defined in the format "XX_SIZE" where XX indicates the data type. +INCLUDE gen_defines.asm + +; 64-bit values and macro +IFDEF rax + +PhysDevExtTramp macro num:req +public vkPhysDevExtTramp&num& +vkPhysDevExtTramp&num&: + mov rax, qword ptr [rcx] ; Dereference the wrapped VkPhysicalDevice to get the dispatch table in rax + mov rcx, qword ptr [rcx + PHYS_DEV_OFFSET_PHYS_DEV_TRAMP] ; Load the unwrapped VkPhysicalDevice into rcx + jmp qword ptr [rax + (PHYS_DEV_OFFSET_INST_DISPATCH + (PTR_SIZE * num))] ; Jump to the next function in the chain, preserving the args in other registers +endm + +PhysDevExtTermin macro num +public vkPhysDevExtTermin&num& +vkPhysDevExtTermin&num&: + mov rax, qword ptr [rcx + ICD_TERM_OFFSET_PHYS_DEV_TERM] ; Store the loader_icd_term* in rax + cmp qword ptr [rax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * num))], 0 ; Check if the next function in the chain is NULL + je terminError&num& ; Go to the error section if it is NULL + mov rcx, qword ptr [rcx + PHYS_DEV_OFFSET_PHYS_DEV_TERM] ; Load the unwrapped VkPhysicalDevice into the first arg + jmp qword ptr [rax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * num))] ; Jump to the next function in the chain +terminError&num&: + sub rsp, 56 ; Create the stack frame + mov rcx, qword ptr [rax + INSTANCE_OFFSET_ICD_TERM] ; Load the loader_instance into rcx (first arg) + mov rax, qword ptr [rcx + (HASH_OFFSET_INSTANCE + (HASH_SIZE * num) + FUNC_NAME_OFFSET_HASH)] ; Load the func name into rax + lea r9, termin_error_string ; Load the error string into r9 (fourth arg) + xor r8d, r8d ; Set r8 to zero (third arg) + mov qword ptr [rsp + 32], rax ; Move the func name onto the stack (fifth arg) + lea edx, [r8 + VK_DEBUG_REPORT_ERROR_BIT_EXT] ; Write the error logging bit to rdx (second arg) + call loader_log ; Log the error message before we crash + add rsp, 56 ; Clean up the stack frame + mov rax, 0 + jmp rax ; Crash intentionally by jumping to address zero +endm + +DevExtTramp macro num +public vkdev_ext&num& +vkdev_ext&num&: + mov rax, qword ptr [rcx] ; Dereference the handle to get the dispatch table + jmp qword ptr [rax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * num))] ; Jump to the appropriate call chain +endm + +; 32-bit values and macro +ELSE + +PhysDevExtTramp macro num +public _vkPhysDevExtTramp&num&@4 +_vkPhysDevExtTramp&num&@4: + mov eax, dword ptr [esp + 4] ; Load the wrapped VkPhysicalDevice into eax + mov ecx, [eax + PHYS_DEV_OFFSET_PHYS_DEV_TRAMP] ; Load the unwrapped VkPhysicalDevice into ecx + mov [esp + 4], ecx ; Overwrite the wrapped VkPhysicalDevice with the unwrapped one (on the stack) + mov eax, [eax] ; Dereference the wrapped VkPhysicalDevice to get the dispatch table in eax + jmp dword ptr [eax + (PHYS_DEV_OFFSET_INST_DISPATCH + (PTR_SIZE * num))] ; Jump to the next function in the chain, preserving the args on the stack +endm + +PhysDevExtTermin macro num +public _vkPhysDevExtTermin&num&@4 +_vkPhysDevExtTermin&num&@4: + mov ecx, dword ptr [esp + 4] ; Move the wrapped VkPhysicalDevice into ecx + mov eax, dword ptr [ecx + ICD_TERM_OFFSET_PHYS_DEV_TERM] ; Store the loader_icd_term* in eax + cmp dword ptr [eax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * num))], 0 ; Check if the next function in the chain is NULL + je terminError&num& ; Go to the error section if it is NULL + mov ecx, dword ptr [ecx + PHYS_DEV_OFFSET_PHYS_DEV_TERM] ; Unwrap the VkPhysicalDevice in ecx + mov dword ptr [esp + 4], ecx ; Copy the unwrapped VkPhysicalDevice into the first arg + jmp dword ptr [eax + (DISPATCH_OFFSET_ICD_TERM + (PTR_SIZE * num))] ; Jump to the next function in the chain +terminError&num&: + mov eax, dword ptr [eax + INSTANCE_OFFSET_ICD_TERM] ; Load the loader_instance into eax + push dword ptr [eax + (HASH_OFFSET_INSTANCE + (HASH_SIZE * num) + FUNC_NAME_OFFSET_HASH)] ; Push the func name (fifth arg) + push offset termin_error_string ; Push the error string (fourth arg) + push 0 ; Push zero (third arg) + push VK_DEBUG_REPORT_ERROR_BIT_EXT ; Push the error logging bit (second arg) + push eax ; Push the loader_instance (first arg) + call _loader_log ; Log the error message before we crash + add esp, 20 ; Clean up the args + mov eax, 0 + jmp eax ; Crash intentionally by jumping to address zero +endm + +DevExtTramp macro num +public _vkdev_ext&num&@4 +_vkdev_ext&num&@4: + mov eax, dword ptr [esp + 4] ; Dereference the handle to get the dispatch table + jmp dword ptr [eax + (EXT_OFFSET_DEVICE_DISPATCH + (PTR_SIZE * num))] ; Jump to the appropriate call chain +endm + +; This is also needed for 32-bit only +.model flat + +ENDIF + +.const + termin_error_string db 'Extension %s not supported for this physical device', 0 + +.code + +IFDEF rax +extrn loader_log:near +ELSE +extrn _loader_log:near +ENDIF + + PhysDevExtTramp 0 + PhysDevExtTramp 1 + PhysDevExtTramp 2 + PhysDevExtTramp 3 + PhysDevExtTramp 4 + PhysDevExtTramp 5 + PhysDevExtTramp 6 + PhysDevExtTramp 7 + PhysDevExtTramp 8 + PhysDevExtTramp 9 + PhysDevExtTramp 10 + PhysDevExtTramp 11 + PhysDevExtTramp 12 + PhysDevExtTramp 13 + PhysDevExtTramp 14 + PhysDevExtTramp 15 + PhysDevExtTramp 16 + PhysDevExtTramp 17 + PhysDevExtTramp 18 + PhysDevExtTramp 19 + PhysDevExtTramp 20 + PhysDevExtTramp 21 + PhysDevExtTramp 22 + PhysDevExtTramp 23 + PhysDevExtTramp 24 + PhysDevExtTramp 25 + PhysDevExtTramp 26 + PhysDevExtTramp 27 + PhysDevExtTramp 28 + PhysDevExtTramp 29 + PhysDevExtTramp 30 + PhysDevExtTramp 31 + PhysDevExtTramp 32 + PhysDevExtTramp 33 + PhysDevExtTramp 34 + PhysDevExtTramp 35 + PhysDevExtTramp 36 + PhysDevExtTramp 37 + PhysDevExtTramp 38 + PhysDevExtTramp 39 + PhysDevExtTramp 40 + PhysDevExtTramp 41 + PhysDevExtTramp 42 + PhysDevExtTramp 43 + PhysDevExtTramp 44 + PhysDevExtTramp 45 + PhysDevExtTramp 46 + PhysDevExtTramp 47 + PhysDevExtTramp 48 + PhysDevExtTramp 49 + PhysDevExtTramp 50 + PhysDevExtTramp 51 + PhysDevExtTramp 52 + PhysDevExtTramp 53 + PhysDevExtTramp 54 + PhysDevExtTramp 55 + PhysDevExtTramp 56 + PhysDevExtTramp 57 + PhysDevExtTramp 58 + PhysDevExtTramp 59 + PhysDevExtTramp 60 + PhysDevExtTramp 61 + PhysDevExtTramp 62 + PhysDevExtTramp 63 + PhysDevExtTramp 64 + PhysDevExtTramp 65 + PhysDevExtTramp 66 + PhysDevExtTramp 67 + PhysDevExtTramp 68 + PhysDevExtTramp 69 + PhysDevExtTramp 70 + PhysDevExtTramp 71 + PhysDevExtTramp 72 + PhysDevExtTramp 73 + PhysDevExtTramp 74 + PhysDevExtTramp 75 + PhysDevExtTramp 76 + PhysDevExtTramp 77 + PhysDevExtTramp 78 + PhysDevExtTramp 79 + PhysDevExtTramp 80 + PhysDevExtTramp 81 + PhysDevExtTramp 82 + PhysDevExtTramp 83 + PhysDevExtTramp 84 + PhysDevExtTramp 85 + PhysDevExtTramp 86 + PhysDevExtTramp 87 + PhysDevExtTramp 88 + PhysDevExtTramp 89 + PhysDevExtTramp 90 + PhysDevExtTramp 91 + PhysDevExtTramp 92 + PhysDevExtTramp 93 + PhysDevExtTramp 94 + PhysDevExtTramp 95 + PhysDevExtTramp 96 + PhysDevExtTramp 97 + PhysDevExtTramp 98 + PhysDevExtTramp 99 + PhysDevExtTramp 100 + PhysDevExtTramp 101 + PhysDevExtTramp 102 + PhysDevExtTramp 103 + PhysDevExtTramp 104 + PhysDevExtTramp 105 + PhysDevExtTramp 106 + PhysDevExtTramp 107 + PhysDevExtTramp 108 + PhysDevExtTramp 109 + PhysDevExtTramp 110 + PhysDevExtTramp 111 + PhysDevExtTramp 112 + PhysDevExtTramp 113 + PhysDevExtTramp 114 + PhysDevExtTramp 115 + PhysDevExtTramp 116 + PhysDevExtTramp 117 + PhysDevExtTramp 118 + PhysDevExtTramp 119 + PhysDevExtTramp 120 + PhysDevExtTramp 121 + PhysDevExtTramp 122 + PhysDevExtTramp 123 + PhysDevExtTramp 124 + PhysDevExtTramp 125 + PhysDevExtTramp 126 + PhysDevExtTramp 127 + PhysDevExtTramp 128 + PhysDevExtTramp 129 + PhysDevExtTramp 130 + PhysDevExtTramp 131 + PhysDevExtTramp 132 + PhysDevExtTramp 133 + PhysDevExtTramp 134 + PhysDevExtTramp 135 + PhysDevExtTramp 136 + PhysDevExtTramp 137 + PhysDevExtTramp 138 + PhysDevExtTramp 139 + PhysDevExtTramp 140 + PhysDevExtTramp 141 + PhysDevExtTramp 142 + PhysDevExtTramp 143 + PhysDevExtTramp 144 + PhysDevExtTramp 145 + PhysDevExtTramp 146 + PhysDevExtTramp 147 + PhysDevExtTramp 148 + PhysDevExtTramp 149 + PhysDevExtTramp 150 + PhysDevExtTramp 151 + PhysDevExtTramp 152 + PhysDevExtTramp 153 + PhysDevExtTramp 154 + PhysDevExtTramp 155 + PhysDevExtTramp 156 + PhysDevExtTramp 157 + PhysDevExtTramp 158 + PhysDevExtTramp 159 + PhysDevExtTramp 160 + PhysDevExtTramp 161 + PhysDevExtTramp 162 + PhysDevExtTramp 163 + PhysDevExtTramp 164 + PhysDevExtTramp 165 + PhysDevExtTramp 166 + PhysDevExtTramp 167 + PhysDevExtTramp 168 + PhysDevExtTramp 169 + PhysDevExtTramp 170 + PhysDevExtTramp 171 + PhysDevExtTramp 172 + PhysDevExtTramp 173 + PhysDevExtTramp 174 + PhysDevExtTramp 175 + PhysDevExtTramp 176 + PhysDevExtTramp 177 + PhysDevExtTramp 178 + PhysDevExtTramp 179 + PhysDevExtTramp 180 + PhysDevExtTramp 181 + PhysDevExtTramp 182 + PhysDevExtTramp 183 + PhysDevExtTramp 184 + PhysDevExtTramp 185 + PhysDevExtTramp 186 + PhysDevExtTramp 187 + PhysDevExtTramp 188 + PhysDevExtTramp 189 + PhysDevExtTramp 190 + PhysDevExtTramp 191 + PhysDevExtTramp 192 + PhysDevExtTramp 193 + PhysDevExtTramp 194 + PhysDevExtTramp 195 + PhysDevExtTramp 196 + PhysDevExtTramp 197 + PhysDevExtTramp 198 + PhysDevExtTramp 199 + PhysDevExtTramp 200 + PhysDevExtTramp 201 + PhysDevExtTramp 202 + PhysDevExtTramp 203 + PhysDevExtTramp 204 + PhysDevExtTramp 205 + PhysDevExtTramp 206 + PhysDevExtTramp 207 + PhysDevExtTramp 208 + PhysDevExtTramp 209 + PhysDevExtTramp 210 + PhysDevExtTramp 211 + PhysDevExtTramp 212 + PhysDevExtTramp 213 + PhysDevExtTramp 214 + PhysDevExtTramp 215 + PhysDevExtTramp 216 + PhysDevExtTramp 217 + PhysDevExtTramp 218 + PhysDevExtTramp 219 + PhysDevExtTramp 220 + PhysDevExtTramp 221 + PhysDevExtTramp 222 + PhysDevExtTramp 223 + PhysDevExtTramp 224 + PhysDevExtTramp 225 + PhysDevExtTramp 226 + PhysDevExtTramp 227 + PhysDevExtTramp 228 + PhysDevExtTramp 229 + PhysDevExtTramp 230 + PhysDevExtTramp 231 + PhysDevExtTramp 232 + PhysDevExtTramp 233 + PhysDevExtTramp 234 + PhysDevExtTramp 235 + PhysDevExtTramp 236 + PhysDevExtTramp 237 + PhysDevExtTramp 238 + PhysDevExtTramp 239 + PhysDevExtTramp 240 + PhysDevExtTramp 241 + PhysDevExtTramp 242 + PhysDevExtTramp 243 + PhysDevExtTramp 244 + PhysDevExtTramp 245 + PhysDevExtTramp 246 + PhysDevExtTramp 247 + PhysDevExtTramp 248 + PhysDevExtTramp 249 + + PhysDevExtTermin 0 + PhysDevExtTermin 1 + PhysDevExtTermin 2 + PhysDevExtTermin 3 + PhysDevExtTermin 4 + PhysDevExtTermin 5 + PhysDevExtTermin 6 + PhysDevExtTermin 7 + PhysDevExtTermin 8 + PhysDevExtTermin 9 + PhysDevExtTermin 10 + PhysDevExtTermin 11 + PhysDevExtTermin 12 + PhysDevExtTermin 13 + PhysDevExtTermin 14 + PhysDevExtTermin 15 + PhysDevExtTermin 16 + PhysDevExtTermin 17 + PhysDevExtTermin 18 + PhysDevExtTermin 19 + PhysDevExtTermin 20 + PhysDevExtTermin 21 + PhysDevExtTermin 22 + PhysDevExtTermin 23 + PhysDevExtTermin 24 + PhysDevExtTermin 25 + PhysDevExtTermin 26 + PhysDevExtTermin 27 + PhysDevExtTermin 28 + PhysDevExtTermin 29 + PhysDevExtTermin 30 + PhysDevExtTermin 31 + PhysDevExtTermin 32 + PhysDevExtTermin 33 + PhysDevExtTermin 34 + PhysDevExtTermin 35 + PhysDevExtTermin 36 + PhysDevExtTermin 37 + PhysDevExtTermin 38 + PhysDevExtTermin 39 + PhysDevExtTermin 40 + PhysDevExtTermin 41 + PhysDevExtTermin 42 + PhysDevExtTermin 43 + PhysDevExtTermin 44 + PhysDevExtTermin 45 + PhysDevExtTermin 46 + PhysDevExtTermin 47 + PhysDevExtTermin 48 + PhysDevExtTermin 49 + PhysDevExtTermin 50 + PhysDevExtTermin 51 + PhysDevExtTermin 52 + PhysDevExtTermin 53 + PhysDevExtTermin 54 + PhysDevExtTermin 55 + PhysDevExtTermin 56 + PhysDevExtTermin 57 + PhysDevExtTermin 58 + PhysDevExtTermin 59 + PhysDevExtTermin 60 + PhysDevExtTermin 61 + PhysDevExtTermin 62 + PhysDevExtTermin 63 + PhysDevExtTermin 64 + PhysDevExtTermin 65 + PhysDevExtTermin 66 + PhysDevExtTermin 67 + PhysDevExtTermin 68 + PhysDevExtTermin 69 + PhysDevExtTermin 70 + PhysDevExtTermin 71 + PhysDevExtTermin 72 + PhysDevExtTermin 73 + PhysDevExtTermin 74 + PhysDevExtTermin 75 + PhysDevExtTermin 76 + PhysDevExtTermin 77 + PhysDevExtTermin 78 + PhysDevExtTermin 79 + PhysDevExtTermin 80 + PhysDevExtTermin 81 + PhysDevExtTermin 82 + PhysDevExtTermin 83 + PhysDevExtTermin 84 + PhysDevExtTermin 85 + PhysDevExtTermin 86 + PhysDevExtTermin 87 + PhysDevExtTermin 88 + PhysDevExtTermin 89 + PhysDevExtTermin 90 + PhysDevExtTermin 91 + PhysDevExtTermin 92 + PhysDevExtTermin 93 + PhysDevExtTermin 94 + PhysDevExtTermin 95 + PhysDevExtTermin 96 + PhysDevExtTermin 97 + PhysDevExtTermin 98 + PhysDevExtTermin 99 + PhysDevExtTermin 100 + PhysDevExtTermin 101 + PhysDevExtTermin 102 + PhysDevExtTermin 103 + PhysDevExtTermin 104 + PhysDevExtTermin 105 + PhysDevExtTermin 106 + PhysDevExtTermin 107 + PhysDevExtTermin 108 + PhysDevExtTermin 109 + PhysDevExtTermin 110 + PhysDevExtTermin 111 + PhysDevExtTermin 112 + PhysDevExtTermin 113 + PhysDevExtTermin 114 + PhysDevExtTermin 115 + PhysDevExtTermin 116 + PhysDevExtTermin 117 + PhysDevExtTermin 118 + PhysDevExtTermin 119 + PhysDevExtTermin 120 + PhysDevExtTermin 121 + PhysDevExtTermin 122 + PhysDevExtTermin 123 + PhysDevExtTermin 124 + PhysDevExtTermin 125 + PhysDevExtTermin 126 + PhysDevExtTermin 127 + PhysDevExtTermin 128 + PhysDevExtTermin 129 + PhysDevExtTermin 130 + PhysDevExtTermin 131 + PhysDevExtTermin 132 + PhysDevExtTermin 133 + PhysDevExtTermin 134 + PhysDevExtTermin 135 + PhysDevExtTermin 136 + PhysDevExtTermin 137 + PhysDevExtTermin 138 + PhysDevExtTermin 139 + PhysDevExtTermin 140 + PhysDevExtTermin 141 + PhysDevExtTermin 142 + PhysDevExtTermin 143 + PhysDevExtTermin 144 + PhysDevExtTermin 145 + PhysDevExtTermin 146 + PhysDevExtTermin 147 + PhysDevExtTermin 148 + PhysDevExtTermin 149 + PhysDevExtTermin 150 + PhysDevExtTermin 151 + PhysDevExtTermin 152 + PhysDevExtTermin 153 + PhysDevExtTermin 154 + PhysDevExtTermin 155 + PhysDevExtTermin 156 + PhysDevExtTermin 157 + PhysDevExtTermin 158 + PhysDevExtTermin 159 + PhysDevExtTermin 160 + PhysDevExtTermin 161 + PhysDevExtTermin 162 + PhysDevExtTermin 163 + PhysDevExtTermin 164 + PhysDevExtTermin 165 + PhysDevExtTermin 166 + PhysDevExtTermin 167 + PhysDevExtTermin 168 + PhysDevExtTermin 169 + PhysDevExtTermin 170 + PhysDevExtTermin 171 + PhysDevExtTermin 172 + PhysDevExtTermin 173 + PhysDevExtTermin 174 + PhysDevExtTermin 175 + PhysDevExtTermin 176 + PhysDevExtTermin 177 + PhysDevExtTermin 178 + PhysDevExtTermin 179 + PhysDevExtTermin 180 + PhysDevExtTermin 181 + PhysDevExtTermin 182 + PhysDevExtTermin 183 + PhysDevExtTermin 184 + PhysDevExtTermin 185 + PhysDevExtTermin 186 + PhysDevExtTermin 187 + PhysDevExtTermin 188 + PhysDevExtTermin 189 + PhysDevExtTermin 190 + PhysDevExtTermin 191 + PhysDevExtTermin 192 + PhysDevExtTermin 193 + PhysDevExtTermin 194 + PhysDevExtTermin 195 + PhysDevExtTermin 196 + PhysDevExtTermin 197 + PhysDevExtTermin 198 + PhysDevExtTermin 199 + PhysDevExtTermin 200 + PhysDevExtTermin 201 + PhysDevExtTermin 202 + PhysDevExtTermin 203 + PhysDevExtTermin 204 + PhysDevExtTermin 205 + PhysDevExtTermin 206 + PhysDevExtTermin 207 + PhysDevExtTermin 208 + PhysDevExtTermin 209 + PhysDevExtTermin 210 + PhysDevExtTermin 211 + PhysDevExtTermin 212 + PhysDevExtTermin 213 + PhysDevExtTermin 214 + PhysDevExtTermin 215 + PhysDevExtTermin 216 + PhysDevExtTermin 217 + PhysDevExtTermin 218 + PhysDevExtTermin 219 + PhysDevExtTermin 220 + PhysDevExtTermin 221 + PhysDevExtTermin 222 + PhysDevExtTermin 223 + PhysDevExtTermin 224 + PhysDevExtTermin 225 + PhysDevExtTermin 226 + PhysDevExtTermin 227 + PhysDevExtTermin 228 + PhysDevExtTermin 229 + PhysDevExtTermin 230 + PhysDevExtTermin 231 + PhysDevExtTermin 232 + PhysDevExtTermin 233 + PhysDevExtTermin 234 + PhysDevExtTermin 235 + PhysDevExtTermin 236 + PhysDevExtTermin 237 + PhysDevExtTermin 238 + PhysDevExtTermin 239 + PhysDevExtTermin 240 + PhysDevExtTermin 241 + PhysDevExtTermin 242 + PhysDevExtTermin 243 + PhysDevExtTermin 244 + PhysDevExtTermin 245 + PhysDevExtTermin 246 + PhysDevExtTermin 247 + PhysDevExtTermin 248 + PhysDevExtTermin 249 + + DevExtTramp 0 + DevExtTramp 1 + DevExtTramp 2 + DevExtTramp 3 + DevExtTramp 4 + DevExtTramp 5 + DevExtTramp 6 + DevExtTramp 7 + DevExtTramp 8 + DevExtTramp 9 + DevExtTramp 10 + DevExtTramp 11 + DevExtTramp 12 + DevExtTramp 13 + DevExtTramp 14 + DevExtTramp 15 + DevExtTramp 16 + DevExtTramp 17 + DevExtTramp 18 + DevExtTramp 19 + DevExtTramp 20 + DevExtTramp 21 + DevExtTramp 22 + DevExtTramp 23 + DevExtTramp 24 + DevExtTramp 25 + DevExtTramp 26 + DevExtTramp 27 + DevExtTramp 28 + DevExtTramp 29 + DevExtTramp 30 + DevExtTramp 31 + DevExtTramp 32 + DevExtTramp 33 + DevExtTramp 34 + DevExtTramp 35 + DevExtTramp 36 + DevExtTramp 37 + DevExtTramp 38 + DevExtTramp 39 + DevExtTramp 40 + DevExtTramp 41 + DevExtTramp 42 + DevExtTramp 43 + DevExtTramp 44 + DevExtTramp 45 + DevExtTramp 46 + DevExtTramp 47 + DevExtTramp 48 + DevExtTramp 49 + DevExtTramp 50 + DevExtTramp 51 + DevExtTramp 52 + DevExtTramp 53 + DevExtTramp 54 + DevExtTramp 55 + DevExtTramp 56 + DevExtTramp 57 + DevExtTramp 58 + DevExtTramp 59 + DevExtTramp 60 + DevExtTramp 61 + DevExtTramp 62 + DevExtTramp 63 + DevExtTramp 64 + DevExtTramp 65 + DevExtTramp 66 + DevExtTramp 67 + DevExtTramp 68 + DevExtTramp 69 + DevExtTramp 70 + DevExtTramp 71 + DevExtTramp 72 + DevExtTramp 73 + DevExtTramp 74 + DevExtTramp 75 + DevExtTramp 76 + DevExtTramp 77 + DevExtTramp 78 + DevExtTramp 79 + DevExtTramp 80 + DevExtTramp 81 + DevExtTramp 82 + DevExtTramp 83 + DevExtTramp 84 + DevExtTramp 85 + DevExtTramp 86 + DevExtTramp 87 + DevExtTramp 88 + DevExtTramp 89 + DevExtTramp 90 + DevExtTramp 91 + DevExtTramp 92 + DevExtTramp 93 + DevExtTramp 94 + DevExtTramp 95 + DevExtTramp 96 + DevExtTramp 97 + DevExtTramp 98 + DevExtTramp 99 + DevExtTramp 100 + DevExtTramp 101 + DevExtTramp 102 + DevExtTramp 103 + DevExtTramp 104 + DevExtTramp 105 + DevExtTramp 106 + DevExtTramp 107 + DevExtTramp 108 + DevExtTramp 109 + DevExtTramp 110 + DevExtTramp 111 + DevExtTramp 112 + DevExtTramp 113 + DevExtTramp 114 + DevExtTramp 115 + DevExtTramp 116 + DevExtTramp 117 + DevExtTramp 118 + DevExtTramp 119 + DevExtTramp 120 + DevExtTramp 121 + DevExtTramp 122 + DevExtTramp 123 + DevExtTramp 124 + DevExtTramp 125 + DevExtTramp 126 + DevExtTramp 127 + DevExtTramp 128 + DevExtTramp 129 + DevExtTramp 130 + DevExtTramp 131 + DevExtTramp 132 + DevExtTramp 133 + DevExtTramp 134 + DevExtTramp 135 + DevExtTramp 136 + DevExtTramp 137 + DevExtTramp 138 + DevExtTramp 139 + DevExtTramp 140 + DevExtTramp 141 + DevExtTramp 142 + DevExtTramp 143 + DevExtTramp 144 + DevExtTramp 145 + DevExtTramp 146 + DevExtTramp 147 + DevExtTramp 148 + DevExtTramp 149 + DevExtTramp 150 + DevExtTramp 151 + DevExtTramp 152 + DevExtTramp 153 + DevExtTramp 154 + DevExtTramp 155 + DevExtTramp 156 + DevExtTramp 157 + DevExtTramp 158 + DevExtTramp 159 + DevExtTramp 160 + DevExtTramp 161 + DevExtTramp 162 + DevExtTramp 163 + DevExtTramp 164 + DevExtTramp 165 + DevExtTramp 166 + DevExtTramp 167 + DevExtTramp 168 + DevExtTramp 169 + DevExtTramp 170 + DevExtTramp 171 + DevExtTramp 172 + DevExtTramp 173 + DevExtTramp 174 + DevExtTramp 175 + DevExtTramp 176 + DevExtTramp 177 + DevExtTramp 178 + DevExtTramp 179 + DevExtTramp 180 + DevExtTramp 181 + DevExtTramp 182 + DevExtTramp 183 + DevExtTramp 184 + DevExtTramp 185 + DevExtTramp 186 + DevExtTramp 187 + DevExtTramp 188 + DevExtTramp 189 + DevExtTramp 190 + DevExtTramp 191 + DevExtTramp 192 + DevExtTramp 193 + DevExtTramp 194 + DevExtTramp 195 + DevExtTramp 196 + DevExtTramp 197 + DevExtTramp 198 + DevExtTramp 199 + DevExtTramp 200 + DevExtTramp 201 + DevExtTramp 202 + DevExtTramp 203 + DevExtTramp 204 + DevExtTramp 205 + DevExtTramp 206 + DevExtTramp 207 + DevExtTramp 208 + DevExtTramp 209 + DevExtTramp 210 + DevExtTramp 211 + DevExtTramp 212 + DevExtTramp 213 + DevExtTramp 214 + DevExtTramp 215 + DevExtTramp 216 + DevExtTramp 217 + DevExtTramp 218 + DevExtTramp 219 + DevExtTramp 220 + DevExtTramp 221 + DevExtTramp 222 + DevExtTramp 223 + DevExtTramp 224 + DevExtTramp 225 + DevExtTramp 226 + DevExtTramp 227 + DevExtTramp 228 + DevExtTramp 229 + DevExtTramp 230 + DevExtTramp 231 + DevExtTramp 232 + DevExtTramp 233 + DevExtTramp 234 + DevExtTramp 235 + DevExtTramp 236 + DevExtTramp 237 + DevExtTramp 238 + DevExtTramp 239 + DevExtTramp 240 + DevExtTramp 241 + DevExtTramp 242 + DevExtTramp 243 + DevExtTramp 244 + DevExtTramp 245 + DevExtTramp 246 + DevExtTramp 247 + DevExtTramp 248 + DevExtTramp 249 + +end diff --git a/third_party/vulkan/loader/vk_loader_extensions.c b/third_party/vulkan/loader/vk_loader_extensions.c index 2c257d6a1..38692e53a 100644 --- a/third_party/vulkan/loader/vk_loader_extensions.c +++ b/third_party/vulkan/loader/vk_loader_extensions.c @@ -215,6 +215,9 @@ VKAPI_ATTR bool VKAPI_CALL loader_icd_init_entries(struct loader_icd_term *icd_t LOOKUP_GIPA(CreateMacOSSurfaceMVK, false); #endif // VK_USE_PLATFORM_MACOS_MVK + // ---- VK_EXT_sample_locations extension commands + LOOKUP_GIPA(GetPhysicalDeviceMultisamplePropertiesEXT, false); + #undef LOOKUP_GIPA return true; @@ -421,6 +424,14 @@ VKAPI_ATTR void VKAPI_CALL loader_init_device_extension_dispatch_table(struct lo table->GetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR)gpa(dev, "vkGetBufferMemoryRequirements2KHR"); table->GetImageSparseMemoryRequirements2KHR = (PFN_vkGetImageSparseMemoryRequirements2KHR)gpa(dev, "vkGetImageSparseMemoryRequirements2KHR"); + // ---- VK_KHR_sampler_ycbcr_conversion extension commands + table->CreateSamplerYcbcrConversionKHR = (PFN_vkCreateSamplerYcbcrConversionKHR)gpa(dev, "vkCreateSamplerYcbcrConversionKHR"); + table->DestroySamplerYcbcrConversionKHR = (PFN_vkDestroySamplerYcbcrConversionKHR)gpa(dev, "vkDestroySamplerYcbcrConversionKHR"); + + // ---- VK_KHR_bind_memory2 extension commands + table->BindBufferMemory2KHR = (PFN_vkBindBufferMemory2KHR)gpa(dev, "vkBindBufferMemory2KHR"); + table->BindImageMemory2KHR = (PFN_vkBindImageMemory2KHR)gpa(dev, "vkBindImageMemory2KHR"); + // ---- VK_EXT_debug_marker extension commands table->DebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT)gpa(dev, "vkDebugMarkerSetObjectTagEXT"); table->DebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT)gpa(dev, "vkDebugMarkerSetObjectNameEXT"); @@ -432,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"); @@ -439,13 +453,11 @@ VKAPI_ATTR void VKAPI_CALL loader_init_device_extension_dispatch_table(struct lo // ---- VK_KHX_device_group extension commands table->GetDeviceGroupPeerMemoryFeaturesKHX = (PFN_vkGetDeviceGroupPeerMemoryFeaturesKHX)gpa(dev, "vkGetDeviceGroupPeerMemoryFeaturesKHX"); - table->BindBufferMemory2KHX = (PFN_vkBindBufferMemory2KHX)gpa(dev, "vkBindBufferMemory2KHX"); - table->BindImageMemory2KHX = (PFN_vkBindImageMemory2KHX)gpa(dev, "vkBindImageMemory2KHX"); table->CmdSetDeviceMaskKHX = (PFN_vkCmdSetDeviceMaskKHX)gpa(dev, "vkCmdSetDeviceMaskKHX"); + table->CmdDispatchBaseKHX = (PFN_vkCmdDispatchBaseKHX)gpa(dev, "vkCmdDispatchBaseKHX"); table->GetDeviceGroupPresentCapabilitiesKHX = (PFN_vkGetDeviceGroupPresentCapabilitiesKHX)gpa(dev, "vkGetDeviceGroupPresentCapabilitiesKHX"); table->GetDeviceGroupSurfacePresentModesKHX = (PFN_vkGetDeviceGroupSurfacePresentModesKHX)gpa(dev, "vkGetDeviceGroupSurfacePresentModesKHX"); table->AcquireNextImage2KHX = (PFN_vkAcquireNextImage2KHX)gpa(dev, "vkAcquireNextImage2KHX"); - table->CmdDispatchBaseKHX = (PFN_vkCmdDispatchBaseKHX)gpa(dev, "vkCmdDispatchBaseKHX"); // ---- VK_NVX_device_generated_commands extension commands table->CmdProcessCommandsNVX = (PFN_vkCmdProcessCommandsNVX)gpa(dev, "vkCmdProcessCommandsNVX"); @@ -475,6 +487,18 @@ VKAPI_ATTR void VKAPI_CALL loader_init_device_extension_dispatch_table(struct lo // ---- VK_EXT_hdr_metadata extension commands table->SetHdrMetadataEXT = (PFN_vkSetHdrMetadataEXT)gpa(dev, "vkSetHdrMetadataEXT"); + + // ---- VK_EXT_sample_locations extension commands + table->CmdSetSampleLocationsEXT = (PFN_vkCmdSetSampleLocationsEXT)gpa(dev, "vkCmdSetSampleLocationsEXT"); + + // ---- VK_EXT_validation_cache extension commands + table->CreateValidationCacheEXT = (PFN_vkCreateValidationCacheEXT)gpa(dev, "vkCreateValidationCacheEXT"); + 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"); } // Init Instance function pointer dispatch table with core commands @@ -628,6 +652,9 @@ VKAPI_ATTR void VKAPI_CALL loader_init_instance_extension_dispatch_table(VkLayer #ifdef VK_USE_PLATFORM_MACOS_MVK table->CreateMacOSSurfaceMVK = (PFN_vkCreateMacOSSurfaceMVK)gpa(inst, "vkCreateMacOSSurfaceMVK"); #endif // VK_USE_PLATFORM_MACOS_MVK + + // ---- VK_EXT_sample_locations extension commands + table->GetPhysicalDeviceMultisamplePropertiesEXT = (PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)gpa(inst, "vkGetPhysicalDeviceMultisamplePropertiesEXT"); } // Device command lookup function @@ -825,6 +852,14 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDis if (!strcmp(name, "GetBufferMemoryRequirements2KHR")) return (void *)table->GetBufferMemoryRequirements2KHR; if (!strcmp(name, "GetImageSparseMemoryRequirements2KHR")) return (void *)table->GetImageSparseMemoryRequirements2KHR; + // ---- VK_KHR_sampler_ycbcr_conversion extension commands + if (!strcmp(name, "CreateSamplerYcbcrConversionKHR")) return (void *)table->CreateSamplerYcbcrConversionKHR; + if (!strcmp(name, "DestroySamplerYcbcrConversionKHR")) return (void *)table->DestroySamplerYcbcrConversionKHR; + + // ---- VK_KHR_bind_memory2 extension commands + if (!strcmp(name, "BindBufferMemory2KHR")) return (void *)table->BindBufferMemory2KHR; + if (!strcmp(name, "BindImageMemory2KHR")) return (void *)table->BindImageMemory2KHR; + // ---- VK_EXT_debug_marker extension commands if (!strcmp(name, "DebugMarkerSetObjectTagEXT")) return (void *)table->DebugMarkerSetObjectTagEXT; if (!strcmp(name, "DebugMarkerSetObjectNameEXT")) return (void *)table->DebugMarkerSetObjectNameEXT; @@ -836,6 +871,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; @@ -843,13 +881,11 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDis // ---- VK_KHX_device_group extension commands if (!strcmp(name, "GetDeviceGroupPeerMemoryFeaturesKHX")) return (void *)table->GetDeviceGroupPeerMemoryFeaturesKHX; - if (!strcmp(name, "BindBufferMemory2KHX")) return (void *)table->BindBufferMemory2KHX; - if (!strcmp(name, "BindImageMemory2KHX")) return (void *)table->BindImageMemory2KHX; if (!strcmp(name, "CmdSetDeviceMaskKHX")) return (void *)table->CmdSetDeviceMaskKHX; + if (!strcmp(name, "CmdDispatchBaseKHX")) return (void *)table->CmdDispatchBaseKHX; if (!strcmp(name, "GetDeviceGroupPresentCapabilitiesKHX")) return (void *)table->GetDeviceGroupPresentCapabilitiesKHX; if (!strcmp(name, "GetDeviceGroupSurfacePresentModesKHX")) return (void *)table->GetDeviceGroupSurfacePresentModesKHX; if (!strcmp(name, "AcquireNextImage2KHX")) return (void *)table->AcquireNextImage2KHX; - if (!strcmp(name, "CmdDispatchBaseKHX")) return (void *)table->CmdDispatchBaseKHX; // ---- VK_NVX_device_generated_commands extension commands if (!strcmp(name, "CmdProcessCommandsNVX")) return (void *)table->CmdProcessCommandsNVX; @@ -880,6 +916,18 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_device_dispatch_table(const VkLayerDis // ---- VK_EXT_hdr_metadata extension commands if (!strcmp(name, "SetHdrMetadataEXT")) return (void *)table->SetHdrMetadataEXT; + // ---- VK_EXT_sample_locations extension commands + if (!strcmp(name, "CmdSetSampleLocationsEXT")) return (void *)table->CmdSetSampleLocationsEXT; + + // ---- VK_EXT_validation_cache extension commands + if (!strcmp(name, "CreateValidationCacheEXT")) return (void *)table->CreateValidationCacheEXT; + if (!strcmp(name, "DestroyValidationCacheEXT")) return (void *)table->DestroyValidationCacheEXT; + 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; + return NULL; } @@ -1037,6 +1085,9 @@ VKAPI_ATTR void* VKAPI_CALL loader_lookup_instance_dispatch_table(const VkLayerI if (!strcmp(name, "CreateMacOSSurfaceMVK")) return (void *)table->CreateMacOSSurfaceMVK; #endif // VK_USE_PLATFORM_MACOS_MVK + // ---- VK_EXT_sample_locations extension commands + if (!strcmp(name, "GetPhysicalDeviceMultisamplePropertiesEXT")) return (void *)table->GetPhysicalDeviceMultisamplePropertiesEXT; + *found_name = false; return NULL; } @@ -1268,11 +1319,50 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2KHR( } +// ---- VK_KHR_sampler_ycbcr_conversion extension trampoline/terminators + +VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversionKHR( + VkDevice device, + const VkSamplerYcbcrConversionCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSamplerYcbcrConversionKHR* pYcbcrConversion) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + return disp->CreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion); +} + +VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversionKHR( + VkDevice device, + VkSamplerYcbcrConversionKHR ycbcrConversion, + const VkAllocationCallbacks* pAllocator) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + disp->DestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator); +} + + +// ---- VK_KHR_bind_memory2 extension trampoline/terminators + +VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2KHR( + VkDevice device, + uint32_t bindInfoCount, + const VkBindBufferMemoryInfoKHR* pBindInfos) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + return disp->BindBufferMemory2KHR(device, bindInfoCount, pBindInfos); +} + +VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2KHR( + VkDevice device, + uint32_t bindInfoCount, + const VkBindImageMemoryInfoKHR* pBindInfos) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + return disp->BindImageMemory2KHR(device, bindInfoCount, pBindInfos); +} + + // ---- VK_EXT_debug_marker extension trampoline/terminators VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT( VkDevice device, - VkDebugMarkerObjectTagInfoEXT* pTagInfo) { + const VkDebugMarkerObjectTagInfoEXT* pTagInfo) { const VkLayerDispatchTable *disp = loader_get_dispatch(device); VkDebugMarkerObjectTagInfoEXT local_tag_info; memcpy(&local_tag_info, pTagInfo, sizeof(VkDebugMarkerObjectTagInfoEXT)); @@ -1286,7 +1376,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT( VKAPI_ATTR VkResult VKAPI_CALL terminator_DebugMarkerSetObjectTagEXT( VkDevice device, - VkDebugMarkerObjectTagInfoEXT* pTagInfo) { + const VkDebugMarkerObjectTagInfoEXT* pTagInfo) { uint32_t icd_index = 0; struct loader_device *dev; struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index); @@ -1314,7 +1404,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_DebugMarkerSetObjectTagEXT( VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT( VkDevice device, - VkDebugMarkerObjectNameInfoEXT* pNameInfo) { + const VkDebugMarkerObjectNameInfoEXT* pNameInfo) { const VkLayerDispatchTable *disp = loader_get_dispatch(device); VkDebugMarkerObjectNameInfoEXT local_name_info; memcpy(&local_name_info, pNameInfo, sizeof(VkDebugMarkerObjectNameInfoEXT)); @@ -1328,7 +1418,7 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT( VKAPI_ATTR VkResult VKAPI_CALL terminator_DebugMarkerSetObjectNameEXT( VkDevice device, - VkDebugMarkerObjectNameInfoEXT* pNameInfo) { + const VkDebugMarkerObjectNameInfoEXT* pNameInfo) { uint32_t icd_index = 0; struct loader_device *dev; struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index); @@ -1356,7 +1446,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_DebugMarkerSetObjectNameEXT( VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT( VkCommandBuffer commandBuffer, - VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { + const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer); disp->CmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo); } @@ -1369,7 +1459,7 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerEndEXT( VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerInsertEXT( VkCommandBuffer commandBuffer, - VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { + const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer); disp->CmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo); } @@ -1402,6 +1492,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 @@ -1428,22 +1532,6 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeaturesKHX( disp->GetDeviceGroupPeerMemoryFeaturesKHX(device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures); } -VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2KHX( - VkDevice device, - uint32_t bindInfoCount, - const VkBindBufferMemoryInfoKHX* pBindInfos) { - const VkLayerDispatchTable *disp = loader_get_dispatch(device); - return disp->BindBufferMemory2KHX(device, bindInfoCount, pBindInfos); -} - -VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2KHX( - VkDevice device, - uint32_t bindInfoCount, - const VkBindImageMemoryInfoKHX* pBindInfos) { - const VkLayerDispatchTable *disp = loader_get_dispatch(device); - return disp->BindImageMemory2KHX(device, bindInfoCount, pBindInfos); -} - VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMaskKHX( VkCommandBuffer commandBuffer, uint32_t deviceMask) { @@ -1451,6 +1539,18 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMaskKHX( disp->CmdSetDeviceMaskKHX(commandBuffer, deviceMask); } +VKAPI_ATTR void VKAPI_CALL CmdDispatchBaseKHX( + VkCommandBuffer commandBuffer, + uint32_t baseGroupX, + uint32_t baseGroupY, + uint32_t baseGroupZ, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ) { + const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer); + disp->CmdDispatchBaseKHX(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); +} + VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupPresentCapabilitiesKHX( VkDevice device, VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities) { @@ -1483,26 +1583,6 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_GetDeviceGroupSurfacePresentModesKHX( return VK_SUCCESS; } -VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImage2KHX( - VkDevice device, - const VkAcquireNextImageInfoKHX* pAcquireInfo, - uint32_t* pImageIndex) { - const VkLayerDispatchTable *disp = loader_get_dispatch(device); - return disp->AcquireNextImage2KHX(device, pAcquireInfo, pImageIndex); -} - -VKAPI_ATTR void VKAPI_CALL CmdDispatchBaseKHX( - VkCommandBuffer commandBuffer, - uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ) { - const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer); - disp->CmdDispatchBaseKHX(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); -} - VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDevicePresentRectanglesKHX( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, @@ -1533,6 +1613,14 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDevicePresentRectanglesKHX( return icd_term->dispatch.GetPhysicalDevicePresentRectanglesKHX(phys_dev_term->phys_dev, surface, pRectCount, pRects); } +VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImage2KHX( + VkDevice device, + const VkAcquireNextImageInfoKHX* pAcquireInfo, + uint32_t* pImageIndex) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + return disp->AcquireNextImage2KHX(device, pAcquireInfo, pImageIndex); +} + // ---- VK_NN_vi_surface extension trampoline/terminators @@ -1788,6 +1876,89 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateMacOSSurfaceMVK( } #endif // VK_USE_PLATFORM_MACOS_MVK + +// ---- VK_EXT_sample_locations extension trampoline/terminators + +VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEXT( + VkCommandBuffer commandBuffer, + const VkSampleLocationsInfoEXT* pSampleLocationsInfo) { + const VkLayerDispatchTable *disp = loader_get_dispatch(commandBuffer); + disp->CmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo); +} + +VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMultisamplePropertiesEXT( + VkPhysicalDevice physicalDevice, + VkSampleCountFlagBits samples, + VkMultisamplePropertiesEXT* pMultisampleProperties) { + const VkLayerInstanceDispatchTable *disp; + VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice); + disp = loader_get_instance_layer_dispatch(physicalDevice); + disp->GetPhysicalDeviceMultisamplePropertiesEXT(unwrapped_phys_dev, samples, pMultisampleProperties); +} + +VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceMultisamplePropertiesEXT( + VkPhysicalDevice physicalDevice, + VkSampleCountFlagBits samples, + VkMultisamplePropertiesEXT* pMultisampleProperties) { + struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice; + struct loader_icd_term *icd_term = phys_dev_term->this_icd_term; + if (NULL == icd_term->dispatch.GetPhysicalDeviceMultisamplePropertiesEXT) { + loader_log(icd_term->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0, + "ICD associated with VkPhysicalDevice does not support GetPhysicalDeviceMultisamplePropertiesEXT"); + } + icd_term->dispatch.GetPhysicalDeviceMultisamplePropertiesEXT(phys_dev_term->phys_dev, samples, pMultisampleProperties); +} + + +// ---- VK_EXT_validation_cache extension trampoline/terminators + +VKAPI_ATTR VkResult VKAPI_CALL CreateValidationCacheEXT( + VkDevice device, + const VkValidationCacheCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkValidationCacheEXT* pValidationCache) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + return disp->CreateValidationCacheEXT(device, pCreateInfo, pAllocator, pValidationCache); +} + +VKAPI_ATTR void VKAPI_CALL DestroyValidationCacheEXT( + VkDevice device, + VkValidationCacheEXT validationCache, + const VkAllocationCallbacks* pAllocator) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + disp->DestroyValidationCacheEXT(device, validationCache, pAllocator); +} + +VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT( + VkDevice device, + VkValidationCacheEXT dstCache, + uint32_t srcCacheCount, + const VkValidationCacheEXT* pSrcCaches) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + return disp->MergeValidationCachesEXT(device, dstCache, srcCacheCount, pSrcCaches); +} + +VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT( + VkDevice device, + VkValidationCacheEXT validationCache, + size_t* pDataSize, + void* pData) { + const VkLayerDispatchTable *disp = loader_get_dispatch(device); + 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); +} + // GPA helpers for extensions bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *name, void **addr) { *addr = NULL; @@ -1997,6 +2168,26 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na return true; } + // ---- VK_KHR_sampler_ycbcr_conversion extension commands + if (!strcmp("vkCreateSamplerYcbcrConversionKHR", name)) { + *addr = (void *)CreateSamplerYcbcrConversionKHR; + return true; + } + if (!strcmp("vkDestroySamplerYcbcrConversionKHR", name)) { + *addr = (void *)DestroySamplerYcbcrConversionKHR; + return true; + } + + // ---- VK_KHR_bind_memory2 extension commands + if (!strcmp("vkBindBufferMemory2KHR", name)) { + *addr = (void *)BindBufferMemory2KHR; + return true; + } + if (!strcmp("vkBindImageMemory2KHR", name)) { + *addr = (void *)BindImageMemory2KHR; + return true; + } + // ---- VK_EXT_debug_marker extension commands if (!strcmp("vkDebugMarkerSetObjectTagEXT", name)) { *addr = (void *)DebugMarkerSetObjectTagEXT; @@ -2029,6 +2220,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) @@ -2050,18 +2247,14 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na *addr = (void *)GetDeviceGroupPeerMemoryFeaturesKHX; return true; } - if (!strcmp("vkBindBufferMemory2KHX", name)) { - *addr = (void *)BindBufferMemory2KHX; - return true; - } - if (!strcmp("vkBindImageMemory2KHX", name)) { - *addr = (void *)BindImageMemory2KHX; - return true; - } if (!strcmp("vkCmdSetDeviceMaskKHX", name)) { *addr = (void *)CmdSetDeviceMaskKHX; return true; } + if (!strcmp("vkCmdDispatchBaseKHX", name)) { + *addr = (void *)CmdDispatchBaseKHX; + return true; + } if (!strcmp("vkGetDeviceGroupPresentCapabilitiesKHX", name)) { *addr = (void *)GetDeviceGroupPresentCapabilitiesKHX; return true; @@ -2070,18 +2263,14 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na *addr = (void *)GetDeviceGroupSurfacePresentModesKHX; return true; } - if (!strcmp("vkAcquireNextImage2KHX", name)) { - *addr = (void *)AcquireNextImage2KHX; - return true; - } - if (!strcmp("vkCmdDispatchBaseKHX", name)) { - *addr = (void *)CmdDispatchBaseKHX; - return true; - } if (!strcmp("vkGetPhysicalDevicePresentRectanglesKHX", name)) { *addr = (void *)GetPhysicalDevicePresentRectanglesKHX; return true; } + if (!strcmp("vkAcquireNextImage2KHX", name)) { + *addr = (void *)AcquireNextImage2KHX; + return true; + } // ---- VK_NN_vi_surface extension commands #ifdef VK_USE_PLATFORM_VI_NN @@ -2238,6 +2427,40 @@ bool extension_instance_gpa(struct loader_instance *ptr_instance, const char *na return true; } #endif // VK_USE_PLATFORM_MACOS_MVK + + // ---- VK_EXT_sample_locations extension commands + if (!strcmp("vkCmdSetSampleLocationsEXT", name)) { + *addr = (void *)CmdSetSampleLocationsEXT; + return true; + } + if (!strcmp("vkGetPhysicalDeviceMultisamplePropertiesEXT", name)) { + *addr = (void *)GetPhysicalDeviceMultisamplePropertiesEXT; + return true; + } + + // ---- VK_EXT_validation_cache extension commands + if (!strcmp("vkCreateValidationCacheEXT", name)) { + *addr = (void *)CreateValidationCacheEXT; + return true; + } + if (!strcmp("vkDestroyValidationCacheEXT", name)) { + *addr = (void *)DestroyValidationCacheEXT; + return true; + } + if (!strcmp("vkMergeValidationCachesEXT", name)) { + *addr = (void *)MergeValidationCachesEXT; + return true; + } + if (!strcmp("vkGetValidationCacheDataEXT", name)) { + *addr = (void *)GetValidationCacheDataEXT; + return true; + } + + // ---- VK_EXT_external_memory_host extension commands + if (!strcmp("vkGetMemoryHostPointerPropertiesEXT", name)) { + *addr = (void *)GetMemoryHostPointerPropertiesEXT; + return true; + } return false; } @@ -2482,6 +2705,9 @@ const VkLayerInstanceDispatchTable instance_disp = { #ifdef VK_USE_PLATFORM_MACOS_MVK .CreateMacOSSurfaceMVK = terminator_CreateMacOSSurfaceMVK, #endif // VK_USE_PLATFORM_MACOS_MVK + + // ---- VK_EXT_sample_locations extension commands + .GetPhysicalDeviceMultisamplePropertiesEXT = terminator_GetPhysicalDeviceMultisamplePropertiesEXT, }; // A null-terminated list of all of the instance extensions supported by the loader. diff --git a/third_party/vulkan/loader/vk_loader_extensions.h b/third_party/vulkan/loader/vk_loader_extensions.h index 709e98472..474adb950 100644 --- a/third_party/vulkan/loader/vk_loader_extensions.h +++ b/third_party/vulkan/loader/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( @@ -312,6 +314,9 @@ struct loader_icd_term_dispatch { #ifdef VK_USE_PLATFORM_MACOS_MVK PFN_vkCreateMacOSSurfaceMVK CreateMacOSSurfaceMVK; #endif // VK_USE_PLATFORM_MACOS_MVK + + // ---- VK_EXT_sample_locations extension commands + PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT GetPhysicalDeviceMultisamplePropertiesEXT; }; union loader_instance_extension_enables { diff --git a/third_party/vulkan/loader/vk_loader_platform.h b/third_party/vulkan/loader/vk_loader_platform.h index c1ae0d85f..40de844eb 100644 --- a/third_party/vulkan/loader/vk_loader_platform.h +++ b/third_party/vulkan/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 @@ -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,11 +182,38 @@ 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 "" #define PRINTF_SIZE_T_SPECIFIER "%Iu" +#if defined(_WIN32) +// Get the key for the plug n play driver registry +// The string returned by this function should NOT be freed +static inline const char *LoaderPnpDriverRegistry() { + BOOL is_wow; + IsWow64Process(GetCurrentProcess(), &is_wow); + return is_wow ? (API_NAME "DriverNameWow") : (API_NAME "DriverName"); +} + +// Get the key for the plug 'n play explicit layer registry +// The string returned by this function should NOT be freed +static inline const char *LoaderPnpELayerRegistry() { + BOOL is_wow; + IsWow64Process(GetCurrentProcess(), &is_wow); + return is_wow ? (API_NAME "ExplicitLayersWow") : (API_NAME "ExplicitLayers"); +} +// Get the key for the plug 'n play implicit layer registry +// The string returned by this function should NOT be freed + +static inline const char *LoaderPnpILayerRegistry() { + BOOL is_wow; + IsWow64Process(GetCurrentProcess(), &is_wow); + return is_wow ? (API_NAME "ImplicitLayersWow") : (API_NAME "ImplicitLayers"); +} +#endif + // File IO static bool loader_platform_file_exists(const char *path) { if ((_access(path, 0)) == -1) @@ -254,7 +281,7 @@ 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); } @@ -272,19 +299,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); } +#endif // Thread IDs: typedef DWORD loader_platform_thread_id; diff --git a/third_party/vulkan/vk_icd.h b/third_party/vulkan/vk_icd.h index 1983e5d4e..b8c7efcb6 100644 --- a/third_party/vulkan/vk_icd.h +++ b/third_party/vulkan/vk_icd.h @@ -47,7 +47,7 @@ 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 -// flie directly, it won't be found. +// file directly, it won't be found. #ifndef PFN_GetPhysicalDeviceProcAddr typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName); #endif diff --git a/third_party/vulkan/vk_layer.h b/third_party/vulkan/vk_layer.h index a7ac29150..147dcd43a 100644 --- a/third_party/vulkan/vk_layer.h +++ b/third_party/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/third_party/vulkan/vk_layer_dispatch_table.h b/third_party/vulkan/vk_layer_dispatch_table.h index 01c80a32f..435c625c6 100644 --- a/third_party/vulkan/vk_layer_dispatch_table.h +++ b/third_party/vulkan/vk_layer_dispatch_table.h @@ -177,6 +177,9 @@ typedef struct VkLayerInstanceDispatchTable_ { #ifdef VK_USE_PLATFORM_MACOS_MVK PFN_vkCreateMacOSSurfaceMVK CreateMacOSSurfaceMVK; #endif // VK_USE_PLATFORM_MACOS_MVK + + // ---- VK_EXT_sample_locations extension commands + PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT GetPhysicalDeviceMultisamplePropertiesEXT; } VkLayerInstanceDispatchTable; // Device function pointer dispatch table @@ -371,6 +374,14 @@ typedef struct VkLayerDispatchTable_ { PFN_vkGetBufferMemoryRequirements2KHR GetBufferMemoryRequirements2KHR; PFN_vkGetImageSparseMemoryRequirements2KHR GetImageSparseMemoryRequirements2KHR; + // ---- VK_KHR_sampler_ycbcr_conversion extension commands + PFN_vkCreateSamplerYcbcrConversionKHR CreateSamplerYcbcrConversionKHR; + PFN_vkDestroySamplerYcbcrConversionKHR DestroySamplerYcbcrConversionKHR; + + // ---- VK_KHR_bind_memory2 extension commands + PFN_vkBindBufferMemory2KHR BindBufferMemory2KHR; + PFN_vkBindImageMemory2KHR BindImageMemory2KHR; + // ---- VK_EXT_debug_marker extension commands PFN_vkDebugMarkerSetObjectTagEXT DebugMarkerSetObjectTagEXT; PFN_vkDebugMarkerSetObjectNameEXT DebugMarkerSetObjectNameEXT; @@ -382,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; @@ -389,13 +403,11 @@ typedef struct VkLayerDispatchTable_ { // ---- VK_KHX_device_group extension commands PFN_vkGetDeviceGroupPeerMemoryFeaturesKHX GetDeviceGroupPeerMemoryFeaturesKHX; - PFN_vkBindBufferMemory2KHX BindBufferMemory2KHX; - PFN_vkBindImageMemory2KHX BindImageMemory2KHX; PFN_vkCmdSetDeviceMaskKHX CmdSetDeviceMaskKHX; + PFN_vkCmdDispatchBaseKHX CmdDispatchBaseKHX; PFN_vkGetDeviceGroupPresentCapabilitiesKHX GetDeviceGroupPresentCapabilitiesKHX; PFN_vkGetDeviceGroupSurfacePresentModesKHX GetDeviceGroupSurfacePresentModesKHX; PFN_vkAcquireNextImage2KHX AcquireNextImage2KHX; - PFN_vkCmdDispatchBaseKHX CmdDispatchBaseKHX; // ---- VK_NVX_device_generated_commands extension commands PFN_vkCmdProcessCommandsNVX CmdProcessCommandsNVX; @@ -425,6 +437,18 @@ typedef struct VkLayerDispatchTable_ { // ---- VK_EXT_hdr_metadata extension commands PFN_vkSetHdrMetadataEXT SetHdrMetadataEXT; + + // ---- VK_EXT_sample_locations extension commands + PFN_vkCmdSetSampleLocationsEXT CmdSetSampleLocationsEXT; + + // ---- VK_EXT_validation_cache extension commands + PFN_vkCreateValidationCacheEXT CreateValidationCacheEXT; + PFN_vkDestroyValidationCacheEXT DestroyValidationCacheEXT; + PFN_vkMergeValidationCachesEXT MergeValidationCachesEXT; + PFN_vkGetValidationCacheDataEXT GetValidationCacheDataEXT; + + // ---- VK_EXT_external_memory_host extension commands + PFN_vkGetMemoryHostPointerPropertiesEXT GetMemoryHostPointerPropertiesEXT; } VkLayerDispatchTable; diff --git a/third_party/vulkan/vk_sdk_platform.h b/third_party/vulkan/vk_sdk_platform.h index ef9a000fb..96d867694 100644 --- a/third_party/vulkan/vk_sdk_platform.h +++ b/third_party/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/third_party/vulkan/vulkan.h b/third_party/vulkan/vulkan.h index 16434fefb..d3e2e246c 100644 --- a/third_party/vulkan/vulkan.h +++ b/third_party/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. @@ -34,16 +34,16 @@ extern "C" { (((major) << 22) | ((minor) << 12) | (patch)) // DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead. -//#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) +//#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) // Patch version should always be set to 0 // Vulkan 1.0 version number -#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0) +#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)// Patch version should always be set to 0 #define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22) #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 54 +#define VK_HEADER_VERSION 68 #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), @@ -241,16 +242,16 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000, - VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001, - VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002, VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003, VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004, VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005, VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006, + VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010, + VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHX = 1000060013, + VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHX = 1000060014, VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007, VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009, - VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010, VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011, VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012, VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, @@ -293,7 +294,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004, VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000, - VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000, + VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT = 1000090000, VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000, VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001, VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002, @@ -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, @@ -313,6 +316,10 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002, VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR = 1000115000, VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR = 1000115001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = 1000117000, + VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = 1000117001, + VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR = 1000117002, + VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = 1000117003, 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, @@ -323,16 +330,36 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = 1000127001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000, VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001, + VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000, + VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001, + VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003, + VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT = 1000143004, VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146000, VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146001, VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146002, VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = 1000146003, VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = 1000146004, + VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR = 1000147000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001, VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002, VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000, VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000, + VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = 1000156000, + VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR = 1000156001, + VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR = 1000156002, + VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = 1000156003, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = 1000156004, + VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = 1000156005, + VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR = 1000157000, + 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), @@ -553,6 +580,40 @@ typedef enum VkFormat { VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, + VK_FORMAT_G8B8G8R8_422_UNORM_KHR = 1000156000, + VK_FORMAT_B8G8R8G8_422_UNORM_KHR = 1000156001, + VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR = 1000156002, + VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR = 1000156003, + VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR = 1000156004, + VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR = 1000156005, + VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR = 1000156006, + VK_FORMAT_R10X6_UNORM_PACK16_KHR = 1000156007, + VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR = 1000156008, + VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = 1000156009, + VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = 1000156010, + VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = 1000156011, + VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = 1000156012, + VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = 1000156013, + VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = 1000156014, + VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = 1000156015, + VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = 1000156016, + VK_FORMAT_R12X4_UNORM_PACK16_KHR = 1000156017, + VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR = 1000156018, + VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = 1000156019, + VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = 1000156020, + VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = 1000156021, + VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = 1000156022, + VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = 1000156023, + VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = 1000156024, + VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = 1000156025, + VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = 1000156026, + VK_FORMAT_G16B16G16R16_422_UNORM_KHR = 1000156027, + VK_FORMAT_B16G16R16G16_422_UNORM_KHR = 1000156028, + VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR = 1000156029, + VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR = 1000156030, + VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR = 1000156031, + VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR = 1000156032, + VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR = 1000156033, VK_FORMAT_BEGIN_RANGE = VK_FORMAT_UNDEFINED, VK_FORMAT_END_RANGE = VK_FORMAT_ASTC_12x12_SRGB_BLOCK, VK_FORMAT_RANGE_SIZE = (VK_FORMAT_ASTC_12x12_SRGB_BLOCK - VK_FORMAT_UNDEFINED + 1), @@ -621,6 +682,8 @@ typedef enum VkImageLayout { VK_IMAGE_LAYOUT_PREINITIALIZED = 8, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000, + VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = 1000117000, + VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = 1000117001, VK_IMAGE_LAYOUT_BEGIN_RANGE = VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_END_RANGE = VK_IMAGE_LAYOUT_PREINITIALIZED, VK_IMAGE_LAYOUT_RANGE_SIZE = (VK_IMAGE_LAYOUT_PREINITIALIZED - VK_IMAGE_LAYOUT_UNDEFINED + 1), @@ -851,6 +914,7 @@ typedef enum VkDynamicState { VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8, VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000, VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000, + VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT = 1000143000, VK_DYNAMIC_STATE_BEGIN_RANGE = VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_END_RANGE = VK_DYNAMIC_STATE_STENCIL_REFERENCE, VK_DYNAMIC_STATE_RANGE_SIZE = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1), @@ -1009,6 +1073,8 @@ typedef enum VkObjectType { VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = 1000085000, VK_OBJECT_TYPE_OBJECT_TABLE_NVX = 1000086000, VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX = 1000086001, + VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR = 1000156000, + VK_OBJECT_TYPE_VALIDATION_CACHE_EXT = 1000160000, VK_OBJECT_TYPE_BEGIN_RANGE = VK_OBJECT_TYPE_UNKNOWN, VK_OBJECT_TYPE_END_RANGE = VK_OBJECT_TYPE_COMMAND_POOL, VK_OBJECT_TYPE_RANGE_SIZE = (VK_OBJECT_TYPE_COMMAND_POOL - VK_OBJECT_TYPE_UNKNOWN + 1), @@ -1035,6 +1101,13 @@ typedef enum VkFormatFeatureFlagBits { VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000, VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 0x00010000, + VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 0x00020000, + VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 0x00040000, + VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 0x00080000, + VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 0x00100000, + VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 0x00200000, + VK_FORMAT_FEATURE_DISJOINT_BIT_KHR = 0x00400000, + VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR = 0x00800000, VK_FORMAT_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkFormatFeatureFlagBits; typedef VkFlags VkFormatFeatureFlags; @@ -1060,6 +1133,11 @@ typedef enum VkImageCreateFlagBits { VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040, VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020, + VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = 0x00000080, + VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR = 0x00000100, + VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000, + VK_IMAGE_CREATE_DISJOINT_BIT_KHR = 0x00000200, + VK_IMAGE_CREATE_ALIAS_BIT_KHR = 0x00000400, VK_IMAGE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkImageCreateFlagBits; typedef VkFlags VkImageCreateFlags; @@ -1133,6 +1211,9 @@ typedef enum VkImageAspectFlagBits { VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, + VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = 0x00000010, + VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = 0x00000020, + VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = 0x00000040, VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkImageAspectFlagBits; typedef VkFlags VkImageAspectFlags; @@ -1366,6 +1447,27 @@ typedef enum VkStencilFaceFlagBits { } VkStencilFaceFlagBits; typedef VkFlags VkStencilFaceFlags; +typedef struct VkApplicationInfo { + VkStructureType sType; + const void* pNext; + const char* pApplicationName; + uint32_t applicationVersion; + const char* pEngineName; + uint32_t engineVersion; + uint32_t apiVersion; +} VkApplicationInfo; + +typedef struct VkInstanceCreateInfo { + VkStructureType sType; + const void* pNext; + VkInstanceCreateFlags flags; + const VkApplicationInfo* pApplicationInfo; + uint32_t enabledLayerCount; + const char* const* ppEnabledLayerNames; + uint32_t enabledExtensionCount; + const char* const* ppEnabledExtensionNames; +} VkInstanceCreateInfo; + typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)( void* pUserData, size_t size, @@ -1395,29 +1497,6 @@ typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)( VkInternalAllocationType allocationType, VkSystemAllocationScope allocationScope); -typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void); - -typedef struct VkApplicationInfo { - VkStructureType sType; - const void* pNext; - const char* pApplicationName; - uint32_t applicationVersion; - const char* pEngineName; - uint32_t engineVersion; - uint32_t apiVersion; -} VkApplicationInfo; - -typedef struct VkInstanceCreateInfo { - VkStructureType sType; - const void* pNext; - VkInstanceCreateFlags flags; - const VkApplicationInfo* pApplicationInfo; - uint32_t enabledLayerCount; - const char* const* ppEnabledLayerNames; - uint32_t enabledExtensionCount; - const char* const* ppEnabledExtensionNames; -} VkInstanceCreateInfo; - typedef struct VkAllocationCallbacks { void* pUserData; PFN_vkAllocationFunction pfnAllocation; @@ -1658,6 +1737,7 @@ typedef struct VkPhysicalDeviceMemoryProperties { VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS]; } VkPhysicalDeviceMemoryProperties; +typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void); typedef struct VkDeviceQueueCreateInfo { VkStructureType sType; const void* pNext; @@ -3433,6 +3513,7 @@ typedef enum VkColorSpaceKHR { VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013, + VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014, VK_COLOR_SPACE_BEGIN_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, VK_COLOR_SPACE_END_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, VK_COLOR_SPACE_RANGE_SIZE_KHR = (VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - VK_COLOR_SPACE_SRGB_NONLINEAR_KHR + 1), @@ -4119,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; @@ -4774,6 +4858,62 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceFdKHR( int* pFd); #endif +#define VK_KHR_maintenance2 1 +#define VK_KHR_MAINTENANCE2_SPEC_VERSION 1 +#define VK_KHR_MAINTENANCE2_EXTENSION_NAME "VK_KHR_maintenance2" + + +typedef enum VkPointClippingBehaviorKHR { + VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR = 0, + VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR = 1, + VK_POINT_CLIPPING_BEHAVIOR_BEGIN_RANGE_KHR = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR, + VK_POINT_CLIPPING_BEHAVIOR_END_RANGE_KHR = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR, + VK_POINT_CLIPPING_BEHAVIOR_RANGE_SIZE_KHR = (VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR - VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR + 1), + VK_POINT_CLIPPING_BEHAVIOR_MAX_ENUM_KHR = 0x7FFFFFFF +} VkPointClippingBehaviorKHR; + +typedef enum VkTessellationDomainOriginKHR { + VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR = 0, + VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR = 1, + VK_TESSELLATION_DOMAIN_ORIGIN_BEGIN_RANGE_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR, + VK_TESSELLATION_DOMAIN_ORIGIN_END_RANGE_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR, + VK_TESSELLATION_DOMAIN_ORIGIN_RANGE_SIZE_KHR = (VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR - VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR + 1), + VK_TESSELLATION_DOMAIN_ORIGIN_MAX_ENUM_KHR = 0x7FFFFFFF +} VkTessellationDomainOriginKHR; + +typedef struct VkPhysicalDevicePointClippingPropertiesKHR { + VkStructureType sType; + void* pNext; + VkPointClippingBehaviorKHR pointClippingBehavior; +} VkPhysicalDevicePointClippingPropertiesKHR; + +typedef struct VkInputAttachmentAspectReferenceKHR { + uint32_t subpass; + uint32_t inputAttachmentIndex; + VkImageAspectFlags aspectMask; +} VkInputAttachmentAspectReferenceKHR; + +typedef struct VkRenderPassInputAttachmentAspectCreateInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t aspectReferenceCount; + const VkInputAttachmentAspectReferenceKHR* pAspectReferences; +} VkRenderPassInputAttachmentAspectCreateInfoKHR; + +typedef struct VkImageViewUsageCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkImageUsageFlags usage; +} VkImageViewUsageCreateInfoKHR; + +typedef struct VkPipelineTessellationDomainOriginStateCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkTessellationDomainOriginKHR domainOrigin; +} VkPipelineTessellationDomainOriginStateCreateInfoKHR; + + + #define VK_KHR_get_surface_capabilities2 1 #define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1 #define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2" @@ -4827,7 +4967,7 @@ typedef struct VkPhysicalDeviceVariablePointerFeaturesKHR { #define VK_KHR_dedicated_allocation 1 -#define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 1 +#define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 3 #define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation" typedef struct VkMemoryDedicatedRequirementsKHR { @@ -4851,6 +4991,11 @@ typedef struct VkMemoryDedicatedAllocateInfoKHR { #define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME "VK_KHR_storage_buffer_storage_class" +#define VK_KHR_relaxed_block_layout 1 +#define VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION 1 +#define VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME "VK_KHR_relaxed_block_layout" + + #define VK_KHR_get_memory_requirements2 1 #define VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION 1 #define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME "VK_KHR_get_memory_requirements2" @@ -4908,10 +5053,156 @@ VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR( VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements); #endif +#define VK_KHR_image_format_list 1 +#define VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION 1 +#define VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME "VK_KHR_image_format_list" + +typedef struct VkImageFormatListCreateInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t viewFormatCount; + const VkFormat* pViewFormats; +} VkImageFormatListCreateInfoKHR; + + + +#define VK_KHR_sampler_ycbcr_conversion 1 +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversionKHR) + +#define VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION 1 +#define VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME "VK_KHR_sampler_ycbcr_conversion" + + +typedef enum VkSamplerYcbcrModelConversionKHR { + VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR = 0, + VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR = 1, + VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR = 2, + VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR = 3, + VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR = 4, + VK_SAMPLER_YCBCR_MODEL_CONVERSION_BEGIN_RANGE_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR, + VK_SAMPLER_YCBCR_MODEL_CONVERSION_END_RANGE_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR, + VK_SAMPLER_YCBCR_MODEL_CONVERSION_RANGE_SIZE_KHR = (VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR - VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR + 1), + VK_SAMPLER_YCBCR_MODEL_CONVERSION_MAX_ENUM_KHR = 0x7FFFFFFF +} VkSamplerYcbcrModelConversionKHR; + +typedef enum VkSamplerYcbcrRangeKHR { + VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR = 0, + VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR = 1, + VK_SAMPLER_YCBCR_RANGE_BEGIN_RANGE_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR, + VK_SAMPLER_YCBCR_RANGE_END_RANGE_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR, + VK_SAMPLER_YCBCR_RANGE_RANGE_SIZE_KHR = (VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR - VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR + 1), + VK_SAMPLER_YCBCR_RANGE_MAX_ENUM_KHR = 0x7FFFFFFF +} VkSamplerYcbcrRangeKHR; + +typedef enum VkChromaLocationKHR { + VK_CHROMA_LOCATION_COSITED_EVEN_KHR = 0, + VK_CHROMA_LOCATION_MIDPOINT_KHR = 1, + VK_CHROMA_LOCATION_BEGIN_RANGE_KHR = VK_CHROMA_LOCATION_COSITED_EVEN_KHR, + VK_CHROMA_LOCATION_END_RANGE_KHR = VK_CHROMA_LOCATION_MIDPOINT_KHR, + VK_CHROMA_LOCATION_RANGE_SIZE_KHR = (VK_CHROMA_LOCATION_MIDPOINT_KHR - VK_CHROMA_LOCATION_COSITED_EVEN_KHR + 1), + VK_CHROMA_LOCATION_MAX_ENUM_KHR = 0x7FFFFFFF +} VkChromaLocationKHR; + +typedef struct VkSamplerYcbcrConversionCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkFormat format; + VkSamplerYcbcrModelConversionKHR ycbcrModel; + VkSamplerYcbcrRangeKHR ycbcrRange; + VkComponentMapping components; + VkChromaLocationKHR xChromaOffset; + VkChromaLocationKHR yChromaOffset; + VkFilter chromaFilter; + VkBool32 forceExplicitReconstruction; +} VkSamplerYcbcrConversionCreateInfoKHR; + +typedef struct VkSamplerYcbcrConversionInfoKHR { + VkStructureType sType; + const void* pNext; + VkSamplerYcbcrConversionKHR conversion; +} VkSamplerYcbcrConversionInfoKHR; + +typedef struct VkBindImagePlaneMemoryInfoKHR { + VkStructureType sType; + const void* pNext; + VkImageAspectFlagBits planeAspect; +} VkBindImagePlaneMemoryInfoKHR; + +typedef struct VkImagePlaneMemoryRequirementsInfoKHR { + VkStructureType sType; + const void* pNext; + VkImageAspectFlagBits planeAspect; +} VkImagePlaneMemoryRequirementsInfoKHR; + +typedef struct VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 samplerYcbcrConversion; +} VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR; + +typedef struct VkSamplerYcbcrConversionImageFormatPropertiesKHR { + VkStructureType sType; + void* pNext; + uint32_t combinedImageSamplerDescriptorCount; +} VkSamplerYcbcrConversionImageFormatPropertiesKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateSamplerYcbcrConversionKHR)(VkDevice device, const VkSamplerYcbcrConversionCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversionKHR* pYcbcrConversion); +typedef void (VKAPI_PTR *PFN_vkDestroySamplerYcbcrConversionKHR)(VkDevice device, VkSamplerYcbcrConversionKHR ycbcrConversion, const VkAllocationCallbacks* pAllocator); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversionKHR( + VkDevice device, + const VkSamplerYcbcrConversionCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSamplerYcbcrConversionKHR* pYcbcrConversion); + +VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversionKHR( + VkDevice device, + VkSamplerYcbcrConversionKHR ycbcrConversion, + const VkAllocationCallbacks* pAllocator); +#endif + +#define VK_KHR_bind_memory2 1 +#define VK_KHR_BIND_MEMORY_2_SPEC_VERSION 1 +#define VK_KHR_BIND_MEMORY_2_EXTENSION_NAME "VK_KHR_bind_memory2" + +typedef struct VkBindBufferMemoryInfoKHR { + VkStructureType sType; + const void* pNext; + VkBuffer buffer; + VkDeviceMemory memory; + VkDeviceSize memoryOffset; +} VkBindBufferMemoryInfoKHR; + +typedef struct VkBindImageMemoryInfoKHR { + VkStructureType sType; + const void* pNext; + VkImage image; + VkDeviceMemory memory; + VkDeviceSize memoryOffset; +} VkBindImageMemoryInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2KHR)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfoKHR* pBindInfos); +typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2KHR)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfoKHR* pBindInfos); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2KHR( + VkDevice device, + uint32_t bindInfoCount, + const VkBindBufferMemoryInfoKHR* pBindInfos); + +VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHR( + VkDevice device, + uint32_t bindInfoCount, + const VkBindImageMemoryInfoKHR* pBindInfos); +#endif + #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 @@ -4951,10 +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_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_INDIRECT_COMMANDS_LAYOUT_NVX_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_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; @@ -4979,7 +5272,6 @@ typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)( const char* pMessage, void* pUserData); - typedef struct VkDebugReportCallbackCreateInfoEXT { VkStructureType sType; const void* pNext; @@ -5021,6 +5313,11 @@ VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT( #define VK_NV_GLSL_SHADER_EXTENSION_NAME "VK_NV_glsl_shader" +#define VK_EXT_depth_range_unrestricted 1 +#define VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION 1 +#define VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME "VK_EXT_depth_range_unrestricted" + + #define VK_IMG_filter_cubic 1 #define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1 #define VK_IMG_FILTER_CUBIC_EXTENSION_NAME "VK_IMG_filter_cubic" @@ -5088,31 +5385,31 @@ typedef struct VkDebugMarkerMarkerInfoEXT { } VkDebugMarkerMarkerInfoEXT; -typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectTagEXT)(VkDevice device, VkDebugMarkerObjectTagInfoEXT* pTagInfo); -typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectNameEXT)(VkDevice device, VkDebugMarkerObjectNameInfoEXT* pNameInfo); -typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerBeginEXT)(VkCommandBuffer commandBuffer, VkDebugMarkerMarkerInfoEXT* pMarkerInfo); +typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectTagEXT)(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo); +typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectNameEXT)(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo); +typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerBeginEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerEndEXT)(VkCommandBuffer commandBuffer); -typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerInsertEXT)(VkCommandBuffer commandBuffer, VkDebugMarkerMarkerInfoEXT* pMarkerInfo); +typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerInsertEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectTagEXT( VkDevice device, - VkDebugMarkerObjectTagInfoEXT* pTagInfo); + const VkDebugMarkerObjectTagInfoEXT* pTagInfo); VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectNameEXT( VkDevice device, - VkDebugMarkerObjectNameInfoEXT* pNameInfo); + const VkDebugMarkerObjectNameInfoEXT* pNameInfo); VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerBeginEXT( VkCommandBuffer commandBuffer, - VkDebugMarkerMarkerInfoEXT* pMarkerInfo); + const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerEndEXT( VkCommandBuffer commandBuffer); VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT( VkCommandBuffer commandBuffer, - VkDebugMarkerMarkerInfoEXT* pMarkerInfo); + const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); #endif #define VK_AMD_gcn_shader 1 @@ -5199,6 +5496,57 @@ 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" + + #define VK_KHX_multiview 1 #define VK_KHX_MULTIVIEW_SPEC_VERSION 1 #define VK_KHX_MULTIVIEW_EXTENSION_NAME "VK_KHX_multiview" @@ -5350,9 +5698,9 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV { #endif /* VK_USE_PLATFORM_WIN32_KHR */ #define VK_KHX_device_group 1 -#define VK_MAX_DEVICE_GROUP_SIZE_KHX 32 -#define VK_KHX_DEVICE_GROUP_SPEC_VERSION 1 +#define VK_KHX_DEVICE_GROUP_SPEC_VERSION 2 #define VK_KHX_DEVICE_GROUP_EXTENSION_NAME "VK_KHX_device_group" +#define VK_MAX_DEVICE_GROUP_SIZE_KHX 32 typedef enum VkPeerMemoryFeatureFlagBitsKHX { @@ -5386,28 +5734,6 @@ typedef struct VkMemoryAllocateFlagsInfoKHX { uint32_t deviceMask; } VkMemoryAllocateFlagsInfoKHX; -typedef struct VkBindBufferMemoryInfoKHX { - VkStructureType sType; - const void* pNext; - VkBuffer buffer; - VkDeviceMemory memory; - VkDeviceSize memoryOffset; - uint32_t deviceIndexCount; - const uint32_t* pDeviceIndices; -} VkBindBufferMemoryInfoKHX; - -typedef struct VkBindImageMemoryInfoKHX { - VkStructureType sType; - const void* pNext; - VkImage image; - VkDeviceMemory memory; - VkDeviceSize memoryOffset; - uint32_t deviceIndexCount; - const uint32_t* pDeviceIndices; - uint32_t SFRRectCount; - const VkRect2D* pSFRRects; -} VkBindImageMemoryInfoKHX; - typedef struct VkDeviceGroupRenderPassBeginInfoKHX { VkStructureType sType; const void* pNext; @@ -5440,6 +5766,22 @@ typedef struct VkDeviceGroupBindSparseInfoKHX { uint32_t memoryDeviceIndex; } VkDeviceGroupBindSparseInfoKHX; +typedef struct VkBindBufferMemoryDeviceGroupInfoKHX { + VkStructureType sType; + const void* pNext; + uint32_t deviceIndexCount; + const uint32_t* pDeviceIndices; +} VkBindBufferMemoryDeviceGroupInfoKHX; + +typedef struct VkBindImageMemoryDeviceGroupInfoKHX { + VkStructureType sType; + const void* pNext; + uint32_t deviceIndexCount; + const uint32_t* pDeviceIndices; + uint32_t SFRRectCount; + const VkRect2D* pSFRRects; +} VkBindImageMemoryDeviceGroupInfoKHX; + typedef struct VkDeviceGroupPresentCapabilitiesKHX { VkStructureType sType; const void* pNext; @@ -5486,14 +5828,12 @@ typedef struct VkDeviceGroupSwapchainCreateInfoKHX { typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeaturesKHX)(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures); -typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2KHX)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfoKHX* pBindInfos); -typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2KHX)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfoKHX* pBindInfos); typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMaskKHX)(VkCommandBuffer commandBuffer, uint32_t deviceMask); +typedef void (VKAPI_PTR *PFN_vkCmdDispatchBaseKHX)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupPresentCapabilitiesKHX)(VkDevice device, VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities); typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHX)(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHX* pModes); -typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImage2KHX)(VkDevice device, const VkAcquireNextImageInfoKHX* pAcquireInfo, uint32_t* pImageIndex); -typedef void (VKAPI_PTR *PFN_vkCmdDispatchBaseKHX)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHX)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects); +typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImage2KHX)(VkDevice device, const VkAcquireNextImageInfoKHX* pAcquireInfo, uint32_t* pImageIndex); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHX( @@ -5503,34 +5843,10 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHX( uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures); -VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2KHX( - VkDevice device, - uint32_t bindInfoCount, - const VkBindBufferMemoryInfoKHX* pBindInfos); - -VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHX( - VkDevice device, - uint32_t bindInfoCount, - const VkBindImageMemoryInfoKHX* pBindInfos); - VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMaskKHX( VkCommandBuffer commandBuffer, uint32_t deviceMask); -VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupPresentCapabilitiesKHX( - VkDevice device, - VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHX( - VkDevice device, - VkSurfaceKHR surface, - VkDeviceGroupPresentModeFlagsKHX* pModes); - -VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImage2KHX( - VkDevice device, - const VkAcquireNextImageInfoKHX* pAcquireInfo, - uint32_t* pImageIndex); - VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHX( VkCommandBuffer commandBuffer, uint32_t baseGroupX, @@ -5540,11 +5856,25 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHX( uint32_t groupCountY, uint32_t groupCountZ); +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupPresentCapabilitiesKHX( + VkDevice device, + VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHX( + VkDevice device, + VkSurfaceKHR surface, + VkDeviceGroupPresentModeFlagsKHX* pModes); + VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDevicePresentRectanglesKHX( VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects); + +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImage2KHX( + VkDevice device, + const VkAcquireNextImageInfoKHX* pAcquireInfo, + uint32_t* pImageIndex); #endif #define VK_EXT_validation_flags 1 @@ -5639,7 +5969,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroupsKHX( VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkObjectTableNVX) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX) -#define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1 +#define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 3 #define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" @@ -5929,6 +6259,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT( #define VK_EXT_display_surface_counter 1 #define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1 #define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter" +#define VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT typedef enum VkSurfaceCounterFlagBitsEXT { @@ -6203,8 +6534,49 @@ 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 2 +#define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 3 #define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace" @@ -6293,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" @@ -6328,6 +6711,96 @@ typedef struct VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT { #define VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME "VK_AMD_gpu_shader_int16" +#define VK_AMD_mixed_attachment_samples 1 +#define VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION 1 +#define VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME "VK_AMD_mixed_attachment_samples" + + +#define VK_AMD_shader_fragment_mask 1 +#define VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION 1 +#define VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME "VK_AMD_shader_fragment_mask" + + +#define VK_EXT_shader_stencil_export 1 +#define VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION 1 +#define VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME "VK_EXT_shader_stencil_export" + + +#define VK_EXT_sample_locations 1 +#define VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION 1 +#define VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME "VK_EXT_sample_locations" + +typedef struct VkSampleLocationEXT { + float x; + float y; +} VkSampleLocationEXT; + +typedef struct VkSampleLocationsInfoEXT { + VkStructureType sType; + const void* pNext; + VkSampleCountFlagBits sampleLocationsPerPixel; + VkExtent2D sampleLocationGridSize; + uint32_t sampleLocationsCount; + const VkSampleLocationEXT* pSampleLocations; +} VkSampleLocationsInfoEXT; + +typedef struct VkAttachmentSampleLocationsEXT { + uint32_t attachmentIndex; + VkSampleLocationsInfoEXT sampleLocationsInfo; +} VkAttachmentSampleLocationsEXT; + +typedef struct VkSubpassSampleLocationsEXT { + uint32_t subpassIndex; + VkSampleLocationsInfoEXT sampleLocationsInfo; +} VkSubpassSampleLocationsEXT; + +typedef struct VkRenderPassSampleLocationsBeginInfoEXT { + VkStructureType sType; + const void* pNext; + uint32_t attachmentInitialSampleLocationsCount; + const VkAttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations; + uint32_t postSubpassSampleLocationsCount; + const VkSubpassSampleLocationsEXT* pPostSubpassSampleLocations; +} VkRenderPassSampleLocationsBeginInfoEXT; + +typedef struct VkPipelineSampleLocationsStateCreateInfoEXT { + VkStructureType sType; + const void* pNext; + VkBool32 sampleLocationsEnable; + VkSampleLocationsInfoEXT sampleLocationsInfo; +} VkPipelineSampleLocationsStateCreateInfoEXT; + +typedef struct VkPhysicalDeviceSampleLocationsPropertiesEXT { + VkStructureType sType; + void* pNext; + VkSampleCountFlags sampleLocationSampleCounts; + VkExtent2D maxSampleLocationGridSize; + float sampleLocationCoordinateRange[2]; + uint32_t sampleLocationSubPixelBits; + VkBool32 variableSampleLocations; +} VkPhysicalDeviceSampleLocationsPropertiesEXT; + +typedef struct VkMultisamplePropertiesEXT { + VkStructureType sType; + void* pNext; + VkExtent2D maxSampleLocationGridSize; +} VkMultisamplePropertiesEXT; + + +typedef void (VKAPI_PTR *PFN_vkCmdSetSampleLocationsEXT)(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdSetSampleLocationsEXT( + VkCommandBuffer commandBuffer, + const VkSampleLocationsInfoEXT* pSampleLocationsInfo); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMultisamplePropertiesEXT( + VkPhysicalDevice physicalDevice, + VkSampleCountFlagBits samples, + VkMultisamplePropertiesEXT* pMultisampleProperties); +#endif + #define VK_EXT_blend_operation_advanced 1 #define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2 #define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced" @@ -6421,6 +6894,137 @@ typedef struct VkPipelineCoverageModulationStateCreateInfoNV { #define VK_NV_FILL_RECTANGLE_EXTENSION_NAME "VK_NV_fill_rectangle" +#define VK_EXT_post_depth_coverage 1 +#define VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION 1 +#define VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME "VK_EXT_post_depth_coverage" + + +#define VK_EXT_validation_cache 1 +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 { + VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1, + VK_VALIDATION_CACHE_HEADER_VERSION_BEGIN_RANGE_EXT = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT, + VK_VALIDATION_CACHE_HEADER_VERSION_END_RANGE_EXT = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT, + VK_VALIDATION_CACHE_HEADER_VERSION_RANGE_SIZE_EXT = (VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT - VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT + 1), + VK_VALIDATION_CACHE_HEADER_VERSION_MAX_ENUM_EXT = 0x7FFFFFFF +} VkValidationCacheHeaderVersionEXT; + +typedef VkFlags VkValidationCacheCreateFlagsEXT; + +typedef struct VkValidationCacheCreateInfoEXT { + VkStructureType sType; + const void* pNext; + VkValidationCacheCreateFlagsEXT flags; + size_t initialDataSize; + const void* pInitialData; +} VkValidationCacheCreateInfoEXT; + +typedef struct VkShaderModuleValidationCacheCreateInfoEXT { + VkStructureType sType; + const void* pNext; + VkValidationCacheEXT validationCache; +} VkShaderModuleValidationCacheCreateInfoEXT; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateValidationCacheEXT)(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache); +typedef void (VKAPI_PTR *PFN_vkDestroyValidationCacheEXT)(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkMergeValidationCachesEXT)(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches); +typedef VkResult (VKAPI_PTR *PFN_vkGetValidationCacheDataEXT)(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateValidationCacheEXT( + VkDevice device, + const VkValidationCacheCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkValidationCacheEXT* pValidationCache); + +VKAPI_ATTR void VKAPI_CALL vkDestroyValidationCacheEXT( + VkDevice device, + VkValidationCacheEXT validationCache, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkMergeValidationCachesEXT( + VkDevice device, + VkValidationCacheEXT dstCache, + uint32_t srcCacheCount, + const VkValidationCacheEXT* pSrcCaches); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetValidationCacheDataEXT( + VkDevice device, + VkValidationCacheEXT validationCache, + size_t* pDataSize, + void* pData); +#endif + +#define VK_EXT_shader_viewport_index_layer 1 +#define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION 1 +#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 + #ifdef __cplusplus } #endif diff --git a/third_party/vulkan/vulkan.hpp b/third_party/vulkan/vulkan.hpp index ef8eed3b6..5b7bc7203 100644 --- a/third_party/vulkan/vulkan.hpp +++ b/third_party/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. @@ -33,7 +33,7 @@ # include # include #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ -static_assert( VK_HEADER_VERSION == 54 , "Wrong VK_HEADER_VERSION!" ); +static_assert( VK_HEADER_VERSION == 68 , "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 @@ -82,7 +82,12 @@ static_assert( VK_HEADER_VERSION == 54 , "Wrong VK_HEADER_VERSION!" ); # define VULKAN_HPP_TYPESAFE_EXPLICIT explicit #endif -namespace vk + +#if !defined(VULKAN_HPP_NAMESPACE) +#define VULKAN_HPP_NAMESPACE vk +#endif + +namespace VULKAN_HPP_NAMESPACE { template struct FlagTraits @@ -109,6 +114,11 @@ namespace vk { } + explicit Flags(MaskType flags) + : m_mask(flags) + { + } + Flags & operator=(Flags const& rhs) { m_mask = rhs.m_mask; @@ -317,30 +327,31 @@ namespace vk }; #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; @@ -348,7 +359,7 @@ namespace vk UniqueHandle & operator=( UniqueHandle && other ) { reset( other.release() ); - m_deleter = std::move( other.m_deleter ); + *static_cast(this) = std::move( static_cast(other) ); return *this; } @@ -362,31 +373,36 @@ namespace vk return &m_value; } + Type * operator->() + { + return &m_value; + } + Type const& operator*() const { return m_value; } - Type get() const + Type & operator*() { return m_value; } - Deleter & getDeleter() + const Type & get() const { - return m_deleter; + return m_value; } - - Deleter const& getDeleter() const + + Type & get() { - return m_deleter; + return m_value; } void reset( Type const& value = Type() ) { if ( m_value != value ) { - destroy(); + if ( m_value ) this->destroy( m_value ); m_value = value; } } @@ -398,33 +414,92 @@ namespace vk 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 struct isStructureChainValid { enum { value = false }; }; + + template + class StructureChainElement + { + public: + explicit operator Element&() { return value; } + explicit operator const Element&() const { return value; } + private: + Element value; + }; + + template + class StructureChain : private StructureChainElement... + { + public: + StructureChain() + { + link(); + } + + StructureChain(StructureChain const &rhs) + { + linkAndCopy(rhs); + } + + StructureChain& operator=(StructureChain const &rhs) + { + linkAndCopy(rhs); + return *this; + } + + template ClassType& get() { return static_cast(*this);} + + private: + template + void link() + { + } + + template + void link() + { + static_assert(isStructureChainValid::value, "The structure chain is not valid!"); + X& x = static_cast(*this); + Y& y = static_cast(*this); + x.pNext = &y; + link(); + } + + template + void linkAndCopy(StructureChain const &rhs) + { + static_cast(*this) = static_cast(rhs); + } + + template + void linkAndCopy(StructureChain const &rhs) + { + static_assert(isStructureChainValid::value, "The structure chain is not valid!"); + X& x = static_cast(*this); + Y& y = static_cast(*this); + x = static_cast(rhs); + x.pNext = &y; + linkAndCopy(rhs); + } + +}; enum class Result { eSuccess = VK_SUCCESS, @@ -453,7 +528,8 @@ namespace vk 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) @@ -487,11 +563,12 @@ namespace vk case Result::eErrorInvalidShaderNV: return "ErrorInvalidShaderNV"; case Result::eErrorOutOfPoolMemoryKHR: return "ErrorOutOfPoolMemoryKHR"; case Result::eErrorInvalidExternalHandleKHR: return "ErrorInvalidExternalHandleKHR"; + case Result::eErrorNotPermittedEXT: return "ErrorNotPermittedEXT"; default: return "invalid"; } } - +#ifndef VULKAN_HPP_NO_EXCEPTIONS #if defined(_MSC_VER) && (_MSC_VER == 1800) # define noexcept _NOEXCEPT #endif @@ -499,7 +576,7 @@ namespace vk class ErrorCategoryImpl : public std::error_category { public: - virtual const char* name() const noexcept override { return "vk::Result"; } + virtual const char* name() const noexcept override { return "VULKAN_HPP_NAMESPACE::Result"; } virtual std::string message(int ev) const override { return to_string(static_cast(ev)); } }; @@ -731,10 +808,17 @@ namespace vk 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 ); @@ -757,20 +841,21 @@ namespace vk 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 ) ); } } - -} // namespace vk +#endif +} // namespace VULKAN_HPP_NAMESPACE namespace std { template <> - struct is_error_code_enum : public true_type + struct is_error_code_enum : public true_type {}; } -namespace vk +namespace VULKAN_HPP_NAMESPACE { template @@ -781,6 +866,11 @@ namespace vk , value( v ) {} + ResultValue( Result r, T && v ) + : result( r ) + , value( std::move( v ) ) + {} + Result result; T value; @@ -793,7 +883,7 @@ namespace vk #ifdef VULKAN_HPP_NO_EXCEPTIONS typedef ResultValue type; #else - typedef T type; + typedef T type; #endif }; @@ -862,6 +952,23 @@ namespace vk return ResultValue( result, data ); } +#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 ) + { +#ifdef VULKAN_HPP_NO_EXCEPTIONS + assert( result == Result::eSuccess ); + return ResultValue>( result, UniqueHandle(data, deleter) ); +#else + if ( result != Result::eSuccess ) + { + throwResultException( result, message ); + } + return UniqueHandle(data, deleter); +#endif + } +#endif + using SampleMask = uint32_t; using Bool32 = uint32_t; @@ -1162,6 +1269,18 @@ namespace vk using PipelineCoverageModulationStateCreateFlagsNV = Flags; + enum class ValidationCacheCreateFlagBitsEXT + { + }; + + using ValidationCacheCreateFlagsEXT = Flags; + + enum class PipelineRasterizationConservativeStateCreateFlagBitsEXT + { + }; + + using PipelineRasterizationConservativeStateCreateFlagsEXT = Flags; + class DeviceMemory { public: @@ -1174,7 +1293,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT DeviceMemory( VkDeviceMemory deviceMemory ) - : m_deviceMemory( deviceMemory ) + : m_deviceMemory( deviceMemory ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1241,7 +1360,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT CommandPool( VkCommandPool commandPool ) - : m_commandPool( commandPool ) + : m_commandPool( commandPool ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1308,7 +1427,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT Buffer( VkBuffer buffer ) - : m_buffer( buffer ) + : m_buffer( buffer ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1375,7 +1494,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT BufferView( VkBufferView bufferView ) - : m_bufferView( bufferView ) + : m_bufferView( bufferView ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1442,7 +1561,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT Image( VkImage image ) - : m_image( image ) + : m_image( image ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1509,7 +1628,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT ImageView( VkImageView imageView ) - : m_imageView( imageView ) + : m_imageView( imageView ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1576,7 +1695,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT ShaderModule( VkShaderModule shaderModule ) - : m_shaderModule( shaderModule ) + : m_shaderModule( shaderModule ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1643,7 +1762,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT Pipeline( VkPipeline pipeline ) - : m_pipeline( pipeline ) + : m_pipeline( pipeline ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1710,7 +1829,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT PipelineLayout( VkPipelineLayout pipelineLayout ) - : m_pipelineLayout( pipelineLayout ) + : m_pipelineLayout( pipelineLayout ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1777,7 +1896,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT Sampler( VkSampler sampler ) - : m_sampler( sampler ) + : m_sampler( sampler ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1844,7 +1963,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSet( VkDescriptorSet descriptorSet ) - : m_descriptorSet( descriptorSet ) + : m_descriptorSet( descriptorSet ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1911,7 +2030,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorSetLayout( VkDescriptorSetLayout descriptorSetLayout ) - : m_descriptorSetLayout( descriptorSetLayout ) + : m_descriptorSetLayout( descriptorSetLayout ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -1978,7 +2097,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorPool( VkDescriptorPool descriptorPool ) - : m_descriptorPool( descriptorPool ) + : m_descriptorPool( descriptorPool ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2045,7 +2164,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT Fence( VkFence fence ) - : m_fence( fence ) + : m_fence( fence ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2112,7 +2231,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT Semaphore( VkSemaphore semaphore ) - : m_semaphore( semaphore ) + : m_semaphore( semaphore ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2179,7 +2298,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT Event( VkEvent event ) - : m_event( event ) + : m_event( event ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2246,7 +2365,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT QueryPool( VkQueryPool queryPool ) - : m_queryPool( queryPool ) + : m_queryPool( queryPool ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2313,7 +2432,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT Framebuffer( VkFramebuffer framebuffer ) - : m_framebuffer( framebuffer ) + : m_framebuffer( framebuffer ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2380,7 +2499,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT RenderPass( VkRenderPass renderPass ) - : m_renderPass( renderPass ) + : m_renderPass( renderPass ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2447,7 +2566,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT PipelineCache( VkPipelineCache pipelineCache ) - : m_pipelineCache( pipelineCache ) + : m_pipelineCache( pipelineCache ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2514,7 +2633,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT ObjectTableNVX( VkObjectTableNVX objectTableNVX ) - : m_objectTableNVX( objectTableNVX ) + : m_objectTableNVX( objectTableNVX ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2581,7 +2700,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT IndirectCommandsLayoutNVX( VkIndirectCommandsLayoutNVX indirectCommandsLayoutNVX ) - : m_indirectCommandsLayoutNVX( indirectCommandsLayoutNVX ) + : m_indirectCommandsLayoutNVX( indirectCommandsLayoutNVX ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2648,7 +2767,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT DescriptorUpdateTemplateKHR( VkDescriptorUpdateTemplateKHR descriptorUpdateTemplateKHR ) - : m_descriptorUpdateTemplateKHR( descriptorUpdateTemplateKHR ) + : m_descriptorUpdateTemplateKHR( descriptorUpdateTemplateKHR ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2703,6 +2822,140 @@ namespace vk static_assert( sizeof( DescriptorUpdateTemplateKHR ) == sizeof( VkDescriptorUpdateTemplateKHR ), "handle and wrapper have different size!" ); + class SamplerYcbcrConversionKHR + { + public: + SamplerYcbcrConversionKHR() + : m_samplerYcbcrConversionKHR(VK_NULL_HANDLE) + {} + + SamplerYcbcrConversionKHR( std::nullptr_t ) + : m_samplerYcbcrConversionKHR(VK_NULL_HANDLE) + {} + + VULKAN_HPP_TYPESAFE_EXPLICIT SamplerYcbcrConversionKHR( VkSamplerYcbcrConversionKHR samplerYcbcrConversionKHR ) + : m_samplerYcbcrConversionKHR( samplerYcbcrConversionKHR ) + {} + +#if defined(VULKAN_HPP_TYPESAFE_CONVERSION) + SamplerYcbcrConversionKHR & operator=(VkSamplerYcbcrConversionKHR samplerYcbcrConversionKHR) + { + m_samplerYcbcrConversionKHR = samplerYcbcrConversionKHR; + return *this; + } +#endif + + SamplerYcbcrConversionKHR & operator=( std::nullptr_t ) + { + m_samplerYcbcrConversionKHR = VK_NULL_HANDLE; + return *this; + } + + bool operator==( SamplerYcbcrConversionKHR const & rhs ) const + { + return m_samplerYcbcrConversionKHR == rhs.m_samplerYcbcrConversionKHR; + } + + bool operator!=(SamplerYcbcrConversionKHR const & rhs ) const + { + return m_samplerYcbcrConversionKHR != rhs.m_samplerYcbcrConversionKHR; + } + + bool operator<(SamplerYcbcrConversionKHR const & rhs ) const + { + return m_samplerYcbcrConversionKHR < rhs.m_samplerYcbcrConversionKHR; + } + + + + VULKAN_HPP_TYPESAFE_EXPLICIT operator VkSamplerYcbcrConversionKHR() const + { + return m_samplerYcbcrConversionKHR; + } + + explicit operator bool() const + { + return m_samplerYcbcrConversionKHR != VK_NULL_HANDLE; + } + + bool operator!() const + { + return m_samplerYcbcrConversionKHR == VK_NULL_HANDLE; + } + + private: + VkSamplerYcbcrConversionKHR m_samplerYcbcrConversionKHR; + }; + + static_assert( sizeof( SamplerYcbcrConversionKHR ) == sizeof( VkSamplerYcbcrConversionKHR ), "handle and wrapper have different size!" ); + + class ValidationCacheEXT + { + public: + ValidationCacheEXT() + : m_validationCacheEXT(VK_NULL_HANDLE) + {} + + ValidationCacheEXT( std::nullptr_t ) + : m_validationCacheEXT(VK_NULL_HANDLE) + {} + + VULKAN_HPP_TYPESAFE_EXPLICIT ValidationCacheEXT( VkValidationCacheEXT validationCacheEXT ) + : m_validationCacheEXT( validationCacheEXT ) + {} + +#if defined(VULKAN_HPP_TYPESAFE_CONVERSION) + ValidationCacheEXT & operator=(VkValidationCacheEXT validationCacheEXT) + { + m_validationCacheEXT = validationCacheEXT; + return *this; + } +#endif + + ValidationCacheEXT & operator=( std::nullptr_t ) + { + m_validationCacheEXT = VK_NULL_HANDLE; + return *this; + } + + bool operator==( ValidationCacheEXT const & rhs ) const + { + return m_validationCacheEXT == rhs.m_validationCacheEXT; + } + + bool operator!=(ValidationCacheEXT const & rhs ) const + { + return m_validationCacheEXT != rhs.m_validationCacheEXT; + } + + bool operator<(ValidationCacheEXT const & rhs ) const + { + return m_validationCacheEXT < rhs.m_validationCacheEXT; + } + + + + VULKAN_HPP_TYPESAFE_EXPLICIT operator VkValidationCacheEXT() const + { + return m_validationCacheEXT; + } + + explicit operator bool() const + { + return m_validationCacheEXT != VK_NULL_HANDLE; + } + + bool operator!() const + { + return m_validationCacheEXT == VK_NULL_HANDLE; + } + + private: + VkValidationCacheEXT m_validationCacheEXT; + }; + + static_assert( sizeof( ValidationCacheEXT ) == sizeof( VkValidationCacheEXT ), "handle and wrapper have different size!" ); + class DisplayKHR { public: @@ -2715,7 +2968,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT DisplayKHR( VkDisplayKHR displayKHR ) - : m_displayKHR( displayKHR ) + : m_displayKHR( displayKHR ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2782,7 +3035,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT DisplayModeKHR( VkDisplayModeKHR displayModeKHR ) - : m_displayModeKHR( displayModeKHR ) + : m_displayModeKHR( displayModeKHR ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2849,7 +3102,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT SurfaceKHR( VkSurfaceKHR surfaceKHR ) - : m_surfaceKHR( surfaceKHR ) + : m_surfaceKHR( surfaceKHR ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2916,7 +3169,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT SwapchainKHR( VkSwapchainKHR swapchainKHR ) - : m_swapchainKHR( swapchainKHR ) + : m_swapchainKHR( swapchainKHR ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -2983,7 +3236,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT DebugReportCallbackEXT( VkDebugReportCallbackEXT debugReportCallbackEXT ) - : m_debugReportCallbackEXT( debugReportCallbackEXT ) + : m_debugReportCallbackEXT( debugReportCallbackEXT ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -5277,6 +5530,86 @@ namespace vk }; static_assert( sizeof( ViewportWScalingNV ) == sizeof( VkViewportWScalingNV ), "struct and wrapper have different size!" ); + struct SampleLocationEXT + { + SampleLocationEXT( float x_ = 0, float y_ = 0 ) + : x( x_ ) + , y( y_ ) + { + } + + SampleLocationEXT( VkSampleLocationEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( SampleLocationEXT ) ); + } + + SampleLocationEXT& operator=( VkSampleLocationEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( SampleLocationEXT ) ); + return *this; + } + SampleLocationEXT& setX( float x_ ) + { + x = x_; + return *this; + } + + SampleLocationEXT& setY( float y_ ) + { + y = y_; + return *this; + } + + operator const VkSampleLocationEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( SampleLocationEXT const& rhs ) const + { + return ( x == rhs.x ) + && ( y == rhs.y ); + } + + bool operator!=( SampleLocationEXT const& rhs ) const + { + return !operator==( rhs ); + } + + float x; + float y; + }; + 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, @@ -5289,7 +5622,9 @@ namespace vk eTransferDstOptimal = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, ePreinitialized = VK_IMAGE_LAYOUT_PREINITIALIZED, ePresentSrcKHR = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, - eSharedPresentKHR = VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR + eSharedPresentKHR = VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, + eDepthReadOnlyStencilAttachmentOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR, + eDepthAttachmentStencilReadOnlyOptimalKHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR }; struct DescriptorImageInfo @@ -6299,7 +6634,41 @@ namespace vk ePvrtc12BppSrgbBlockIMG = VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG, ePvrtc14BppSrgbBlockIMG = VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG, ePvrtc22BppSrgbBlockIMG = VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG, - ePvrtc24BppSrgbBlockIMG = VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG + ePvrtc24BppSrgbBlockIMG = VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG, + eG8B8G8R8422UnormKHR = VK_FORMAT_G8B8G8R8_422_UNORM_KHR, + eB8G8R8G8422UnormKHR = VK_FORMAT_B8G8R8G8_422_UNORM_KHR, + eG8B8R83Plane420UnormKHR = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR, + eG8B8R82Plane420UnormKHR = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR, + eG8B8R83Plane422UnormKHR = VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR, + eG8B8R82Plane422UnormKHR = VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR, + eG8B8R83Plane444UnormKHR = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR, + eR10X6UnormPack16KHR = VK_FORMAT_R10X6_UNORM_PACK16_KHR, + eR10X6G10X6Unorm2Pack16KHR = VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR, + eR10X6G10X6B10X6A10X6Unorm4Pack16KHR = VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR, + eG10X6B10X6G10X6R10X6422Unorm4Pack16KHR = VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR, + eB10X6G10X6R10X6G10X6422Unorm4Pack16KHR = VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR, + eG10X6B10X6R10X63Plane420Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR, + eG10X6B10X6R10X62Plane420Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR, + eG10X6B10X6R10X63Plane422Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR, + eG10X6B10X6R10X62Plane422Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR, + eG10X6B10X6R10X63Plane444Unorm3Pack16KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR, + eR12X4UnormPack16KHR = VK_FORMAT_R12X4_UNORM_PACK16_KHR, + eR12X4G12X4Unorm2Pack16KHR = VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR, + eR12X4G12X4B12X4A12X4Unorm4Pack16KHR = VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR, + eG12X4B12X4G12X4R12X4422Unorm4Pack16KHR = VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR, + eB12X4G12X4R12X4G12X4422Unorm4Pack16KHR = VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR, + eG12X4B12X4R12X43Plane420Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR, + eG12X4B12X4R12X42Plane420Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR, + eG12X4B12X4R12X43Plane422Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR, + eG12X4B12X4R12X42Plane422Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR, + eG12X4B12X4R12X43Plane444Unorm3Pack16KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR, + eG16B16G16R16422UnormKHR = VK_FORMAT_G16B16G16R16_422_UNORM_KHR, + eB16G16R16G16422UnormKHR = VK_FORMAT_B16G16R16G16_422_UNORM_KHR, + eG16B16R163Plane420UnormKHR = VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR, + eG16B16R162Plane420UnormKHR = VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR, + eG16B16R163Plane422UnormKHR = VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR, + eG16B16R162Plane422UnormKHR = VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR, + eG16B16R163Plane444UnormKHR = VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR }; struct VertexInputAttributeDescription @@ -6460,16 +6829,16 @@ namespace vk eSparseImageFormatProperties2KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR, ePhysicalDeviceSparseImageFormatInfo2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR, eMemoryAllocateFlagsInfoKHX = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX, - eBindBufferMemoryInfoKHX = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX, - eBindImageMemoryInfoKHX = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX, eDeviceGroupRenderPassBeginInfoKHX = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX, eDeviceGroupCommandBufferBeginInfoKHX = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX, eDeviceGroupSubmitInfoKHX = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX, eDeviceGroupBindSparseInfoKHX = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX, + eAcquireNextImageInfoKHX = VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX, + eBindBufferMemoryDeviceGroupInfoKHX = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHX, + eBindImageMemoryDeviceGroupInfoKHX = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHX, eDeviceGroupPresentCapabilitiesKHX = VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX, eImageSwapchainCreateInfoKHX = VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX, eBindImageMemorySwapchainInfoKHX = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX, - eAcquireNextImageInfoKHX = VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX, eDeviceGroupPresentInfoKHX = VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX, eDeviceGroupSwapchainCreateInfoKHX = VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX, eValidationFlagsEXT = VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT, @@ -6512,7 +6881,7 @@ namespace vk eDeviceGeneratedCommandsLimitsNVX = VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX, eDeviceGeneratedCommandsFeaturesNVX = VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX, ePipelineViewportWScalingStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV, - eSurfaceCapabilities2EXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT, + eSurfaceCapabilities2EXT = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT, eDisplayPowerInfoEXT = VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT, eDeviceEventInfoEXT = VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT, eDisplayEventInfoEXT = VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT, @@ -6522,6 +6891,8 @@ namespace vk 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, @@ -6532,6 +6903,10 @@ namespace vk eFenceGetWin32HandleInfoKHR = VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR, eImportFenceFdInfoKHR = VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR, eFenceGetFdInfoKHR = VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR, + ePhysicalDevicePointClippingPropertiesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR, + eRenderPassInputAttachmentAspectCreateInfoKHR = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR, + eImageViewUsageCreateInfoKHR = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR, + ePipelineTessellationDomainOriginStateCreateInfoKHR = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR, ePhysicalDeviceSurfaceInfo2KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR, eSurfaceCapabilities2KHR = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR, eSurfaceFormat2KHR = VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR, @@ -6542,24 +6917,42 @@ namespace vk eMemoryDedicatedAllocateInfoKHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR, ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT, eSamplerReductionModeCreateInfoEXT = VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT, + eSampleLocationsInfoEXT = VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT, + eRenderPassSampleLocationsBeginInfoEXT = VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT, + ePipelineSampleLocationsStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT, + ePhysicalDeviceSampleLocationsPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT, + eMultisamplePropertiesEXT = VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT, eBufferMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR, eImageMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR, eImageSparseMemoryRequirementsInfo2KHR = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR, eMemoryRequirements2KHR = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR, eSparseImageMemoryRequirements2KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR, + eImageFormatListCreateInfoKHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR, ePhysicalDeviceBlendOperationAdvancedFeaturesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT, ePhysicalDeviceBlendOperationAdvancedPropertiesEXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT, ePipelineColorBlendAdvancedStateCreateInfoEXT = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT, ePipelineCoverageToColorStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV, - ePipelineCoverageModulationStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV + ePipelineCoverageModulationStateCreateInfoNV = VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV, + eSamplerYcbcrConversionCreateInfoKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR, + eSamplerYcbcrConversionInfoKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR, + eBindImagePlaneMemoryInfoKHR = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR, + eImagePlaneMemoryRequirementsInfoKHR = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR, + ePhysicalDeviceSamplerYcbcrConversionFeaturesKHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR, + eSamplerYcbcrConversionImageFormatPropertiesKHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR, + 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, + 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_ ) @@ -6635,10 +7028,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eApplicationInfo; public: - const void* pNext; + const void* pNext = nullptr; const char* pApplicationName; uint32_t applicationVersion; const char* pEngineName; @@ -6650,9 +7043,7 @@ namespace vk 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_ ) @@ -6720,10 +7111,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDeviceQueueCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; DeviceQueueCreateFlags flags; uint32_t queueFamilyIndex; uint32_t queueCount; @@ -6734,9 +7125,7 @@ namespace vk 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_ ) @@ -6836,10 +7225,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDeviceCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; DeviceCreateFlags flags; uint32_t queueCreateInfoCount; const DeviceQueueCreateInfo* pQueueCreateInfos; @@ -6854,9 +7243,7 @@ namespace vk 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_ ) @@ -6940,10 +7327,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eInstanceCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; InstanceCreateFlags flags; const ApplicationInfo* pApplicationInfo; uint32_t enabledLayerCount; @@ -6956,9 +7343,7 @@ namespace vk struct MemoryAllocateInfo { MemoryAllocateInfo( DeviceSize allocationSize_ = 0, uint32_t memoryTypeIndex_ = 0 ) - : sType( StructureType::eMemoryAllocateInfo ) - , pNext( nullptr ) - , allocationSize( allocationSize_ ) + : allocationSize( allocationSize_ ) , memoryTypeIndex( memoryTypeIndex_ ) { } @@ -7010,10 +7395,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eMemoryAllocateInfo; public: - const void* pNext; + const void* pNext = nullptr; DeviceSize allocationSize; uint32_t memoryTypeIndex; }; @@ -7022,9 +7407,7 @@ namespace vk 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_ ) { @@ -7084,10 +7467,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eMappedMemoryRange; public: - const void* pNext; + const void* pNext = nullptr; DeviceMemory memory; DeviceSize offset; DeviceSize size; @@ -7097,9 +7480,7 @@ namespace vk 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_ ) @@ -7199,10 +7580,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eWriteDescriptorSet; public: - const void* pNext; + const void* pNext = nullptr; DescriptorSet dstSet; uint32_t dstBinding; uint32_t dstArrayElement; @@ -7217,9 +7598,7 @@ namespace vk 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_ ) @@ -7311,10 +7690,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eCopyDescriptorSet; public: - const void* pNext; + const void* pNext = nullptr; DescriptorSet srcSet; uint32_t srcBinding; uint32_t srcArrayElement; @@ -7328,9 +7707,7 @@ namespace vk 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_ ) @@ -7406,10 +7783,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eBufferViewCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; BufferViewCreateFlags flags; Buffer buffer; Format format; @@ -7421,9 +7798,7 @@ namespace vk 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_ ) { @@ -7483,10 +7858,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eShaderModuleCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; ShaderModuleCreateFlags flags; size_t codeSize; const uint32_t* pCode; @@ -7496,9 +7871,7 @@ namespace vk 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_ ) { @@ -7558,10 +7931,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDescriptorSetAllocateInfo; public: - const void* pNext; + const void* pNext = nullptr; DescriptorPool descriptorPool; uint32_t descriptorSetCount; const DescriptorSetLayout* pSetLayouts; @@ -7571,9 +7944,7 @@ namespace vk 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_ ) @@ -7649,10 +8020,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineVertexInputStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineVertexInputStateCreateFlags flags; uint32_t vertexBindingDescriptionCount; const VertexInputBindingDescription* pVertexBindingDescriptions; @@ -7664,9 +8035,7 @@ namespace vk 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_ ) { @@ -7726,10 +8095,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineInputAssemblyStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineInputAssemblyStateCreateFlags flags; PrimitiveTopology topology; Bool32 primitiveRestartEnable; @@ -7739,9 +8108,7 @@ namespace vk struct PipelineTessellationStateCreateInfo { PipelineTessellationStateCreateInfo( PipelineTessellationStateCreateFlags flags_ = PipelineTessellationStateCreateFlags(), uint32_t patchControlPoints_ = 0 ) - : sType( StructureType::ePipelineTessellationStateCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , patchControlPoints( patchControlPoints_ ) { } @@ -7793,10 +8160,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineTessellationStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineTessellationStateCreateFlags flags; uint32_t patchControlPoints; }; @@ -7805,9 +8172,7 @@ namespace vk 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_ ) @@ -7883,10 +8248,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineViewportStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineViewportStateCreateFlags flags; uint32_t viewportCount; const Viewport* pViewports; @@ -7898,9 +8263,7 @@ namespace vk 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_ ) @@ -8024,10 +8387,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineRasterizationStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineRasterizationStateCreateFlags flags; Bool32 depthClampEnable; Bool32 rasterizerDiscardEnable; @@ -8045,9 +8408,7 @@ namespace vk 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_ ) @@ -8163,10 +8524,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineDepthStencilStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineDepthStencilStateCreateFlags flags; Bool32 depthTestEnable; Bool32 depthWriteEnable; @@ -8183,9 +8544,7 @@ namespace vk 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_ ) { @@ -8245,10 +8604,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineCacheCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineCacheCreateFlags flags; size_t initialDataSize; const void* pInitialData; @@ -8258,9 +8617,7 @@ namespace vk 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_ ) @@ -8424,10 +8781,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eSamplerCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; SamplerCreateFlags flags; Filter magFilter; Filter minFilter; @@ -8450,9 +8807,7 @@ namespace vk 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_ ) { @@ -8512,10 +8867,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eCommandBufferAllocateInfo; public: - const void* pNext; + const void* pNext = nullptr; CommandPool commandPool; CommandBufferLevel level; uint32_t commandBufferCount; @@ -8525,9 +8880,7 @@ namespace vk 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_ ) @@ -8603,10 +8956,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eRenderPassBeginInfo; public: - const void* pNext; + const void* pNext = nullptr; RenderPass renderPass; Framebuffer framebuffer; Rect2D renderArea; @@ -8618,9 +8971,7 @@ namespace vk struct EventCreateInfo { EventCreateInfo( EventCreateFlags flags_ = EventCreateFlags() ) - : sType( StructureType::eEventCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) { } @@ -8664,10 +9015,10 @@ namespace vk } 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!" ); @@ -8675,9 +9026,7 @@ namespace vk struct SemaphoreCreateInfo { SemaphoreCreateInfo( SemaphoreCreateFlags flags_ = SemaphoreCreateFlags() ) - : sType( StructureType::eSemaphoreCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) { } @@ -8721,10 +9070,10 @@ namespace vk } 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!" ); @@ -8732,9 +9081,7 @@ namespace vk 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_ ) @@ -8826,10 +9173,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eFramebufferCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; FramebufferCreateFlags flags; RenderPass renderPass; uint32_t attachmentCount; @@ -8843,9 +9190,7 @@ namespace vk struct DisplayModeCreateInfoKHR { DisplayModeCreateInfoKHR( DisplayModeCreateFlagsKHR flags_ = DisplayModeCreateFlagsKHR(), DisplayModeParametersKHR parameters_ = DisplayModeParametersKHR() ) - : sType( StructureType::eDisplayModeCreateInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , parameters( parameters_ ) { } @@ -8897,10 +9242,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDisplayModeCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; DisplayModeCreateFlagsKHR flags; DisplayModeParametersKHR parameters; }; @@ -8909,9 +9254,7 @@ namespace vk 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_ ) { @@ -8971,10 +9314,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDisplayPresentInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Rect2D srcRect; Rect2D dstRect; Bool32 persistent; @@ -8985,9 +9328,7 @@ namespace vk struct AndroidSurfaceCreateInfoKHR { AndroidSurfaceCreateInfoKHR( AndroidSurfaceCreateFlagsKHR flags_ = AndroidSurfaceCreateFlagsKHR(), ANativeWindow* window_ = nullptr ) - : sType( StructureType::eAndroidSurfaceCreateInfoKHR ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , window( window_ ) { } @@ -9039,10 +9380,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eAndroidSurfaceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; AndroidSurfaceCreateFlagsKHR flags; ANativeWindow* window; }; @@ -9053,9 +9394,7 @@ namespace vk 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_ ) { @@ -9115,10 +9454,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eMirSurfaceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; MirSurfaceCreateFlagsKHR flags; MirConnection* connection; MirSurface* mirSurface; @@ -9130,9 +9469,7 @@ namespace vk struct ViSurfaceCreateInfoNN { ViSurfaceCreateInfoNN( ViSurfaceCreateFlagsNN flags_ = ViSurfaceCreateFlagsNN(), void* window_ = nullptr ) - : sType( StructureType::eViSurfaceCreateInfoNN ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , window( window_ ) { } @@ -9184,10 +9521,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eViSurfaceCreateInfoNN; public: - const void* pNext; + const void* pNext = nullptr; ViSurfaceCreateFlagsNN flags; void* window; }; @@ -9198,9 +9535,7 @@ namespace vk 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_ ) { @@ -9260,10 +9595,10 @@ namespace vk } 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; @@ -9275,9 +9610,7 @@ namespace vk 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_ ) { @@ -9337,10 +9670,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eWin32SurfaceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Win32SurfaceCreateFlagsKHR flags; HINSTANCE hinstance; HWND hwnd; @@ -9352,9 +9685,7 @@ namespace vk 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_ ) { @@ -9414,10 +9745,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eXlibSurfaceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; XlibSurfaceCreateFlagsKHR flags; Display* dpy; Window window; @@ -9429,9 +9760,7 @@ namespace vk 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_ ) { @@ -9491,10 +9820,10 @@ namespace vk } 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; @@ -9505,9 +9834,7 @@ namespace vk 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 ) ); } @@ -9559,10 +9886,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDebugMarkerMarkerInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; const char* pMarkerName; float color[4]; }; @@ -9571,9 +9898,7 @@ namespace vk struct DedicatedAllocationImageCreateInfoNV { DedicatedAllocationImageCreateInfoNV( Bool32 dedicatedAllocation_ = 0 ) - : sType( StructureType::eDedicatedAllocationImageCreateInfoNV ) - , pNext( nullptr ) - , dedicatedAllocation( dedicatedAllocation_ ) + : dedicatedAllocation( dedicatedAllocation_ ) { } @@ -9617,10 +9942,10 @@ namespace vk } 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!" ); @@ -9628,9 +9953,7 @@ namespace vk struct DedicatedAllocationBufferCreateInfoNV { DedicatedAllocationBufferCreateInfoNV( Bool32 dedicatedAllocation_ = 0 ) - : sType( StructureType::eDedicatedAllocationBufferCreateInfoNV ) - , pNext( nullptr ) - , dedicatedAllocation( dedicatedAllocation_ ) + : dedicatedAllocation( dedicatedAllocation_ ) { } @@ -9674,10 +9997,10 @@ namespace vk } 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!" ); @@ -9685,9 +10008,7 @@ namespace vk struct DedicatedAllocationMemoryAllocateInfoNV { DedicatedAllocationMemoryAllocateInfoNV( Image image_ = Image(), Buffer buffer_ = Buffer() ) - : sType( StructureType::eDedicatedAllocationMemoryAllocateInfoNV ) - , pNext( nullptr ) - , image( image_ ) + : image( image_ ) , buffer( buffer_ ) { } @@ -9739,10 +10060,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDedicatedAllocationMemoryAllocateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; Image image; Buffer buffer; }; @@ -9752,9 +10073,7 @@ namespace vk struct ExportMemoryWin32HandleInfoNV { ExportMemoryWin32HandleInfoNV( const SECURITY_ATTRIBUTES* pAttributes_ = nullptr, DWORD dwAccess_ = 0 ) - : sType( StructureType::eExportMemoryWin32HandleInfoNV ) - , pNext( nullptr ) - , pAttributes( pAttributes_ ) + : pAttributes( pAttributes_ ) , dwAccess( dwAccess_ ) { } @@ -9806,10 +10125,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eExportMemoryWin32HandleInfoNV; public: - const void* pNext; + const void* pNext = nullptr; const SECURITY_ATTRIBUTES* pAttributes; DWORD dwAccess; }; @@ -9820,9 +10139,7 @@ namespace vk 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_ ) @@ -9914,10 +10231,10 @@ namespace vk } 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; @@ -9932,9 +10249,7 @@ namespace vk struct DeviceGeneratedCommandsFeaturesNVX { DeviceGeneratedCommandsFeaturesNVX( Bool32 computeBindingPointSupport_ = 0 ) - : sType( StructureType::eDeviceGeneratedCommandsFeaturesNVX ) - , pNext( nullptr ) - , computeBindingPointSupport( computeBindingPointSupport_ ) + : computeBindingPointSupport( computeBindingPointSupport_ ) { } @@ -9978,10 +10293,10 @@ namespace vk } 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!" ); @@ -9989,9 +10304,7 @@ namespace vk 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_ ) @@ -10067,10 +10380,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGeneratedCommandsLimitsNVX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t maxIndirectCommandsLayoutTokenCount; uint32_t maxObjectEntryCounts; uint32_t minSequenceCountBufferOffsetAlignment; @@ -10082,9 +10395,7 @@ namespace vk 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_ ) { @@ -10144,10 +10455,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eCmdReserveSpaceForCommandsInfoNVX; public: - const void* pNext; + const void* pNext = nullptr; ObjectTableNVX objectTable; IndirectCommandsLayoutNVX indirectCommandsLayout; uint32_t maxSequencesCount; @@ -10157,9 +10468,7 @@ namespace vk struct PhysicalDeviceFeatures2KHR { PhysicalDeviceFeatures2KHR( PhysicalDeviceFeatures features_ = PhysicalDeviceFeatures() ) - : sType( StructureType::ePhysicalDeviceFeatures2KHR ) - , pNext( nullptr ) - , features( features_ ) + : features( features_ ) { } @@ -10203,10 +10512,10 @@ namespace vk } 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!" ); @@ -10214,9 +10523,7 @@ namespace vk struct PhysicalDevicePushDescriptorPropertiesKHR { PhysicalDevicePushDescriptorPropertiesKHR( uint32_t maxPushDescriptors_ = 0 ) - : sType( StructureType::ePhysicalDevicePushDescriptorPropertiesKHR ) - , pNext( nullptr ) - , maxPushDescriptors( maxPushDescriptors_ ) + : maxPushDescriptors( maxPushDescriptors_ ) { } @@ -10260,10 +10567,10 @@ namespace vk } 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!" ); @@ -10271,9 +10578,7 @@ namespace vk struct PresentRegionsKHR { PresentRegionsKHR( uint32_t swapchainCount_ = 0, const PresentRegionKHR* pRegions_ = nullptr ) - : sType( StructureType::ePresentRegionsKHR ) - , pNext( nullptr ) - , swapchainCount( swapchainCount_ ) + : swapchainCount( swapchainCount_ ) , pRegions( pRegions_ ) { } @@ -10325,10 +10630,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePresentRegionsKHR; public: - const void* pNext; + const void* pNext = nullptr; uint32_t swapchainCount; const PresentRegionKHR* pRegions; }; @@ -10337,9 +10642,7 @@ namespace vk struct PhysicalDeviceVariablePointerFeaturesKHR { PhysicalDeviceVariablePointerFeaturesKHR( Bool32 variablePointersStorageBuffer_ = 0, Bool32 variablePointers_ = 0 ) - : sType( StructureType::ePhysicalDeviceVariablePointerFeaturesKHR ) - , pNext( nullptr ) - , variablePointersStorageBuffer( variablePointersStorageBuffer_ ) + : variablePointersStorageBuffer( variablePointersStorageBuffer_ ) , variablePointers( variablePointers_ ) { } @@ -10391,10 +10694,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceVariablePointerFeaturesKHR; public: - void* pNext; + void* pNext = nullptr; Bool32 variablePointersStorageBuffer; Bool32 variablePointers; }; @@ -10424,10 +10727,10 @@ namespace vk } 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]; @@ -10440,9 +10743,7 @@ namespace vk 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_ ) { @@ -10502,10 +10803,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eExportMemoryWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; const SECURITY_ATTRIBUTES* pAttributes; DWORD dwAccess; LPCWSTR name; @@ -10534,10 +10835,10 @@ namespace vk } 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!" ); @@ -10563,10 +10864,10 @@ namespace vk } 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!" ); @@ -10575,9 +10876,7 @@ namespace vk 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_ ) @@ -10669,10 +10968,10 @@ namespace vk } 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; @@ -10688,9 +10987,7 @@ namespace vk 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_ ) { @@ -10750,10 +11047,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eExportSemaphoreWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; const SECURITY_ATTRIBUTES* pAttributes; DWORD dwAccess; LPCWSTR name; @@ -10765,9 +11062,7 @@ namespace vk 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_ ) @@ -10835,10 +11130,10 @@ namespace vk } 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; @@ -10851,9 +11146,7 @@ namespace vk 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_ ) { @@ -10913,10 +11206,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eExportFenceWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; const SECURITY_ATTRIBUTES* pAttributes; DWORD dwAccess; LPCWSTR name; @@ -10927,9 +11220,7 @@ namespace vk 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_ ) { @@ -10989,10 +11280,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceMultiviewFeaturesKHX; public: - void* pNext; + void* pNext = nullptr; Bool32 multiview; Bool32 multiviewGeometryShader; Bool32 multiviewTessellationShader; @@ -11020,10 +11311,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceMultiviewPropertiesKHX; public: - void* pNext; + void* pNext = nullptr; uint32_t maxMultiviewViewCount; uint32_t maxMultiviewInstanceIndex; }; @@ -11032,9 +11323,7 @@ namespace vk 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_ ) @@ -11118,10 +11407,10 @@ namespace vk } 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; @@ -11131,216 +11420,302 @@ namespace vk }; static_assert( sizeof( RenderPassMultiviewCreateInfoKHX ) == sizeof( VkRenderPassMultiviewCreateInfoKHX ), "struct and wrapper have different size!" ); - struct BindBufferMemoryInfoKHX + struct BindBufferMemoryInfoKHR { - BindBufferMemoryInfoKHX( Buffer buffer_ = Buffer(), DeviceMemory memory_ = DeviceMemory(), DeviceSize memoryOffset_ = 0, uint32_t deviceIndexCount_ = 0, const uint32_t* pDeviceIndices_ = nullptr ) - : sType( StructureType::eBindBufferMemoryInfoKHX ) - , pNext( nullptr ) - , buffer( buffer_ ) + BindBufferMemoryInfoKHR( Buffer buffer_ = Buffer(), DeviceMemory memory_ = DeviceMemory(), DeviceSize memoryOffset_ = 0 ) + : buffer( buffer_ ) , memory( memory_ ) , memoryOffset( memoryOffset_ ) - , deviceIndexCount( deviceIndexCount_ ) - , pDeviceIndices( pDeviceIndices_ ) { } - BindBufferMemoryInfoKHX( VkBindBufferMemoryInfoKHX const & rhs ) + BindBufferMemoryInfoKHR( VkBindBufferMemoryInfoKHR const & rhs ) { - memcpy( this, &rhs, sizeof( BindBufferMemoryInfoKHX ) ); + memcpy( this, &rhs, sizeof( BindBufferMemoryInfoKHR ) ); } - BindBufferMemoryInfoKHX& operator=( VkBindBufferMemoryInfoKHX const & rhs ) + BindBufferMemoryInfoKHR& operator=( VkBindBufferMemoryInfoKHR const & rhs ) { - memcpy( this, &rhs, sizeof( BindBufferMemoryInfoKHX ) ); + memcpy( this, &rhs, sizeof( BindBufferMemoryInfoKHR ) ); return *this; } - BindBufferMemoryInfoKHX& setPNext( const void* pNext_ ) + BindBufferMemoryInfoKHR& setPNext( const void* pNext_ ) { pNext = pNext_; return *this; } - BindBufferMemoryInfoKHX& setBuffer( Buffer buffer_ ) + BindBufferMemoryInfoKHR& setBuffer( Buffer buffer_ ) { buffer = buffer_; return *this; } - BindBufferMemoryInfoKHX& setMemory( DeviceMemory memory_ ) + BindBufferMemoryInfoKHR& setMemory( DeviceMemory memory_ ) { memory = memory_; return *this; } - BindBufferMemoryInfoKHX& setMemoryOffset( DeviceSize memoryOffset_ ) + BindBufferMemoryInfoKHR& setMemoryOffset( DeviceSize memoryOffset_ ) { memoryOffset = memoryOffset_; return *this; } - BindBufferMemoryInfoKHX& setDeviceIndexCount( uint32_t deviceIndexCount_ ) + operator const VkBindBufferMemoryInfoKHR&() const { - deviceIndexCount = deviceIndexCount_; - return *this; + return *reinterpret_cast(this); } - BindBufferMemoryInfoKHX& setPDeviceIndices( const uint32_t* pDeviceIndices_ ) - { - pDeviceIndices = pDeviceIndices_; - return *this; - } - - operator const VkBindBufferMemoryInfoKHX&() const - { - return *reinterpret_cast(this); - } - - bool operator==( BindBufferMemoryInfoKHX const& rhs ) const + bool operator==( BindBufferMemoryInfoKHR const& rhs ) const { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( buffer == rhs.buffer ) && ( memory == rhs.memory ) - && ( memoryOffset == rhs.memoryOffset ) - && ( deviceIndexCount == rhs.deviceIndexCount ) - && ( pDeviceIndices == rhs.pDeviceIndices ); + && ( memoryOffset == rhs.memoryOffset ); } - bool operator!=( BindBufferMemoryInfoKHX const& rhs ) const + bool operator!=( BindBufferMemoryInfoKHR const& rhs ) const { return !operator==( rhs ); } private: - StructureType sType; + StructureType sType = StructureType::eBindBufferMemoryInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Buffer buffer; DeviceMemory memory; DeviceSize memoryOffset; + }; + static_assert( sizeof( BindBufferMemoryInfoKHR ) == sizeof( VkBindBufferMemoryInfoKHR ), "struct and wrapper have different size!" ); + + struct BindBufferMemoryDeviceGroupInfoKHX + { + BindBufferMemoryDeviceGroupInfoKHX( uint32_t deviceIndexCount_ = 0, const uint32_t* pDeviceIndices_ = nullptr ) + : deviceIndexCount( deviceIndexCount_ ) + , pDeviceIndices( pDeviceIndices_ ) + { + } + + BindBufferMemoryDeviceGroupInfoKHX( VkBindBufferMemoryDeviceGroupInfoKHX const & rhs ) + { + memcpy( this, &rhs, sizeof( BindBufferMemoryDeviceGroupInfoKHX ) ); + } + + BindBufferMemoryDeviceGroupInfoKHX& operator=( VkBindBufferMemoryDeviceGroupInfoKHX const & rhs ) + { + memcpy( this, &rhs, sizeof( BindBufferMemoryDeviceGroupInfoKHX ) ); + return *this; + } + BindBufferMemoryDeviceGroupInfoKHX& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + BindBufferMemoryDeviceGroupInfoKHX& setDeviceIndexCount( uint32_t deviceIndexCount_ ) + { + deviceIndexCount = deviceIndexCount_; + return *this; + } + + BindBufferMemoryDeviceGroupInfoKHX& setPDeviceIndices( const uint32_t* pDeviceIndices_ ) + { + pDeviceIndices = pDeviceIndices_; + return *this; + } + + operator const VkBindBufferMemoryDeviceGroupInfoKHX&() const + { + return *reinterpret_cast(this); + } + + bool operator==( BindBufferMemoryDeviceGroupInfoKHX const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( deviceIndexCount == rhs.deviceIndexCount ) + && ( pDeviceIndices == rhs.pDeviceIndices ); + } + + bool operator!=( BindBufferMemoryDeviceGroupInfoKHX const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eBindBufferMemoryDeviceGroupInfoKHX; + + public: + const void* pNext = nullptr; uint32_t deviceIndexCount; const uint32_t* pDeviceIndices; }; - static_assert( sizeof( BindBufferMemoryInfoKHX ) == sizeof( VkBindBufferMemoryInfoKHX ), "struct and wrapper have different size!" ); + static_assert( sizeof( BindBufferMemoryDeviceGroupInfoKHX ) == sizeof( VkBindBufferMemoryDeviceGroupInfoKHX ), "struct and wrapper have different size!" ); - struct BindImageMemoryInfoKHX + struct BindImageMemoryInfoKHR { - BindImageMemoryInfoKHX( Image image_ = Image(), DeviceMemory memory_ = DeviceMemory(), DeviceSize memoryOffset_ = 0, uint32_t deviceIndexCount_ = 0, const uint32_t* pDeviceIndices_ = nullptr, uint32_t SFRRectCount_ = 0, const Rect2D* pSFRRects_ = nullptr ) - : sType( StructureType::eBindImageMemoryInfoKHX ) - , pNext( nullptr ) - , image( image_ ) + BindImageMemoryInfoKHR( Image image_ = Image(), DeviceMemory memory_ = DeviceMemory(), DeviceSize memoryOffset_ = 0 ) + : image( image_ ) , memory( memory_ ) , memoryOffset( memoryOffset_ ) - , deviceIndexCount( deviceIndexCount_ ) + { + } + + BindImageMemoryInfoKHR( VkBindImageMemoryInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( BindImageMemoryInfoKHR ) ); + } + + BindImageMemoryInfoKHR& operator=( VkBindImageMemoryInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( BindImageMemoryInfoKHR ) ); + return *this; + } + BindImageMemoryInfoKHR& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + BindImageMemoryInfoKHR& setImage( Image image_ ) + { + image = image_; + return *this; + } + + BindImageMemoryInfoKHR& setMemory( DeviceMemory memory_ ) + { + memory = memory_; + return *this; + } + + BindImageMemoryInfoKHR& setMemoryOffset( DeviceSize memoryOffset_ ) + { + memoryOffset = memoryOffset_; + return *this; + } + + operator const VkBindImageMemoryInfoKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( BindImageMemoryInfoKHR const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( image == rhs.image ) + && ( memory == rhs.memory ) + && ( memoryOffset == rhs.memoryOffset ); + } + + bool operator!=( BindImageMemoryInfoKHR const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eBindImageMemoryInfoKHR; + + public: + const void* pNext = nullptr; + Image image; + DeviceMemory memory; + DeviceSize memoryOffset; + }; + static_assert( sizeof( BindImageMemoryInfoKHR ) == sizeof( VkBindImageMemoryInfoKHR ), "struct and wrapper have different size!" ); + + struct BindImageMemoryDeviceGroupInfoKHX + { + BindImageMemoryDeviceGroupInfoKHX( uint32_t deviceIndexCount_ = 0, const uint32_t* pDeviceIndices_ = nullptr, uint32_t SFRRectCount_ = 0, const Rect2D* pSFRRects_ = nullptr ) + : deviceIndexCount( deviceIndexCount_ ) , pDeviceIndices( pDeviceIndices_ ) , SFRRectCount( SFRRectCount_ ) , pSFRRects( pSFRRects_ ) { } - BindImageMemoryInfoKHX( VkBindImageMemoryInfoKHX const & rhs ) + BindImageMemoryDeviceGroupInfoKHX( VkBindImageMemoryDeviceGroupInfoKHX const & rhs ) { - memcpy( this, &rhs, sizeof( BindImageMemoryInfoKHX ) ); + memcpy( this, &rhs, sizeof( BindImageMemoryDeviceGroupInfoKHX ) ); } - BindImageMemoryInfoKHX& operator=( VkBindImageMemoryInfoKHX const & rhs ) + BindImageMemoryDeviceGroupInfoKHX& operator=( VkBindImageMemoryDeviceGroupInfoKHX const & rhs ) { - memcpy( this, &rhs, sizeof( BindImageMemoryInfoKHX ) ); + memcpy( this, &rhs, sizeof( BindImageMemoryDeviceGroupInfoKHX ) ); return *this; } - BindImageMemoryInfoKHX& setPNext( const void* pNext_ ) + BindImageMemoryDeviceGroupInfoKHX& setPNext( const void* pNext_ ) { pNext = pNext_; return *this; } - BindImageMemoryInfoKHX& setImage( Image image_ ) - { - image = image_; - return *this; - } - - BindImageMemoryInfoKHX& setMemory( DeviceMemory memory_ ) - { - memory = memory_; - return *this; - } - - BindImageMemoryInfoKHX& setMemoryOffset( DeviceSize memoryOffset_ ) - { - memoryOffset = memoryOffset_; - return *this; - } - - BindImageMemoryInfoKHX& setDeviceIndexCount( uint32_t deviceIndexCount_ ) + BindImageMemoryDeviceGroupInfoKHX& setDeviceIndexCount( uint32_t deviceIndexCount_ ) { deviceIndexCount = deviceIndexCount_; return *this; } - BindImageMemoryInfoKHX& setPDeviceIndices( const uint32_t* pDeviceIndices_ ) + BindImageMemoryDeviceGroupInfoKHX& setPDeviceIndices( const uint32_t* pDeviceIndices_ ) { pDeviceIndices = pDeviceIndices_; return *this; } - BindImageMemoryInfoKHX& setSFRRectCount( uint32_t SFRRectCount_ ) + BindImageMemoryDeviceGroupInfoKHX& setSFRRectCount( uint32_t SFRRectCount_ ) { SFRRectCount = SFRRectCount_; return *this; } - BindImageMemoryInfoKHX& setPSFRRects( const Rect2D* pSFRRects_ ) + BindImageMemoryDeviceGroupInfoKHX& setPSFRRects( const Rect2D* pSFRRects_ ) { pSFRRects = pSFRRects_; return *this; } - operator const VkBindImageMemoryInfoKHX&() const + operator const VkBindImageMemoryDeviceGroupInfoKHX&() const { - return *reinterpret_cast(this); + return *reinterpret_cast(this); } - bool operator==( BindImageMemoryInfoKHX const& rhs ) const + bool operator==( BindImageMemoryDeviceGroupInfoKHX const& rhs ) const { return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) - && ( image == rhs.image ) - && ( memory == rhs.memory ) - && ( memoryOffset == rhs.memoryOffset ) && ( deviceIndexCount == rhs.deviceIndexCount ) && ( pDeviceIndices == rhs.pDeviceIndices ) && ( SFRRectCount == rhs.SFRRectCount ) && ( pSFRRects == rhs.pSFRRects ); } - bool operator!=( BindImageMemoryInfoKHX const& rhs ) const + bool operator!=( BindImageMemoryDeviceGroupInfoKHX const& rhs ) const { return !operator==( rhs ); } private: - StructureType sType; + StructureType sType = StructureType::eBindImageMemoryDeviceGroupInfoKHX; public: - const void* pNext; - Image image; - DeviceMemory memory; - DeviceSize memoryOffset; + const void* pNext = nullptr; uint32_t deviceIndexCount; const uint32_t* pDeviceIndices; uint32_t SFRRectCount; const Rect2D* pSFRRects; }; - static_assert( sizeof( BindImageMemoryInfoKHX ) == sizeof( VkBindImageMemoryInfoKHX ), "struct and wrapper have different size!" ); + static_assert( sizeof( BindImageMemoryDeviceGroupInfoKHX ) == sizeof( VkBindImageMemoryDeviceGroupInfoKHX ), "struct and wrapper have different size!" ); 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_ ) { @@ -11400,10 +11775,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGroupRenderPassBeginInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t deviceMask; uint32_t deviceRenderAreaCount; const Rect2D* pDeviceRenderAreas; @@ -11413,9 +11788,7 @@ namespace vk struct DeviceGroupCommandBufferBeginInfoKHX { DeviceGroupCommandBufferBeginInfoKHX( uint32_t deviceMask_ = 0 ) - : sType( StructureType::eDeviceGroupCommandBufferBeginInfoKHX ) - , pNext( nullptr ) - , deviceMask( deviceMask_ ) + : deviceMask( deviceMask_ ) { } @@ -11459,10 +11832,10 @@ namespace vk } 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!" ); @@ -11470,9 +11843,7 @@ namespace vk 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_ ) @@ -11556,10 +11927,10 @@ namespace vk } 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; @@ -11572,9 +11943,7 @@ namespace vk struct DeviceGroupBindSparseInfoKHX { DeviceGroupBindSparseInfoKHX( uint32_t resourceDeviceIndex_ = 0, uint32_t memoryDeviceIndex_ = 0 ) - : sType( StructureType::eDeviceGroupBindSparseInfoKHX ) - , pNext( nullptr ) - , resourceDeviceIndex( resourceDeviceIndex_ ) + : resourceDeviceIndex( resourceDeviceIndex_ ) , memoryDeviceIndex( memoryDeviceIndex_ ) { } @@ -11626,10 +11995,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGroupBindSparseInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t resourceDeviceIndex; uint32_t memoryDeviceIndex; }; @@ -11638,9 +12007,7 @@ namespace vk struct ImageSwapchainCreateInfoKHX { ImageSwapchainCreateInfoKHX( SwapchainKHR swapchain_ = SwapchainKHR() ) - : sType( StructureType::eImageSwapchainCreateInfoKHX ) - , pNext( nullptr ) - , swapchain( swapchain_ ) + : swapchain( swapchain_ ) { } @@ -11684,10 +12051,10 @@ namespace vk } 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!" ); @@ -11695,9 +12062,7 @@ namespace vk struct BindImageMemorySwapchainInfoKHX { BindImageMemorySwapchainInfoKHX( SwapchainKHR swapchain_ = SwapchainKHR(), uint32_t imageIndex_ = 0 ) - : sType( StructureType::eBindImageMemorySwapchainInfoKHX ) - , pNext( nullptr ) - , swapchain( swapchain_ ) + : swapchain( swapchain_ ) , imageIndex( imageIndex_ ) { } @@ -11749,10 +12114,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eBindImageMemorySwapchainInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; SwapchainKHR swapchain; uint32_t imageIndex; }; @@ -11761,9 +12126,7 @@ namespace vk 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_ ) @@ -11839,10 +12202,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eAcquireNextImageInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; SwapchainKHR swapchain; uint64_t timeout; Semaphore semaphore; @@ -11854,9 +12217,7 @@ namespace vk 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_ ) @@ -11956,10 +12317,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eHdrMetadataEXT; public: - const void* pNext; + const void* pNext = nullptr; XYColorEXT displayPrimaryRed; XYColorEXT displayPrimaryGreen; XYColorEXT displayPrimaryBlue; @@ -11974,9 +12335,7 @@ namespace vk struct PresentTimesInfoGOOGLE { PresentTimesInfoGOOGLE( uint32_t swapchainCount_ = 0, const PresentTimeGOOGLE* pTimes_ = nullptr ) - : sType( StructureType::ePresentTimesInfoGOOGLE ) - , pNext( nullptr ) - , swapchainCount( swapchainCount_ ) + : swapchainCount( swapchainCount_ ) , pTimes( pTimes_ ) { } @@ -12028,10 +12387,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePresentTimesInfoGOOGLE; public: - const void* pNext; + const void* pNext = nullptr; uint32_t swapchainCount; const PresentTimeGOOGLE* pTimes; }; @@ -12041,9 +12400,7 @@ namespace vk struct IOSSurfaceCreateInfoMVK { IOSSurfaceCreateInfoMVK( IOSSurfaceCreateFlagsMVK flags_ = IOSSurfaceCreateFlagsMVK(), const void* pView_ = nullptr ) - : sType( StructureType::eIOSSurfaceCreateInfoMVK ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , pView( pView_ ) { } @@ -12095,10 +12452,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eIosSurfaceCreateInfoMVK; public: - const void* pNext; + const void* pNext = nullptr; IOSSurfaceCreateFlagsMVK flags; const void* pView; }; @@ -12109,9 +12466,7 @@ namespace vk struct MacOSSurfaceCreateInfoMVK { MacOSSurfaceCreateInfoMVK( MacOSSurfaceCreateFlagsMVK flags_ = MacOSSurfaceCreateFlagsMVK(), const void* pView_ = nullptr ) - : sType( StructureType::eMacOSSurfaceCreateInfoMVK ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , pView( pView_ ) { } @@ -12163,10 +12518,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eMacosSurfaceCreateInfoMVK; public: - const void* pNext; + const void* pNext = nullptr; MacOSSurfaceCreateFlagsMVK flags; const void* pView; }; @@ -12176,9 +12531,7 @@ namespace vk 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_ ) { @@ -12238,10 +12591,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineViewportWScalingStateCreateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; Bool32 viewportWScalingEnable; uint32_t viewportCount; const ViewportWScalingNV* pViewportWScalings; @@ -12251,9 +12604,7 @@ namespace vk struct PhysicalDeviceDiscardRectanglePropertiesEXT { PhysicalDeviceDiscardRectanglePropertiesEXT( uint32_t maxDiscardRectangles_ = 0 ) - : sType( StructureType::ePhysicalDeviceDiscardRectanglePropertiesEXT ) - , pNext( nullptr ) - , maxDiscardRectangles( maxDiscardRectangles_ ) + : maxDiscardRectangles( maxDiscardRectangles_ ) { } @@ -12297,10 +12648,10 @@ namespace vk } 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!" ); @@ -12325,10 +12676,10 @@ namespace vk } 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!" ); @@ -12336,9 +12687,7 @@ namespace vk struct PhysicalDeviceSurfaceInfo2KHR { PhysicalDeviceSurfaceInfo2KHR( SurfaceKHR surface_ = SurfaceKHR() ) - : sType( StructureType::ePhysicalDeviceSurfaceInfo2KHR ) - , pNext( nullptr ) - , surface( surface_ ) + : surface( surface_ ) { } @@ -12382,10 +12731,10 @@ namespace vk } 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!" ); @@ -12393,9 +12742,7 @@ namespace vk 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_ ) @@ -12463,10 +12810,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDevice16BitStorageFeaturesKHR; public: - void* pNext; + void* pNext = nullptr; Bool32 storageBuffer16BitAccess; Bool32 uniformAndStorageBuffer16BitAccess; Bool32 storagePushConstant16; @@ -12477,9 +12824,7 @@ namespace vk struct BufferMemoryRequirementsInfo2KHR { BufferMemoryRequirementsInfo2KHR( Buffer buffer_ = Buffer() ) - : sType( StructureType::eBufferMemoryRequirementsInfo2KHR ) - , pNext( nullptr ) - , buffer( buffer_ ) + : buffer( buffer_ ) { } @@ -12523,10 +12868,10 @@ namespace vk } 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!" ); @@ -12534,9 +12879,7 @@ namespace vk struct ImageMemoryRequirementsInfo2KHR { ImageMemoryRequirementsInfo2KHR( Image image_ = Image() ) - : sType( StructureType::eImageMemoryRequirementsInfo2KHR ) - , pNext( nullptr ) - , image( image_ ) + : image( image_ ) { } @@ -12580,10 +12923,10 @@ namespace vk } 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!" ); @@ -12591,9 +12934,7 @@ namespace vk struct ImageSparseMemoryRequirementsInfo2KHR { ImageSparseMemoryRequirementsInfo2KHR( Image image_ = Image() ) - : sType( StructureType::eImageSparseMemoryRequirementsInfo2KHR ) - , pNext( nullptr ) - , image( image_ ) + : image( image_ ) { } @@ -12637,10 +12978,10 @@ namespace vk } 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!" ); @@ -12665,10 +13006,10 @@ namespace vk } 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!" ); @@ -12694,10 +13035,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eMemoryDedicatedRequirementsKHR; public: - void* pNext; + void* pNext = nullptr; Bool32 prefersDedicatedAllocation; Bool32 requiresDedicatedAllocation; }; @@ -12706,9 +13047,7 @@ namespace vk struct MemoryDedicatedAllocateInfoKHR { MemoryDedicatedAllocateInfoKHR( Image image_ = Image(), Buffer buffer_ = Buffer() ) - : sType( StructureType::eMemoryDedicatedAllocateInfoKHR ) - , pNext( nullptr ) - , image( image_ ) + : image( image_ ) , buffer( buffer_ ) { } @@ -12760,15 +13099,153 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eMemoryDedicatedAllocateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Image image; Buffer buffer; }; static_assert( sizeof( MemoryDedicatedAllocateInfoKHR ) == sizeof( VkMemoryDedicatedAllocateInfoKHR ), "struct and wrapper have different size!" ); + struct SamplerYcbcrConversionInfoKHR + { + SamplerYcbcrConversionInfoKHR( SamplerYcbcrConversionKHR conversion_ = SamplerYcbcrConversionKHR() ) + : conversion( conversion_ ) + { + } + + SamplerYcbcrConversionInfoKHR( VkSamplerYcbcrConversionInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( SamplerYcbcrConversionInfoKHR ) ); + } + + SamplerYcbcrConversionInfoKHR& operator=( VkSamplerYcbcrConversionInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( SamplerYcbcrConversionInfoKHR ) ); + return *this; + } + SamplerYcbcrConversionInfoKHR& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + SamplerYcbcrConversionInfoKHR& setConversion( SamplerYcbcrConversionKHR conversion_ ) + { + conversion = conversion_; + return *this; + } + + operator const VkSamplerYcbcrConversionInfoKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( SamplerYcbcrConversionInfoKHR const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( conversion == rhs.conversion ); + } + + bool operator!=( SamplerYcbcrConversionInfoKHR const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eSamplerYcbcrConversionInfoKHR; + + public: + const void* pNext = nullptr; + SamplerYcbcrConversionKHR conversion; + }; + static_assert( sizeof( SamplerYcbcrConversionInfoKHR ) == sizeof( VkSamplerYcbcrConversionInfoKHR ), "struct and wrapper have different size!" ); + + struct PhysicalDeviceSamplerYcbcrConversionFeaturesKHR + { + PhysicalDeviceSamplerYcbcrConversionFeaturesKHR( Bool32 samplerYcbcrConversion_ = 0 ) + : samplerYcbcrConversion( samplerYcbcrConversion_ ) + { + } + + PhysicalDeviceSamplerYcbcrConversionFeaturesKHR( VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( PhysicalDeviceSamplerYcbcrConversionFeaturesKHR ) ); + } + + PhysicalDeviceSamplerYcbcrConversionFeaturesKHR& operator=( VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( PhysicalDeviceSamplerYcbcrConversionFeaturesKHR ) ); + return *this; + } + PhysicalDeviceSamplerYcbcrConversionFeaturesKHR& setPNext( void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + PhysicalDeviceSamplerYcbcrConversionFeaturesKHR& setSamplerYcbcrConversion( Bool32 samplerYcbcrConversion_ ) + { + samplerYcbcrConversion = samplerYcbcrConversion_; + return *this; + } + + operator const VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( PhysicalDeviceSamplerYcbcrConversionFeaturesKHR const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( samplerYcbcrConversion == rhs.samplerYcbcrConversion ); + } + + bool operator!=( PhysicalDeviceSamplerYcbcrConversionFeaturesKHR const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::ePhysicalDeviceSamplerYcbcrConversionFeaturesKHR; + + public: + void* pNext = nullptr; + Bool32 samplerYcbcrConversion; + }; + static_assert( sizeof( PhysicalDeviceSamplerYcbcrConversionFeaturesKHR ) == sizeof( VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR ), "struct and wrapper have different size!" ); + + struct SamplerYcbcrConversionImageFormatPropertiesKHR + { + operator const VkSamplerYcbcrConversionImageFormatPropertiesKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( SamplerYcbcrConversionImageFormatPropertiesKHR const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( combinedImageSamplerDescriptorCount == rhs.combinedImageSamplerDescriptorCount ); + } + + bool operator!=( SamplerYcbcrConversionImageFormatPropertiesKHR const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eSamplerYcbcrConversionImageFormatPropertiesKHR; + + public: + void* pNext = nullptr; + uint32_t combinedImageSamplerDescriptorCount; + }; + static_assert( sizeof( SamplerYcbcrConversionImageFormatPropertiesKHR ) == sizeof( VkSamplerYcbcrConversionImageFormatPropertiesKHR ), "struct and wrapper have different size!" ); + struct TextureLODGatherFormatPropertiesAMD { operator const VkTextureLODGatherFormatPropertiesAMD&() const @@ -12789,10 +13266,10 @@ namespace vk } 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!" ); @@ -12800,9 +13277,7 @@ namespace vk 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_ ) { @@ -12862,10 +13337,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineCoverageToColorStateCreateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; PipelineCoverageToColorStateCreateFlagsNV flags; Bool32 coverageToColorEnable; uint32_t coverageToColorLocation; @@ -12893,21 +13368,47 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT; public: - void* pNext; + void* pNext = nullptr; Bool32 filterMinmaxSingleComponentFormats; Bool32 filterMinmaxImageComponentMapping; }; static_assert( sizeof( PhysicalDeviceSamplerFilterMinmaxPropertiesEXT ) == sizeof( VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT ), "struct and wrapper have different size!" ); + struct MultisamplePropertiesEXT + { + operator const VkMultisamplePropertiesEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( MultisamplePropertiesEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( maxSampleLocationGridSize == rhs.maxSampleLocationGridSize ); + } + + bool operator!=( MultisamplePropertiesEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eMultisamplePropertiesEXT; + + public: + void* pNext = nullptr; + Extent2D maxSampleLocationGridSize; + }; + static_assert( sizeof( MultisamplePropertiesEXT ) == sizeof( VkMultisamplePropertiesEXT ), "struct and wrapper have different size!" ); + struct PhysicalDeviceBlendOperationAdvancedFeaturesEXT { PhysicalDeviceBlendOperationAdvancedFeaturesEXT( Bool32 advancedBlendCoherentOperations_ = 0 ) - : sType( StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT ) - , pNext( nullptr ) - , advancedBlendCoherentOperations( advancedBlendCoherentOperations_ ) + : advancedBlendCoherentOperations( advancedBlendCoherentOperations_ ) { } @@ -12951,10 +13452,10 @@ namespace vk } 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!" ); @@ -12984,10 +13485,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT; public: - void* pNext; + void* pNext = nullptr; uint32_t advancedBlendMaxColorAttachments; Bool32 advancedBlendIndependentBlend; Bool32 advancedBlendNonPremultipliedSrcColor; @@ -12997,6 +13498,435 @@ namespace vk }; static_assert( sizeof( PhysicalDeviceBlendOperationAdvancedPropertiesEXT ) == sizeof( VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT ), "struct and wrapper have different size!" ); + struct ImageFormatListCreateInfoKHR + { + ImageFormatListCreateInfoKHR( uint32_t viewFormatCount_ = 0, const Format* pViewFormats_ = nullptr ) + : viewFormatCount( viewFormatCount_ ) + , pViewFormats( pViewFormats_ ) + { + } + + ImageFormatListCreateInfoKHR( VkImageFormatListCreateInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( ImageFormatListCreateInfoKHR ) ); + } + + ImageFormatListCreateInfoKHR& operator=( VkImageFormatListCreateInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( ImageFormatListCreateInfoKHR ) ); + return *this; + } + ImageFormatListCreateInfoKHR& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + ImageFormatListCreateInfoKHR& setViewFormatCount( uint32_t viewFormatCount_ ) + { + viewFormatCount = viewFormatCount_; + return *this; + } + + ImageFormatListCreateInfoKHR& setPViewFormats( const Format* pViewFormats_ ) + { + pViewFormats = pViewFormats_; + return *this; + } + + operator const VkImageFormatListCreateInfoKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( ImageFormatListCreateInfoKHR const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( viewFormatCount == rhs.viewFormatCount ) + && ( pViewFormats == rhs.pViewFormats ); + } + + bool operator!=( ImageFormatListCreateInfoKHR const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eImageFormatListCreateInfoKHR; + + public: + const void* pNext = nullptr; + uint32_t viewFormatCount; + const Format* pViewFormats; + }; + static_assert( sizeof( ImageFormatListCreateInfoKHR ) == sizeof( VkImageFormatListCreateInfoKHR ), "struct and wrapper have different size!" ); + + struct ValidationCacheCreateInfoEXT + { + ValidationCacheCreateInfoEXT( ValidationCacheCreateFlagsEXT flags_ = ValidationCacheCreateFlagsEXT(), size_t initialDataSize_ = 0, const void* pInitialData_ = nullptr ) + : flags( flags_ ) + , initialDataSize( initialDataSize_ ) + , pInitialData( pInitialData_ ) + { + } + + ValidationCacheCreateInfoEXT( VkValidationCacheCreateInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( ValidationCacheCreateInfoEXT ) ); + } + + ValidationCacheCreateInfoEXT& operator=( VkValidationCacheCreateInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( ValidationCacheCreateInfoEXT ) ); + return *this; + } + ValidationCacheCreateInfoEXT& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + ValidationCacheCreateInfoEXT& setFlags( ValidationCacheCreateFlagsEXT flags_ ) + { + flags = flags_; + return *this; + } + + ValidationCacheCreateInfoEXT& setInitialDataSize( size_t initialDataSize_ ) + { + initialDataSize = initialDataSize_; + return *this; + } + + ValidationCacheCreateInfoEXT& setPInitialData( const void* pInitialData_ ) + { + pInitialData = pInitialData_; + return *this; + } + + operator const VkValidationCacheCreateInfoEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( ValidationCacheCreateInfoEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( flags == rhs.flags ) + && ( initialDataSize == rhs.initialDataSize ) + && ( pInitialData == rhs.pInitialData ); + } + + bool operator!=( ValidationCacheCreateInfoEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eValidationCacheCreateInfoEXT; + + public: + const void* pNext = nullptr; + ValidationCacheCreateFlagsEXT flags; + size_t initialDataSize; + const void* pInitialData; + }; + static_assert( sizeof( ValidationCacheCreateInfoEXT ) == sizeof( VkValidationCacheCreateInfoEXT ), "struct and wrapper have different size!" ); + + struct ShaderModuleValidationCacheCreateInfoEXT + { + ShaderModuleValidationCacheCreateInfoEXT( ValidationCacheEXT validationCache_ = ValidationCacheEXT() ) + : validationCache( validationCache_ ) + { + } + + ShaderModuleValidationCacheCreateInfoEXT( VkShaderModuleValidationCacheCreateInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( ShaderModuleValidationCacheCreateInfoEXT ) ); + } + + ShaderModuleValidationCacheCreateInfoEXT& operator=( VkShaderModuleValidationCacheCreateInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( ShaderModuleValidationCacheCreateInfoEXT ) ); + return *this; + } + ShaderModuleValidationCacheCreateInfoEXT& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + ShaderModuleValidationCacheCreateInfoEXT& setValidationCache( ValidationCacheEXT 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 VkPhysicalDeviceConservativeRasterizationPropertiesEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( PhysicalDeviceConservativeRasterizationPropertiesEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( 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!=( PhysicalDeviceConservativeRasterizationPropertiesEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::ePhysicalDeviceConservativeRasterizationPropertiesEXT; + + public: + void* pNext = nullptr; + float primitiveOverestimationSize; + float maxExtraPrimitiveOverestimationSize; + float extraPrimitiveOverestimationSizeGranularity; + Bool32 primitiveUnderestimation; + Bool32 conservativePointAndLineRasterization; + Bool32 degenerateTrianglesRasterized; + Bool32 degenerateLinesRasterized; + Bool32 fullyCoveredFragmentShaderInputVariable; + Bool32 conservativeRasterizationPostDepthCoverage; + }; + static_assert( sizeof( PhysicalDeviceConservativeRasterizationPropertiesEXT ) == sizeof( VkPhysicalDeviceConservativeRasterizationPropertiesEXT ), "struct and wrapper have different size!" ); + enum class SubpassContents { eInline = VK_SUBPASS_CONTENTS_INLINE, @@ -13006,9 +13936,7 @@ namespace vk 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_ ) @@ -13092,10 +14020,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePresentInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; uint32_t waitSemaphoreCount; const Semaphore* pWaitSemaphores; uint32_t swapchainCount; @@ -13117,15 +14045,14 @@ namespace vk eStencilWriteMask = VK_DYNAMIC_STATE_STENCIL_WRITE_MASK, eStencilReference = VK_DYNAMIC_STATE_STENCIL_REFERENCE, eViewportWScalingNV = VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, - eDiscardRectangleEXT = VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT + eDiscardRectangleEXT = VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT, + eSampleLocationsEXT = VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT }; 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_ ) { @@ -13185,10 +14112,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineDynamicStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineDynamicStateCreateFlags flags; uint32_t dynamicStateCount; const DynamicState* pDynamicStates; @@ -13204,9 +14131,7 @@ namespace vk 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_ ) @@ -13306,10 +14231,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDescriptorUpdateTemplateCreateInfoKHR; public: - void* pNext; + void* pNext = nullptr; DescriptorUpdateTemplateCreateFlagsKHR flags; uint32_t descriptorUpdateEntryCount; const DescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries; @@ -13356,7 +14281,9 @@ namespace vk eDebugReportCallbackEXT = VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT, eDescriptorUpdateTemplateKHR = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR, eObjectTableNVX = VK_OBJECT_TYPE_OBJECT_TABLE_NVX, - eIndirectCommandsLayoutNVX = VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX + eIndirectCommandsLayoutNVX = VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX, + eSamplerYcbcrConversionKHR = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR, + eValidationCacheEXT = VK_OBJECT_TYPE_VALIDATION_CACHE_EXT }; enum class QueueFlagBits @@ -13434,10 +14361,10 @@ namespace vk } 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!" ); @@ -13590,10 +14517,10 @@ namespace vk } 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!" ); @@ -13645,9 +14572,7 @@ namespace vk struct MemoryBarrier { MemoryBarrier( AccessFlags srcAccessMask_ = AccessFlags(), AccessFlags dstAccessMask_ = AccessFlags() ) - : sType( StructureType::eMemoryBarrier ) - , pNext( nullptr ) - , srcAccessMask( srcAccessMask_ ) + : srcAccessMask( srcAccessMask_ ) , dstAccessMask( dstAccessMask_ ) { } @@ -13699,10 +14624,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eMemoryBarrier; public: - const void* pNext; + const void* pNext = nullptr; AccessFlags srcAccessMask; AccessFlags dstAccessMask; }; @@ -13711,9 +14636,7 @@ namespace vk 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_ ) @@ -13805,10 +14728,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eBufferMemoryBarrier; public: - const void* pNext; + const void* pNext = nullptr; AccessFlags srcAccessMask; AccessFlags dstAccessMask; uint32_t srcQueueFamilyIndex; @@ -13882,9 +14805,7 @@ namespace vk 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_ ) @@ -13968,10 +14889,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eBufferCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; BufferCreateFlags flags; DeviceSize size; BufferUsageFlags usage; @@ -14094,9 +15015,7 @@ namespace vk 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_ ) @@ -14172,10 +15091,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineShaderStageCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineShaderStageCreateFlags flags; ShaderStageFlagBits stage; ShaderModule module; @@ -14247,9 +15166,7 @@ namespace vk 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_ ) @@ -14325,10 +15242,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineLayoutCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineLayoutCreateFlags flags; uint32_t setLayoutCount; const DescriptorSetLayout* pSetLayouts; @@ -14337,6 +15254,39 @@ namespace vk }; 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, @@ -14389,14 +15339,69 @@ namespace vk } 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!" ); + struct ImageViewUsageCreateInfoKHR + { + ImageViewUsageCreateInfoKHR( ImageUsageFlags usage_ = ImageUsageFlags() ) + : usage( usage_ ) + { + } + + ImageViewUsageCreateInfoKHR( VkImageViewUsageCreateInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( ImageViewUsageCreateInfoKHR ) ); + } + + ImageViewUsageCreateInfoKHR& operator=( VkImageViewUsageCreateInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( ImageViewUsageCreateInfoKHR ) ); + return *this; + } + ImageViewUsageCreateInfoKHR& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + ImageViewUsageCreateInfoKHR& setUsage( ImageUsageFlags usage_ ) + { + usage = usage_; + return *this; + } + + operator const VkImageViewUsageCreateInfoKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( ImageViewUsageCreateInfoKHR const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( usage == rhs.usage ); + } + + bool operator!=( ImageViewUsageCreateInfoKHR const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eImageViewUsageCreateInfoKHR; + + public: + const void* pNext = nullptr; + ImageUsageFlags usage; + }; + static_assert( sizeof( ImageViewUsageCreateInfoKHR ) == sizeof( VkImageViewUsageCreateInfoKHR ), "struct and wrapper have different size!" ); + enum class ImageCreateFlagBits { eSparseBinding = VK_IMAGE_CREATE_SPARSE_BINDING_BIT, @@ -14405,7 +15410,12 @@ namespace vk eMutableFormat = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, eCubeCompatible = VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, eBindSfrKHX = VK_IMAGE_CREATE_BIND_SFR_BIT_KHX, - e2DArrayCompatibleKHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR + e2DArrayCompatibleKHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR, + eBlockTexelViewCompatibleKHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR, + eExtendedUsageKHR = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR, + eSampleLocationsCompatibleDepthEXT = VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT, + eDisjointKHR = VK_IMAGE_CREATE_DISJOINT_BIT_KHR, + eAliasKHR = VK_IMAGE_CREATE_ALIAS_BIT_KHR }; using ImageCreateFlags = Flags; @@ -14424,16 +15434,14 @@ namespace vk { enum { - allFlags = VkFlags(ImageCreateFlagBits::eSparseBinding) | VkFlags(ImageCreateFlagBits::eSparseResidency) | VkFlags(ImageCreateFlagBits::eSparseAliased) | VkFlags(ImageCreateFlagBits::eMutableFormat) | VkFlags(ImageCreateFlagBits::eCubeCompatible) | VkFlags(ImageCreateFlagBits::eBindSfrKHX) | VkFlags(ImageCreateFlagBits::e2DArrayCompatibleKHR) + allFlags = VkFlags(ImageCreateFlagBits::eSparseBinding) | VkFlags(ImageCreateFlagBits::eSparseResidency) | VkFlags(ImageCreateFlagBits::eSparseAliased) | VkFlags(ImageCreateFlagBits::eMutableFormat) | VkFlags(ImageCreateFlagBits::eCubeCompatible) | VkFlags(ImageCreateFlagBits::eBindSfrKHX) | VkFlags(ImageCreateFlagBits::e2DArrayCompatibleKHR) | VkFlags(ImageCreateFlagBits::eBlockTexelViewCompatibleKHR) | VkFlags(ImageCreateFlagBits::eExtendedUsageKHR) | VkFlags(ImageCreateFlagBits::eSampleLocationsCompatibleDepthEXT) | VkFlags(ImageCreateFlagBits::eDisjointKHR) | VkFlags(ImageCreateFlagBits::eAliasKHR) }; }; 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_ ) @@ -14509,10 +15517,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceImageFormatInfo2KHR; public: - const void* pNext; + const void* pNext = nullptr; Format format; ImageType type; ImageTiling tiling; @@ -14553,9 +15561,7 @@ namespace vk 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_ ) @@ -14631,10 +15637,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eComputePipelineCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineCreateFlags flags; PipelineShaderStageCreateInfo stage; PipelineLayout layout; @@ -14779,9 +15785,7 @@ namespace vk 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_ ) @@ -14865,10 +15869,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineColorBlendStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineColorBlendStateCreateFlags flags; Bool32 logicOpEnable; LogicOp logicOp; @@ -14906,9 +15910,7 @@ namespace vk struct FenceCreateInfo { FenceCreateInfo( FenceCreateFlags flags_ = FenceCreateFlags() ) - : sType( StructureType::eFenceCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) { } @@ -14952,10 +15954,10 @@ namespace vk } 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!" ); @@ -14978,7 +15980,14 @@ namespace vk eSampledImageFilterCubicIMG = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG, eTransferSrcKHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR, eTransferDstKHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR, - eSampledImageFilterMinmaxEXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT + eSampledImageFilterMinmaxEXT = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT, + eMidpointChromaSamplesKHR = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR, + eSampledImageYcbcrConversionLinearFilterKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR, + eSampledImageYcbcrConversionSeparateReconstructionFilterKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR, + eSampledImageYcbcrConversionChromaReconstructionExplicitKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR, + eSampledImageYcbcrConversionChromaReconstructionExplicitForceableKHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR, + eDisjointKHR = VK_FORMAT_FEATURE_DISJOINT_BIT_KHR, + eCositedChromaSamplesKHR = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR }; using FormatFeatureFlags = Flags; @@ -14997,7 +16006,7 @@ namespace vk { enum { - allFlags = VkFlags(FormatFeatureFlagBits::eSampledImage) | VkFlags(FormatFeatureFlagBits::eStorageImage) | VkFlags(FormatFeatureFlagBits::eStorageImageAtomic) | VkFlags(FormatFeatureFlagBits::eUniformTexelBuffer) | VkFlags(FormatFeatureFlagBits::eStorageTexelBuffer) | VkFlags(FormatFeatureFlagBits::eStorageTexelBufferAtomic) | VkFlags(FormatFeatureFlagBits::eVertexBuffer) | VkFlags(FormatFeatureFlagBits::eColorAttachment) | VkFlags(FormatFeatureFlagBits::eColorAttachmentBlend) | VkFlags(FormatFeatureFlagBits::eDepthStencilAttachment) | VkFlags(FormatFeatureFlagBits::eBlitSrc) | VkFlags(FormatFeatureFlagBits::eBlitDst) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterLinear) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterCubicIMG) | VkFlags(FormatFeatureFlagBits::eTransferSrcKHR) | VkFlags(FormatFeatureFlagBits::eTransferDstKHR) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterMinmaxEXT) + allFlags = VkFlags(FormatFeatureFlagBits::eSampledImage) | VkFlags(FormatFeatureFlagBits::eStorageImage) | VkFlags(FormatFeatureFlagBits::eStorageImageAtomic) | VkFlags(FormatFeatureFlagBits::eUniformTexelBuffer) | VkFlags(FormatFeatureFlagBits::eStorageTexelBuffer) | VkFlags(FormatFeatureFlagBits::eStorageTexelBufferAtomic) | VkFlags(FormatFeatureFlagBits::eVertexBuffer) | VkFlags(FormatFeatureFlagBits::eColorAttachment) | VkFlags(FormatFeatureFlagBits::eColorAttachmentBlend) | VkFlags(FormatFeatureFlagBits::eDepthStencilAttachment) | VkFlags(FormatFeatureFlagBits::eBlitSrc) | VkFlags(FormatFeatureFlagBits::eBlitDst) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterLinear) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterCubicIMG) | VkFlags(FormatFeatureFlagBits::eTransferSrcKHR) | VkFlags(FormatFeatureFlagBits::eTransferDstKHR) | VkFlags(FormatFeatureFlagBits::eSampledImageFilterMinmaxEXT) | VkFlags(FormatFeatureFlagBits::eMidpointChromaSamplesKHR) | VkFlags(FormatFeatureFlagBits::eSampledImageYcbcrConversionLinearFilterKHR) | VkFlags(FormatFeatureFlagBits::eSampledImageYcbcrConversionSeparateReconstructionFilterKHR) | VkFlags(FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitKHR) | VkFlags(FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitForceableKHR) | VkFlags(FormatFeatureFlagBits::eDisjointKHR) | VkFlags(FormatFeatureFlagBits::eCositedChromaSamplesKHR) }; }; @@ -15046,10 +16055,10 @@ namespace vk } 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!" ); @@ -15172,9 +16181,7 @@ namespace vk 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_ ) @@ -15258,10 +16265,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eCommandBufferInheritanceInfo; public: - const void* pNext; + const void* pNext = nullptr; RenderPass renderPass; uint32_t subpass; Framebuffer framebuffer; @@ -15274,9 +16281,7 @@ namespace vk struct CommandBufferBeginInfo { CommandBufferBeginInfo( CommandBufferUsageFlags flags_ = CommandBufferUsageFlags(), const CommandBufferInheritanceInfo* pInheritanceInfo_ = nullptr ) - : sType( StructureType::eCommandBufferBeginInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , pInheritanceInfo( pInheritanceInfo_ ) { } @@ -15328,10 +16333,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eCommandBufferBeginInfo; public: - const void* pNext; + const void* pNext = nullptr; CommandBufferUsageFlags flags; const CommandBufferInheritanceInfo* pInheritanceInfo; }; @@ -15340,9 +16345,7 @@ namespace vk 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_ ) @@ -15410,10 +16413,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eQueryPoolCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; QueryPoolCreateFlags flags; QueryType queryType; uint32_t queryCount; @@ -15426,7 +16429,10 @@ namespace vk eColor = VK_IMAGE_ASPECT_COLOR_BIT, eDepth = VK_IMAGE_ASPECT_DEPTH_BIT, eStencil = VK_IMAGE_ASPECT_STENCIL_BIT, - eMetadata = VK_IMAGE_ASPECT_METADATA_BIT + eMetadata = VK_IMAGE_ASPECT_METADATA_BIT, + ePlane0KHR = VK_IMAGE_ASPECT_PLANE_0_BIT_KHR, + ePlane1KHR = VK_IMAGE_ASPECT_PLANE_1_BIT_KHR, + ePlane2KHR = VK_IMAGE_ASPECT_PLANE_2_BIT_KHR }; using ImageAspectFlags = Flags; @@ -15445,7 +16451,7 @@ namespace vk { enum { - allFlags = VkFlags(ImageAspectFlagBits::eColor) | VkFlags(ImageAspectFlagBits::eDepth) | VkFlags(ImageAspectFlagBits::eStencil) | VkFlags(ImageAspectFlagBits::eMetadata) + allFlags = VkFlags(ImageAspectFlagBits::eColor) | VkFlags(ImageAspectFlagBits::eDepth) | VkFlags(ImageAspectFlagBits::eStencil) | VkFlags(ImageAspectFlagBits::eMetadata) | VkFlags(ImageAspectFlagBits::ePlane0KHR) | VkFlags(ImageAspectFlagBits::ePlane1KHR) | VkFlags(ImageAspectFlagBits::ePlane2KHR) }; }; @@ -15659,9 +16665,7 @@ namespace vk 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_ ) @@ -15761,10 +16765,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eImageMemoryBarrier; public: - const void* pNext; + const void* pNext = nullptr; AccessFlags srcAccessMask; AccessFlags dstAccessMask; ImageLayout oldLayout; @@ -15779,9 +16783,7 @@ namespace vk 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_ ) @@ -15865,10 +16867,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eImageViewCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; ImageViewCreateFlags flags; Image image; ImageViewType viewType; @@ -16238,6 +17240,240 @@ namespace vk }; static_assert( sizeof( ClearAttachment ) == sizeof( VkClearAttachment ), "struct and wrapper have different size!" ); + struct InputAttachmentAspectReferenceKHR + { + InputAttachmentAspectReferenceKHR( uint32_t subpass_ = 0, uint32_t inputAttachmentIndex_ = 0, ImageAspectFlags aspectMask_ = ImageAspectFlags() ) + : subpass( subpass_ ) + , inputAttachmentIndex( inputAttachmentIndex_ ) + , aspectMask( aspectMask_ ) + { + } + + InputAttachmentAspectReferenceKHR( VkInputAttachmentAspectReferenceKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( InputAttachmentAspectReferenceKHR ) ); + } + + InputAttachmentAspectReferenceKHR& operator=( VkInputAttachmentAspectReferenceKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( InputAttachmentAspectReferenceKHR ) ); + return *this; + } + InputAttachmentAspectReferenceKHR& setSubpass( uint32_t subpass_ ) + { + subpass = subpass_; + return *this; + } + + InputAttachmentAspectReferenceKHR& setInputAttachmentIndex( uint32_t inputAttachmentIndex_ ) + { + inputAttachmentIndex = inputAttachmentIndex_; + return *this; + } + + InputAttachmentAspectReferenceKHR& setAspectMask( ImageAspectFlags aspectMask_ ) + { + aspectMask = aspectMask_; + return *this; + } + + operator const VkInputAttachmentAspectReferenceKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( InputAttachmentAspectReferenceKHR const& rhs ) const + { + return ( subpass == rhs.subpass ) + && ( inputAttachmentIndex == rhs.inputAttachmentIndex ) + && ( aspectMask == rhs.aspectMask ); + } + + bool operator!=( InputAttachmentAspectReferenceKHR const& rhs ) const + { + return !operator==( rhs ); + } + + uint32_t subpass; + uint32_t inputAttachmentIndex; + ImageAspectFlags aspectMask; + }; + static_assert( sizeof( InputAttachmentAspectReferenceKHR ) == sizeof( VkInputAttachmentAspectReferenceKHR ), "struct and wrapper have different size!" ); + + struct RenderPassInputAttachmentAspectCreateInfoKHR + { + RenderPassInputAttachmentAspectCreateInfoKHR( uint32_t aspectReferenceCount_ = 0, const InputAttachmentAspectReferenceKHR* pAspectReferences_ = nullptr ) + : aspectReferenceCount( aspectReferenceCount_ ) + , pAspectReferences( pAspectReferences_ ) + { + } + + RenderPassInputAttachmentAspectCreateInfoKHR( VkRenderPassInputAttachmentAspectCreateInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( RenderPassInputAttachmentAspectCreateInfoKHR ) ); + } + + RenderPassInputAttachmentAspectCreateInfoKHR& operator=( VkRenderPassInputAttachmentAspectCreateInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( RenderPassInputAttachmentAspectCreateInfoKHR ) ); + return *this; + } + RenderPassInputAttachmentAspectCreateInfoKHR& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + RenderPassInputAttachmentAspectCreateInfoKHR& setAspectReferenceCount( uint32_t aspectReferenceCount_ ) + { + aspectReferenceCount = aspectReferenceCount_; + return *this; + } + + RenderPassInputAttachmentAspectCreateInfoKHR& setPAspectReferences( const InputAttachmentAspectReferenceKHR* pAspectReferences_ ) + { + pAspectReferences = pAspectReferences_; + return *this; + } + + operator const VkRenderPassInputAttachmentAspectCreateInfoKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( RenderPassInputAttachmentAspectCreateInfoKHR const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( aspectReferenceCount == rhs.aspectReferenceCount ) + && ( pAspectReferences == rhs.pAspectReferences ); + } + + bool operator!=( RenderPassInputAttachmentAspectCreateInfoKHR const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eRenderPassInputAttachmentAspectCreateInfoKHR; + + public: + const void* pNext = nullptr; + uint32_t aspectReferenceCount; + const InputAttachmentAspectReferenceKHR* pAspectReferences; + }; + static_assert( sizeof( RenderPassInputAttachmentAspectCreateInfoKHR ) == sizeof( VkRenderPassInputAttachmentAspectCreateInfoKHR ), "struct and wrapper have different size!" ); + + struct BindImagePlaneMemoryInfoKHR + { + BindImagePlaneMemoryInfoKHR( ImageAspectFlagBits planeAspect_ = ImageAspectFlagBits::eColor ) + : planeAspect( planeAspect_ ) + { + } + + BindImagePlaneMemoryInfoKHR( VkBindImagePlaneMemoryInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( BindImagePlaneMemoryInfoKHR ) ); + } + + BindImagePlaneMemoryInfoKHR& operator=( VkBindImagePlaneMemoryInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( BindImagePlaneMemoryInfoKHR ) ); + return *this; + } + BindImagePlaneMemoryInfoKHR& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + BindImagePlaneMemoryInfoKHR& setPlaneAspect( ImageAspectFlagBits planeAspect_ ) + { + planeAspect = planeAspect_; + return *this; + } + + operator const VkBindImagePlaneMemoryInfoKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( BindImagePlaneMemoryInfoKHR const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( planeAspect == rhs.planeAspect ); + } + + bool operator!=( BindImagePlaneMemoryInfoKHR const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eBindImagePlaneMemoryInfoKHR; + + public: + const void* pNext = nullptr; + ImageAspectFlagBits planeAspect; + }; + static_assert( sizeof( BindImagePlaneMemoryInfoKHR ) == sizeof( VkBindImagePlaneMemoryInfoKHR ), "struct and wrapper have different size!" ); + + struct ImagePlaneMemoryRequirementsInfoKHR + { + ImagePlaneMemoryRequirementsInfoKHR( ImageAspectFlagBits planeAspect_ = ImageAspectFlagBits::eColor ) + : planeAspect( planeAspect_ ) + { + } + + ImagePlaneMemoryRequirementsInfoKHR( VkImagePlaneMemoryRequirementsInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( ImagePlaneMemoryRequirementsInfoKHR ) ); + } + + ImagePlaneMemoryRequirementsInfoKHR& operator=( VkImagePlaneMemoryRequirementsInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( ImagePlaneMemoryRequirementsInfoKHR ) ); + return *this; + } + ImagePlaneMemoryRequirementsInfoKHR& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + ImagePlaneMemoryRequirementsInfoKHR& setPlaneAspect( ImageAspectFlagBits planeAspect_ ) + { + planeAspect = planeAspect_; + return *this; + } + + operator const VkImagePlaneMemoryRequirementsInfoKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( ImagePlaneMemoryRequirementsInfoKHR const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( planeAspect == rhs.planeAspect ); + } + + bool operator!=( ImagePlaneMemoryRequirementsInfoKHR const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eImagePlaneMemoryRequirementsInfoKHR; + + public: + const void* pNext = nullptr; + ImageAspectFlagBits planeAspect; + }; + static_assert( sizeof( ImagePlaneMemoryRequirementsInfoKHR ) == sizeof( VkImagePlaneMemoryRequirementsInfoKHR ), "struct and wrapper have different size!" ); + enum class SparseImageFormatFlagBits { eSingleMiptail = VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, @@ -16339,10 +17575,10 @@ namespace vk } 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!" ); @@ -16367,10 +17603,10 @@ namespace vk } 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!" ); @@ -16748,9 +17984,7 @@ namespace vk 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_ ) @@ -16866,10 +18100,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eBindSparseInfo; public: - const void* pNext; + const void* pNext = nullptr; uint32_t waitSemaphoreCount; const Semaphore* pWaitSemaphores; uint32_t bufferBindCount; @@ -16954,9 +18188,7 @@ namespace vk struct CommandPoolCreateInfo { CommandPoolCreateInfo( CommandPoolCreateFlags flags_ = CommandPoolCreateFlags(), uint32_t queueFamilyIndex_ = 0 ) - : sType( StructureType::eCommandPoolCreateInfo ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , queueFamilyIndex( queueFamilyIndex_ ) { } @@ -17008,10 +18240,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eCommandPoolCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; CommandPoolCreateFlags flags; uint32_t queueFamilyIndex; }; @@ -17130,9 +18362,7 @@ namespace vk 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_ ) @@ -17272,10 +18502,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eImageCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; ImageCreateFlags flags; ImageType imageType; Format format; @@ -17295,9 +18525,7 @@ namespace vk 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_ ) @@ -17389,10 +18617,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineMultisampleStateCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineMultisampleStateCreateFlags flags; SampleCountFlagBits rasterizationSamples; Bool32 sampleShadingEnable; @@ -17406,9 +18634,7 @@ namespace vk 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_ ) @@ -17580,10 +18806,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eGraphicsPipelineCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; PipelineCreateFlags flags; uint32_t stageCount; const PipelineShaderStageCreateInfo* pStages; @@ -17892,10 +19118,10 @@ namespace vk } 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!" ); @@ -17920,10 +19146,10 @@ namespace vk } 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!" ); @@ -17931,9 +19157,7 @@ namespace vk 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_ ) @@ -18009,10 +19233,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceSparseImageFormatInfo2KHR; public: - const void* pNext; + const void* pNext = nullptr; Format format; ImageType type; SampleCountFlagBits samples; @@ -18021,6 +19245,372 @@ namespace vk }; static_assert( sizeof( PhysicalDeviceSparseImageFormatInfo2KHR ) == sizeof( VkPhysicalDeviceSparseImageFormatInfo2KHR ), "struct and wrapper have different size!" ); + struct SampleLocationsInfoEXT + { + SampleLocationsInfoEXT( SampleCountFlagBits sampleLocationsPerPixel_ = SampleCountFlagBits::e1, Extent2D sampleLocationGridSize_ = Extent2D(), uint32_t sampleLocationsCount_ = 0, const SampleLocationEXT* pSampleLocations_ = nullptr ) + : sampleLocationsPerPixel( sampleLocationsPerPixel_ ) + , sampleLocationGridSize( sampleLocationGridSize_ ) + , sampleLocationsCount( sampleLocationsCount_ ) + , pSampleLocations( pSampleLocations_ ) + { + } + + SampleLocationsInfoEXT( VkSampleLocationsInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( SampleLocationsInfoEXT ) ); + } + + SampleLocationsInfoEXT& operator=( VkSampleLocationsInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( SampleLocationsInfoEXT ) ); + return *this; + } + SampleLocationsInfoEXT& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + SampleLocationsInfoEXT& setSampleLocationsPerPixel( SampleCountFlagBits sampleLocationsPerPixel_ ) + { + sampleLocationsPerPixel = sampleLocationsPerPixel_; + return *this; + } + + SampleLocationsInfoEXT& setSampleLocationGridSize( Extent2D sampleLocationGridSize_ ) + { + sampleLocationGridSize = sampleLocationGridSize_; + return *this; + } + + SampleLocationsInfoEXT& setSampleLocationsCount( uint32_t sampleLocationsCount_ ) + { + sampleLocationsCount = sampleLocationsCount_; + return *this; + } + + SampleLocationsInfoEXT& setPSampleLocations( const SampleLocationEXT* pSampleLocations_ ) + { + pSampleLocations = pSampleLocations_; + return *this; + } + + operator const VkSampleLocationsInfoEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( SampleLocationsInfoEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( sampleLocationsPerPixel == rhs.sampleLocationsPerPixel ) + && ( sampleLocationGridSize == rhs.sampleLocationGridSize ) + && ( sampleLocationsCount == rhs.sampleLocationsCount ) + && ( pSampleLocations == rhs.pSampleLocations ); + } + + bool operator!=( SampleLocationsInfoEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eSampleLocationsInfoEXT; + + public: + const void* pNext = nullptr; + SampleCountFlagBits sampleLocationsPerPixel; + Extent2D sampleLocationGridSize; + uint32_t sampleLocationsCount; + const SampleLocationEXT* pSampleLocations; + }; + static_assert( sizeof( SampleLocationsInfoEXT ) == sizeof( VkSampleLocationsInfoEXT ), "struct and wrapper have different size!" ); + + struct AttachmentSampleLocationsEXT + { + AttachmentSampleLocationsEXT( uint32_t attachmentIndex_ = 0, SampleLocationsInfoEXT sampleLocationsInfo_ = SampleLocationsInfoEXT() ) + : attachmentIndex( attachmentIndex_ ) + , sampleLocationsInfo( sampleLocationsInfo_ ) + { + } + + AttachmentSampleLocationsEXT( VkAttachmentSampleLocationsEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( AttachmentSampleLocationsEXT ) ); + } + + AttachmentSampleLocationsEXT& operator=( VkAttachmentSampleLocationsEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( AttachmentSampleLocationsEXT ) ); + return *this; + } + AttachmentSampleLocationsEXT& setAttachmentIndex( uint32_t attachmentIndex_ ) + { + attachmentIndex = attachmentIndex_; + return *this; + } + + AttachmentSampleLocationsEXT& setSampleLocationsInfo( SampleLocationsInfoEXT sampleLocationsInfo_ ) + { + sampleLocationsInfo = sampleLocationsInfo_; + return *this; + } + + operator const VkAttachmentSampleLocationsEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( AttachmentSampleLocationsEXT const& rhs ) const + { + return ( attachmentIndex == rhs.attachmentIndex ) + && ( sampleLocationsInfo == rhs.sampleLocationsInfo ); + } + + bool operator!=( AttachmentSampleLocationsEXT const& rhs ) const + { + return !operator==( rhs ); + } + + uint32_t attachmentIndex; + SampleLocationsInfoEXT sampleLocationsInfo; + }; + static_assert( sizeof( AttachmentSampleLocationsEXT ) == sizeof( VkAttachmentSampleLocationsEXT ), "struct and wrapper have different size!" ); + + struct SubpassSampleLocationsEXT + { + SubpassSampleLocationsEXT( uint32_t subpassIndex_ = 0, SampleLocationsInfoEXT sampleLocationsInfo_ = SampleLocationsInfoEXT() ) + : subpassIndex( subpassIndex_ ) + , sampleLocationsInfo( sampleLocationsInfo_ ) + { + } + + SubpassSampleLocationsEXT( VkSubpassSampleLocationsEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( SubpassSampleLocationsEXT ) ); + } + + SubpassSampleLocationsEXT& operator=( VkSubpassSampleLocationsEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( SubpassSampleLocationsEXT ) ); + return *this; + } + SubpassSampleLocationsEXT& setSubpassIndex( uint32_t subpassIndex_ ) + { + subpassIndex = subpassIndex_; + return *this; + } + + SubpassSampleLocationsEXT& setSampleLocationsInfo( SampleLocationsInfoEXT sampleLocationsInfo_ ) + { + sampleLocationsInfo = sampleLocationsInfo_; + return *this; + } + + operator const VkSubpassSampleLocationsEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( SubpassSampleLocationsEXT const& rhs ) const + { + return ( subpassIndex == rhs.subpassIndex ) + && ( sampleLocationsInfo == rhs.sampleLocationsInfo ); + } + + bool operator!=( SubpassSampleLocationsEXT const& rhs ) const + { + return !operator==( rhs ); + } + + uint32_t subpassIndex; + SampleLocationsInfoEXT sampleLocationsInfo; + }; + static_assert( sizeof( SubpassSampleLocationsEXT ) == sizeof( VkSubpassSampleLocationsEXT ), "struct and wrapper have different size!" ); + + struct RenderPassSampleLocationsBeginInfoEXT + { + RenderPassSampleLocationsBeginInfoEXT( uint32_t attachmentInitialSampleLocationsCount_ = 0, const AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations_ = nullptr, uint32_t postSubpassSampleLocationsCount_ = 0, const SubpassSampleLocationsEXT* pPostSubpassSampleLocations_ = nullptr ) + : attachmentInitialSampleLocationsCount( attachmentInitialSampleLocationsCount_ ) + , pAttachmentInitialSampleLocations( pAttachmentInitialSampleLocations_ ) + , postSubpassSampleLocationsCount( postSubpassSampleLocationsCount_ ) + , pPostSubpassSampleLocations( pPostSubpassSampleLocations_ ) + { + } + + RenderPassSampleLocationsBeginInfoEXT( VkRenderPassSampleLocationsBeginInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( RenderPassSampleLocationsBeginInfoEXT ) ); + } + + RenderPassSampleLocationsBeginInfoEXT& operator=( VkRenderPassSampleLocationsBeginInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( RenderPassSampleLocationsBeginInfoEXT ) ); + return *this; + } + RenderPassSampleLocationsBeginInfoEXT& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + RenderPassSampleLocationsBeginInfoEXT& setAttachmentInitialSampleLocationsCount( uint32_t attachmentInitialSampleLocationsCount_ ) + { + attachmentInitialSampleLocationsCount = attachmentInitialSampleLocationsCount_; + return *this; + } + + RenderPassSampleLocationsBeginInfoEXT& setPAttachmentInitialSampleLocations( const AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations_ ) + { + pAttachmentInitialSampleLocations = pAttachmentInitialSampleLocations_; + return *this; + } + + RenderPassSampleLocationsBeginInfoEXT& setPostSubpassSampleLocationsCount( uint32_t postSubpassSampleLocationsCount_ ) + { + postSubpassSampleLocationsCount = postSubpassSampleLocationsCount_; + return *this; + } + + RenderPassSampleLocationsBeginInfoEXT& setPPostSubpassSampleLocations( const SubpassSampleLocationsEXT* pPostSubpassSampleLocations_ ) + { + pPostSubpassSampleLocations = pPostSubpassSampleLocations_; + return *this; + } + + operator const VkRenderPassSampleLocationsBeginInfoEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( RenderPassSampleLocationsBeginInfoEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( attachmentInitialSampleLocationsCount == rhs.attachmentInitialSampleLocationsCount ) + && ( pAttachmentInitialSampleLocations == rhs.pAttachmentInitialSampleLocations ) + && ( postSubpassSampleLocationsCount == rhs.postSubpassSampleLocationsCount ) + && ( pPostSubpassSampleLocations == rhs.pPostSubpassSampleLocations ); + } + + bool operator!=( RenderPassSampleLocationsBeginInfoEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eRenderPassSampleLocationsBeginInfoEXT; + + public: + const void* pNext = nullptr; + uint32_t attachmentInitialSampleLocationsCount; + const AttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations; + uint32_t postSubpassSampleLocationsCount; + const SubpassSampleLocationsEXT* pPostSubpassSampleLocations; + }; + static_assert( sizeof( RenderPassSampleLocationsBeginInfoEXT ) == sizeof( VkRenderPassSampleLocationsBeginInfoEXT ), "struct and wrapper have different size!" ); + + struct PipelineSampleLocationsStateCreateInfoEXT + { + PipelineSampleLocationsStateCreateInfoEXT( Bool32 sampleLocationsEnable_ = 0, SampleLocationsInfoEXT sampleLocationsInfo_ = SampleLocationsInfoEXT() ) + : sampleLocationsEnable( sampleLocationsEnable_ ) + , sampleLocationsInfo( sampleLocationsInfo_ ) + { + } + + PipelineSampleLocationsStateCreateInfoEXT( VkPipelineSampleLocationsStateCreateInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( PipelineSampleLocationsStateCreateInfoEXT ) ); + } + + PipelineSampleLocationsStateCreateInfoEXT& operator=( VkPipelineSampleLocationsStateCreateInfoEXT const & rhs ) + { + memcpy( this, &rhs, sizeof( PipelineSampleLocationsStateCreateInfoEXT ) ); + return *this; + } + PipelineSampleLocationsStateCreateInfoEXT& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + PipelineSampleLocationsStateCreateInfoEXT& setSampleLocationsEnable( Bool32 sampleLocationsEnable_ ) + { + sampleLocationsEnable = sampleLocationsEnable_; + return *this; + } + + PipelineSampleLocationsStateCreateInfoEXT& setSampleLocationsInfo( SampleLocationsInfoEXT sampleLocationsInfo_ ) + { + sampleLocationsInfo = sampleLocationsInfo_; + return *this; + } + + operator const VkPipelineSampleLocationsStateCreateInfoEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( PipelineSampleLocationsStateCreateInfoEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( sampleLocationsEnable == rhs.sampleLocationsEnable ) + && ( sampleLocationsInfo == rhs.sampleLocationsInfo ); + } + + bool operator!=( PipelineSampleLocationsStateCreateInfoEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::ePipelineSampleLocationsStateCreateInfoEXT; + + public: + const void* pNext = nullptr; + Bool32 sampleLocationsEnable; + SampleLocationsInfoEXT sampleLocationsInfo; + }; + static_assert( sizeof( PipelineSampleLocationsStateCreateInfoEXT ) == sizeof( VkPipelineSampleLocationsStateCreateInfoEXT ), "struct and wrapper have different size!" ); + + struct PhysicalDeviceSampleLocationsPropertiesEXT + { + operator const VkPhysicalDeviceSampleLocationsPropertiesEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( PhysicalDeviceSampleLocationsPropertiesEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( sampleLocationSampleCounts == rhs.sampleLocationSampleCounts ) + && ( maxSampleLocationGridSize == rhs.maxSampleLocationGridSize ) + && ( memcmp( sampleLocationCoordinateRange, rhs.sampleLocationCoordinateRange, 2 * sizeof( float ) ) == 0 ) + && ( sampleLocationSubPixelBits == rhs.sampleLocationSubPixelBits ) + && ( variableSampleLocations == rhs.variableSampleLocations ); + } + + bool operator!=( PhysicalDeviceSampleLocationsPropertiesEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT; + + public: + void* pNext = nullptr; + SampleCountFlags sampleLocationSampleCounts; + Extent2D maxSampleLocationGridSize; + float sampleLocationCoordinateRange[2]; + uint32_t sampleLocationSubPixelBits; + Bool32 variableSampleLocations; + }; + static_assert( sizeof( PhysicalDeviceSampleLocationsPropertiesEXT ) == sizeof( VkPhysicalDeviceSampleLocationsPropertiesEXT ), "struct and wrapper have different size!" ); + enum class AttachmentDescriptionFlagBits { eMayAlias = VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT @@ -18215,9 +19805,7 @@ namespace vk 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_ ) @@ -18285,10 +19873,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDescriptorPoolCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; DescriptorPoolCreateFlags flags; uint32_t maxSets; uint32_t poolSizeCount; @@ -18444,7 +20032,8 @@ namespace vk eHdr10HlgEXT = VK_COLOR_SPACE_HDR10_HLG_EXT, eAdobergbLinearEXT = VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT, eAdobergbNonlinearEXT = VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT, - ePassThroughEXT = VK_COLOR_SPACE_PASS_THROUGH_EXT + ePassThroughEXT = VK_COLOR_SPACE_PASS_THROUGH_EXT, + eExtendedSrgbNonlinearEXT = VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT }; struct SurfaceFormatKHR @@ -18490,10 +20079,10 @@ namespace vk } 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!" ); @@ -18660,9 +20249,7 @@ namespace vk 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_ ) @@ -18762,10 +20349,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDisplaySurfaceCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; DisplaySurfaceCreateFlagsKHR flags; DisplayModeKHR displayMode; uint32_t planeIndex; @@ -18836,10 +20423,10 @@ namespace vk } 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!" ); @@ -18876,9 +20463,7 @@ namespace vk 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_ ) { @@ -18938,10 +20523,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDebugReportCallbackCreateInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; DebugReportFlagsEXT flags; PFN_vkDebugReportCallbackEXT pfnCallback; void* pUserData; @@ -18983,15 +20568,15 @@ namespace vk 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, - eDescriptorUpdateTemplateKHR = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_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 }; 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_ ) { @@ -19051,10 +20636,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDebugMarkerObjectNameInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; DebugReportObjectTypeEXT objectType; uint64_t object; const char* pObjectName; @@ -19064,9 +20649,7 @@ namespace vk 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_ ) @@ -19142,10 +20725,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDebugMarkerObjectTagInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; DebugReportObjectTypeEXT objectType; uint64_t object; uint64_t tagName; @@ -19163,9 +20746,7 @@ namespace vk struct PipelineRasterizationStateRasterizationOrderAMD { PipelineRasterizationStateRasterizationOrderAMD( RasterizationOrderAMD rasterizationOrder_ = RasterizationOrderAMD::eStrict ) - : sType( StructureType::ePipelineRasterizationStateRasterizationOrderAMD ) - , pNext( nullptr ) - , rasterizationOrder( rasterizationOrder_ ) + : rasterizationOrder( rasterizationOrder_ ) { } @@ -19209,10 +20790,10 @@ namespace vk } 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!" ); @@ -19248,9 +20829,7 @@ namespace vk struct ExternalMemoryImageCreateInfoNV { ExternalMemoryImageCreateInfoNV( ExternalMemoryHandleTypeFlagsNV handleTypes_ = ExternalMemoryHandleTypeFlagsNV() ) - : sType( StructureType::eExternalMemoryImageCreateInfoNV ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -19294,10 +20873,10 @@ namespace vk } 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!" ); @@ -19305,9 +20884,7 @@ namespace vk struct ExportMemoryAllocateInfoNV { ExportMemoryAllocateInfoNV( ExternalMemoryHandleTypeFlagsNV handleTypes_ = ExternalMemoryHandleTypeFlagsNV() ) - : sType( StructureType::eExportMemoryAllocateInfoNV ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -19351,10 +20928,10 @@ namespace vk } 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!" ); @@ -19363,9 +20940,7 @@ namespace vk struct ImportMemoryWin32HandleInfoNV { ImportMemoryWin32HandleInfoNV( ExternalMemoryHandleTypeFlagsNV handleType_ = ExternalMemoryHandleTypeFlagsNV(), HANDLE handle_ = 0 ) - : sType( StructureType::eImportMemoryWin32HandleInfoNV ) - , pNext( nullptr ) - , handleType( handleType_ ) + : handleType( handleType_ ) , handle( handle_ ) { } @@ -19417,10 +20992,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eImportMemoryWin32HandleInfoNV; public: - const void* pNext; + const void* pNext = nullptr; ExternalMemoryHandleTypeFlagsNV handleType; HANDLE handle; }; @@ -19490,9 +21065,7 @@ namespace vk struct ValidationFlagsEXT { ValidationFlagsEXT( uint32_t disabledValidationCheckCount_ = 0, ValidationCheckEXT* pDisabledValidationChecks_ = nullptr ) - : sType( StructureType::eValidationFlagsEXT ) - , pNext( nullptr ) - , disabledValidationCheckCount( disabledValidationCheckCount_ ) + : disabledValidationCheckCount( disabledValidationCheckCount_ ) , pDisabledValidationChecks( pDisabledValidationChecks_ ) { } @@ -19544,10 +21117,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eValidationFlagsEXT; public: - const void* pNext; + const void* pNext = nullptr; uint32_t disabledValidationCheckCount; ValidationCheckEXT* pDisabledValidationChecks; }; @@ -19751,9 +21324,7 @@ namespace vk 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_ ) @@ -19821,10 +21392,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eIndirectCommandsLayoutCreateInfoNVX; public: - const void* pNext; + const void* pNext = nullptr; PipelineBindPoint pipelineBindPoint; IndirectCommandsLayoutUsageFlagsNVX flags; uint32_t tokenCount; @@ -19844,9 +21415,7 @@ namespace vk 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_ ) @@ -19954,10 +21523,10 @@ namespace vk } 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; @@ -20376,9 +21945,7 @@ namespace vk 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_ ) { @@ -20438,10 +22005,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDescriptorSetLayoutCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; DescriptorSetLayoutCreateFlags flags; uint32_t bindingCount; const DescriptorSetLayoutBinding* pBindings; @@ -20456,7 +22023,10 @@ namespace vk 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; @@ -20475,16 +22045,14 @@ namespace vk { 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_ ) { } @@ -20528,10 +22096,10 @@ namespace vk } 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!" ); @@ -20539,9 +22107,7 @@ namespace vk 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_ ) { @@ -20601,10 +22167,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePhysicalDeviceExternalBufferInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; BufferCreateFlags flags; BufferUsageFlags usage; ExternalMemoryHandleTypeFlagBitsKHR handleType; @@ -20614,9 +22180,7 @@ namespace vk struct ExternalMemoryImageCreateInfoKHR { ExternalMemoryImageCreateInfoKHR( ExternalMemoryHandleTypeFlagsKHR handleTypes_ = ExternalMemoryHandleTypeFlagsKHR() ) - : sType( StructureType::eExternalMemoryImageCreateInfoKHR ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -20660,10 +22224,10 @@ namespace vk } 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!" ); @@ -20671,9 +22235,7 @@ namespace vk struct ExternalMemoryBufferCreateInfoKHR { ExternalMemoryBufferCreateInfoKHR( ExternalMemoryHandleTypeFlagsKHR handleTypes_ = ExternalMemoryHandleTypeFlagsKHR() ) - : sType( StructureType::eExternalMemoryBufferCreateInfoKHR ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -20717,10 +22279,10 @@ namespace vk } 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!" ); @@ -20728,9 +22290,7 @@ namespace vk struct ExportMemoryAllocateInfoKHR { ExportMemoryAllocateInfoKHR( ExternalMemoryHandleTypeFlagsKHR handleTypes_ = ExternalMemoryHandleTypeFlagsKHR() ) - : sType( StructureType::eExportMemoryAllocateInfoKHR ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -20774,10 +22334,10 @@ namespace vk } 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!" ); @@ -20786,9 +22346,7 @@ namespace vk 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_ ) { @@ -20848,10 +22406,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eImportMemoryWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ExternalMemoryHandleTypeFlagBitsKHR handleType; HANDLE handle; LPCWSTR name; @@ -20863,9 +22421,7 @@ namespace vk struct MemoryGetWin32HandleInfoKHR { MemoryGetWin32HandleInfoKHR( DeviceMemory memory_ = DeviceMemory(), ExternalMemoryHandleTypeFlagBitsKHR handleType_ = ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::eMemoryGetWin32HandleInfoKHR ) - , pNext( nullptr ) - , memory( memory_ ) + : memory( memory_ ) , handleType( handleType_ ) { } @@ -20917,10 +22473,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eMemoryGetWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; DeviceMemory memory; ExternalMemoryHandleTypeFlagBitsKHR handleType; }; @@ -20930,9 +22486,7 @@ namespace vk struct ImportMemoryFdInfoKHR { ImportMemoryFdInfoKHR( ExternalMemoryHandleTypeFlagBitsKHR handleType_ = ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueFd, int fd_ = 0 ) - : sType( StructureType::eImportMemoryFdInfoKHR ) - , pNext( nullptr ) - , handleType( handleType_ ) + : handleType( handleType_ ) , fd( fd_ ) { } @@ -20984,10 +22538,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eImportMemoryFdInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; ExternalMemoryHandleTypeFlagBitsKHR handleType; int fd; }; @@ -20996,9 +22550,7 @@ namespace vk struct MemoryGetFdInfoKHR { MemoryGetFdInfoKHR( DeviceMemory memory_ = DeviceMemory(), ExternalMemoryHandleTypeFlagBitsKHR handleType_ = ExternalMemoryHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::eMemoryGetFdInfoKHR ) - , pNext( nullptr ) - , memory( memory_ ) + : memory( memory_ ) , handleType( handleType_ ) { } @@ -21050,15 +22602,79 @@ namespace vk } 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, @@ -21131,10 +22747,10 @@ namespace vk } 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!" ); @@ -21159,10 +22775,10 @@ namespace vk } 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!" ); @@ -21199,9 +22815,7 @@ namespace vk struct PhysicalDeviceExternalSemaphoreInfoKHR { PhysicalDeviceExternalSemaphoreInfoKHR( ExternalSemaphoreHandleTypeFlagBitsKHR handleType_ = ExternalSemaphoreHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::ePhysicalDeviceExternalSemaphoreInfoKHR ) - , pNext( nullptr ) - , handleType( handleType_ ) + : handleType( handleType_ ) { } @@ -21245,10 +22859,10 @@ namespace vk } 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!" ); @@ -21256,9 +22870,7 @@ namespace vk struct ExportSemaphoreCreateInfoKHR { ExportSemaphoreCreateInfoKHR( ExternalSemaphoreHandleTypeFlagsKHR handleTypes_ = ExternalSemaphoreHandleTypeFlagsKHR() ) - : sType( StructureType::eExportSemaphoreCreateInfoKHR ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -21302,10 +22914,10 @@ namespace vk } 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!" ); @@ -21314,9 +22926,7 @@ namespace vk struct SemaphoreGetWin32HandleInfoKHR { SemaphoreGetWin32HandleInfoKHR( Semaphore semaphore_ = Semaphore(), ExternalSemaphoreHandleTypeFlagBitsKHR handleType_ = ExternalSemaphoreHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::eSemaphoreGetWin32HandleInfoKHR ) - , pNext( nullptr ) - , semaphore( semaphore_ ) + : semaphore( semaphore_ ) , handleType( handleType_ ) { } @@ -21368,10 +22978,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eSemaphoreGetWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Semaphore semaphore; ExternalSemaphoreHandleTypeFlagBitsKHR handleType; }; @@ -21381,9 +22991,7 @@ namespace vk struct SemaphoreGetFdInfoKHR { SemaphoreGetFdInfoKHR( Semaphore semaphore_ = Semaphore(), ExternalSemaphoreHandleTypeFlagBitsKHR handleType_ = ExternalSemaphoreHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::eSemaphoreGetFdInfoKHR ) - , pNext( nullptr ) - , semaphore( semaphore_ ) + : semaphore( semaphore_ ) , handleType( handleType_ ) { } @@ -21435,10 +23043,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eSemaphoreGetFdInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Semaphore semaphore; ExternalSemaphoreHandleTypeFlagBitsKHR handleType; }; @@ -21492,10 +23100,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eExternalSemaphorePropertiesKHR; public: - void* pNext; + void* pNext = nullptr; ExternalSemaphoreHandleTypeFlagsKHR exportFromImportedHandleTypes; ExternalSemaphoreHandleTypeFlagsKHR compatibleHandleTypes; ExternalSemaphoreFeatureFlagsKHR externalSemaphoreFeatures; @@ -21531,9 +23139,7 @@ namespace vk 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_ ) @@ -21609,10 +23215,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eImportSemaphoreWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Semaphore semaphore; SemaphoreImportFlagsKHR flags; ExternalSemaphoreHandleTypeFlagBitsKHR handleType; @@ -21625,9 +23231,7 @@ namespace vk 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_ ) @@ -21695,10 +23299,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eImportSemaphoreFdInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Semaphore semaphore; SemaphoreImportFlagsKHR flags; ExternalSemaphoreHandleTypeFlagBitsKHR handleType; @@ -21737,9 +23341,7 @@ namespace vk struct PhysicalDeviceExternalFenceInfoKHR { PhysicalDeviceExternalFenceInfoKHR( ExternalFenceHandleTypeFlagBitsKHR handleType_ = ExternalFenceHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::ePhysicalDeviceExternalFenceInfoKHR ) - , pNext( nullptr ) - , handleType( handleType_ ) + : handleType( handleType_ ) { } @@ -21783,10 +23385,10 @@ namespace vk } 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!" ); @@ -21794,9 +23396,7 @@ namespace vk struct ExportFenceCreateInfoKHR { ExportFenceCreateInfoKHR( ExternalFenceHandleTypeFlagsKHR handleTypes_ = ExternalFenceHandleTypeFlagsKHR() ) - : sType( StructureType::eExportFenceCreateInfoKHR ) - , pNext( nullptr ) - , handleTypes( handleTypes_ ) + : handleTypes( handleTypes_ ) { } @@ -21840,10 +23440,10 @@ namespace vk } 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!" ); @@ -21852,9 +23452,7 @@ namespace vk struct FenceGetWin32HandleInfoKHR { FenceGetWin32HandleInfoKHR( Fence fence_ = Fence(), ExternalFenceHandleTypeFlagBitsKHR handleType_ = ExternalFenceHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::eFenceGetWin32HandleInfoKHR ) - , pNext( nullptr ) - , fence( fence_ ) + : fence( fence_ ) , handleType( handleType_ ) { } @@ -21906,10 +23504,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eFenceGetWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Fence fence; ExternalFenceHandleTypeFlagBitsKHR handleType; }; @@ -21919,9 +23517,7 @@ namespace vk struct FenceGetFdInfoKHR { FenceGetFdInfoKHR( Fence fence_ = Fence(), ExternalFenceHandleTypeFlagBitsKHR handleType_ = ExternalFenceHandleTypeFlagBitsKHR::eOpaqueFd ) - : sType( StructureType::eFenceGetFdInfoKHR ) - , pNext( nullptr ) - , fence( fence_ ) + : fence( fence_ ) , handleType( handleType_ ) { } @@ -21973,10 +23569,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eFenceGetFdInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Fence fence; ExternalFenceHandleTypeFlagBitsKHR handleType; }; @@ -22030,10 +23626,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eExternalFencePropertiesKHR; public: - void* pNext; + void* pNext = nullptr; ExternalFenceHandleTypeFlagsKHR exportFromImportedHandleTypes; ExternalFenceHandleTypeFlagsKHR compatibleHandleTypes; ExternalFenceFeatureFlagsKHR externalFenceFeatures; @@ -22069,9 +23665,7 @@ namespace vk 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_ ) @@ -22147,10 +23741,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eImportFenceWin32HandleInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Fence fence; FenceImportFlagsKHR flags; ExternalFenceHandleTypeFlagBitsKHR handleType; @@ -22163,9 +23757,7 @@ namespace vk 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_ ) @@ -22233,10 +23825,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eImportFenceFdInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; Fence fence; FenceImportFlagsKHR flags; ExternalFenceHandleTypeFlagBitsKHR handleType; @@ -22299,10 +23891,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eSurfaceCapabilities2EXT; public: - void* pNext; + void* pNext = nullptr; uint32_t minImageCount; uint32_t maxImageCount; Extent2D currentExtent; @@ -22320,9 +23912,7 @@ namespace vk struct SwapchainCounterCreateInfoEXT { SwapchainCounterCreateInfoEXT( SurfaceCounterFlagsEXT surfaceCounters_ = SurfaceCounterFlagsEXT() ) - : sType( StructureType::eSwapchainCounterCreateInfoEXT ) - , pNext( nullptr ) - , surfaceCounters( surfaceCounters_ ) + : surfaceCounters( surfaceCounters_ ) { } @@ -22366,10 +23956,10 @@ namespace vk } 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!" ); @@ -22384,9 +23974,7 @@ namespace vk struct DisplayPowerInfoEXT { DisplayPowerInfoEXT( DisplayPowerStateEXT powerState_ = DisplayPowerStateEXT::eOff ) - : sType( StructureType::eDisplayPowerInfoEXT ) - , pNext( nullptr ) - , powerState( powerState_ ) + : powerState( powerState_ ) { } @@ -22430,10 +24018,10 @@ namespace vk } 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!" ); @@ -22446,9 +24034,7 @@ namespace vk struct DeviceEventInfoEXT { DeviceEventInfoEXT( DeviceEventTypeEXT deviceEvent_ = DeviceEventTypeEXT::eDisplayHotplug ) - : sType( StructureType::eDeviceEventInfoEXT ) - , pNext( nullptr ) - , deviceEvent( deviceEvent_ ) + : deviceEvent( deviceEvent_ ) { } @@ -22492,10 +24078,10 @@ namespace vk } 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!" ); @@ -22508,9 +24094,7 @@ namespace vk struct DisplayEventInfoEXT { DisplayEventInfoEXT( DisplayEventTypeEXT displayEvent_ = DisplayEventTypeEXT::eFirstPixelOut ) - : sType( StructureType::eDisplayEventInfoEXT ) - , pNext( nullptr ) - , displayEvent( displayEvent_ ) + : displayEvent( displayEvent_ ) { } @@ -22554,10 +24138,10 @@ namespace vk } 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!" ); @@ -22618,9 +24202,7 @@ namespace vk struct MemoryAllocateFlagsInfoKHX { MemoryAllocateFlagsInfoKHX( MemoryAllocateFlagsKHX flags_ = MemoryAllocateFlagsKHX(), uint32_t deviceMask_ = 0 ) - : sType( StructureType::eMemoryAllocateFlagsInfoKHX ) - , pNext( nullptr ) - , flags( flags_ ) + : flags( flags_ ) , deviceMask( deviceMask_ ) { } @@ -22672,10 +24254,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eMemoryAllocateFlagsInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; MemoryAllocateFlagsKHX flags; uint32_t deviceMask; }; @@ -22730,10 +24312,10 @@ namespace vk } 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; }; @@ -22742,9 +24324,7 @@ namespace vk 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_ ) { @@ -22804,10 +24384,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGroupPresentInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t swapchainCount; const uint32_t* pDeviceMasks; DeviceGroupPresentModeFlagBitsKHX mode; @@ -22817,9 +24397,7 @@ namespace vk struct DeviceGroupSwapchainCreateInfoKHX { DeviceGroupSwapchainCreateInfoKHX( DeviceGroupPresentModeFlagsKHX modes_ = DeviceGroupPresentModeFlagsKHX() ) - : sType( StructureType::eDeviceGroupSwapchainCreateInfoKHX ) - , pNext( nullptr ) - , modes( modes_ ) + : modes( modes_ ) { } @@ -22863,10 +24441,10 @@ namespace vk } 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!" ); @@ -22899,9 +24477,7 @@ namespace vk 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_ ) @@ -23065,10 +24641,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eSwapchainCreateInfoKHR; public: - const void* pNext; + const void* pNext = nullptr; SwapchainCreateFlagsKHR flags; SurfaceKHR surface; uint32_t minImageCount; @@ -23172,9 +24748,7 @@ namespace vk 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_ ) { @@ -23234,10 +24808,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineViewportSwizzleStateCreateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; PipelineViewportSwizzleStateCreateFlagsNV flags; uint32_t viewportCount; const ViewportSwizzleNV* pViewportSwizzles; @@ -23253,9 +24827,7 @@ namespace vk 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_ ) @@ -23323,10 +24895,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineDiscardRectangleStateCreateInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; PipelineDiscardRectangleStateCreateFlagsEXT flags; DiscardRectangleModeEXT discardRectangleMode; uint32_t discardRectangleCount; @@ -23486,9 +25058,7 @@ namespace vk 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_ ) @@ -23580,10 +25150,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eRenderPassCreateInfo; public: - const void* pNext; + const void* pNext = nullptr; RenderPassCreateFlags flags; uint32_t attachmentCount; const AttachmentDescription* pAttachments; @@ -23594,6 +25164,40 @@ namespace vk }; static_assert( sizeof( RenderPassCreateInfo ) == sizeof( VkRenderPassCreateInfo ), "struct and wrapper have different size!" ); + enum class PointClippingBehaviorKHR + { + eAllClipPlanes = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR, + eUserClipPlanesOnly = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR + }; + + struct PhysicalDevicePointClippingPropertiesKHR + { + operator const VkPhysicalDevicePointClippingPropertiesKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( PhysicalDevicePointClippingPropertiesKHR const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( pointClippingBehavior == rhs.pointClippingBehavior ); + } + + bool operator!=( PhysicalDevicePointClippingPropertiesKHR const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::ePhysicalDevicePointClippingPropertiesKHR; + + public: + void* pNext = nullptr; + PointClippingBehaviorKHR pointClippingBehavior; + }; + static_assert( sizeof( PhysicalDevicePointClippingPropertiesKHR ) == sizeof( VkPhysicalDevicePointClippingPropertiesKHR ), "struct and wrapper have different size!" ); + enum class SamplerReductionModeEXT { eWeightedAverage = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT, @@ -23604,9 +25208,7 @@ namespace vk struct SamplerReductionModeCreateInfoEXT { SamplerReductionModeCreateInfoEXT( SamplerReductionModeEXT reductionMode_ = SamplerReductionModeEXT::eWeightedAverage ) - : sType( StructureType::eSamplerReductionModeCreateInfoEXT ) - , pNext( nullptr ) - , reductionMode( reductionMode_ ) + : reductionMode( reductionMode_ ) { } @@ -23650,14 +25252,214 @@ namespace vk } 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!" ); + enum class TessellationDomainOriginKHR + { + eUpperLeft = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR, + eLowerLeft = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR + }; + + struct PipelineTessellationDomainOriginStateCreateInfoKHR + { + PipelineTessellationDomainOriginStateCreateInfoKHR( TessellationDomainOriginKHR domainOrigin_ = TessellationDomainOriginKHR::eUpperLeft ) + : domainOrigin( domainOrigin_ ) + { + } + + PipelineTessellationDomainOriginStateCreateInfoKHR( VkPipelineTessellationDomainOriginStateCreateInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( PipelineTessellationDomainOriginStateCreateInfoKHR ) ); + } + + PipelineTessellationDomainOriginStateCreateInfoKHR& operator=( VkPipelineTessellationDomainOriginStateCreateInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( PipelineTessellationDomainOriginStateCreateInfoKHR ) ); + return *this; + } + PipelineTessellationDomainOriginStateCreateInfoKHR& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + PipelineTessellationDomainOriginStateCreateInfoKHR& setDomainOrigin( TessellationDomainOriginKHR domainOrigin_ ) + { + domainOrigin = domainOrigin_; + return *this; + } + + operator const VkPipelineTessellationDomainOriginStateCreateInfoKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( PipelineTessellationDomainOriginStateCreateInfoKHR const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( domainOrigin == rhs.domainOrigin ); + } + + bool operator!=( PipelineTessellationDomainOriginStateCreateInfoKHR const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::ePipelineTessellationDomainOriginStateCreateInfoKHR; + + public: + const void* pNext = nullptr; + TessellationDomainOriginKHR domainOrigin; + }; + static_assert( sizeof( PipelineTessellationDomainOriginStateCreateInfoKHR ) == sizeof( VkPipelineTessellationDomainOriginStateCreateInfoKHR ), "struct and wrapper have different size!" ); + + enum class SamplerYcbcrModelConversionKHR + { + eRgbIdentity = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR, + eYcbcrIdentity = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR, + eYcbcr709 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR, + eYcbcr601 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR, + eYcbcr2020 = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR + }; + + enum class SamplerYcbcrRangeKHR + { + eItuFull = VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR, + eItuNarrow = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR + }; + + enum class ChromaLocationKHR + { + eCositedEven = VK_CHROMA_LOCATION_COSITED_EVEN_KHR, + eMidpoint = VK_CHROMA_LOCATION_MIDPOINT_KHR + }; + + 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 ) + : format( format_ ) + , ycbcrModel( ycbcrModel_ ) + , ycbcrRange( ycbcrRange_ ) + , components( components_ ) + , xChromaOffset( xChromaOffset_ ) + , yChromaOffset( yChromaOffset_ ) + , chromaFilter( chromaFilter_ ) + , forceExplicitReconstruction( forceExplicitReconstruction_ ) + { + } + + SamplerYcbcrConversionCreateInfoKHR( VkSamplerYcbcrConversionCreateInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( SamplerYcbcrConversionCreateInfoKHR ) ); + } + + SamplerYcbcrConversionCreateInfoKHR& operator=( VkSamplerYcbcrConversionCreateInfoKHR const & rhs ) + { + memcpy( this, &rhs, sizeof( SamplerYcbcrConversionCreateInfoKHR ) ); + return *this; + } + SamplerYcbcrConversionCreateInfoKHR& setPNext( const void* pNext_ ) + { + pNext = pNext_; + return *this; + } + + SamplerYcbcrConversionCreateInfoKHR& setFormat( Format format_ ) + { + format = format_; + return *this; + } + + SamplerYcbcrConversionCreateInfoKHR& setYcbcrModel( SamplerYcbcrModelConversionKHR ycbcrModel_ ) + { + ycbcrModel = ycbcrModel_; + return *this; + } + + SamplerYcbcrConversionCreateInfoKHR& setYcbcrRange( SamplerYcbcrRangeKHR ycbcrRange_ ) + { + ycbcrRange = ycbcrRange_; + return *this; + } + + SamplerYcbcrConversionCreateInfoKHR& setComponents( ComponentMapping components_ ) + { + components = components_; + return *this; + } + + SamplerYcbcrConversionCreateInfoKHR& setXChromaOffset( ChromaLocationKHR xChromaOffset_ ) + { + xChromaOffset = xChromaOffset_; + return *this; + } + + SamplerYcbcrConversionCreateInfoKHR& setYChromaOffset( ChromaLocationKHR yChromaOffset_ ) + { + yChromaOffset = yChromaOffset_; + return *this; + } + + SamplerYcbcrConversionCreateInfoKHR& setChromaFilter( Filter chromaFilter_ ) + { + chromaFilter = chromaFilter_; + return *this; + } + + SamplerYcbcrConversionCreateInfoKHR& setForceExplicitReconstruction( Bool32 forceExplicitReconstruction_ ) + { + forceExplicitReconstruction = forceExplicitReconstruction_; + return *this; + } + + operator const VkSamplerYcbcrConversionCreateInfoKHR&() const + { + return *reinterpret_cast(this); + } + + bool operator==( SamplerYcbcrConversionCreateInfoKHR const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( format == rhs.format ) + && ( ycbcrModel == rhs.ycbcrModel ) + && ( ycbcrRange == rhs.ycbcrRange ) + && ( components == rhs.components ) + && ( xChromaOffset == rhs.xChromaOffset ) + && ( yChromaOffset == rhs.yChromaOffset ) + && ( chromaFilter == rhs.chromaFilter ) + && ( forceExplicitReconstruction == rhs.forceExplicitReconstruction ); + } + + bool operator!=( SamplerYcbcrConversionCreateInfoKHR const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::eSamplerYcbcrConversionCreateInfoKHR; + + public: + const void* pNext = nullptr; + Format format; + SamplerYcbcrModelConversionKHR ycbcrModel; + SamplerYcbcrRangeKHR ycbcrRange; + ComponentMapping components; + ChromaLocationKHR xChromaOffset; + ChromaLocationKHR yChromaOffset; + Filter chromaFilter; + Bool32 forceExplicitReconstruction; + }; + static_assert( sizeof( SamplerYcbcrConversionCreateInfoKHR ) == sizeof( VkSamplerYcbcrConversionCreateInfoKHR ), "struct and wrapper have different size!" ); + enum class BlendOverlapEXT { eUncorrelated = VK_BLEND_OVERLAP_UNCORRELATED_EXT, @@ -23668,9 +25470,7 @@ namespace vk 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_ ) { @@ -23730,10 +25530,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT; public: - const void* pNext; + const void* pNext = nullptr; Bool32 srcPremultiplied; Bool32 dstPremultiplied; BlendOverlapEXT blendOverlap; @@ -23751,9 +25551,7 @@ namespace vk 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_ ) @@ -23829,10 +25627,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::ePipelineCoverageModulationStateCreateInfoNV; public: - const void* pNext; + const void* pNext = nullptr; PipelineCoverageModulationStateCreateFlagsNV flags; CoverageModulationModeNV coverageModulationMode; Bool32 coverageModulationTableEnable; @@ -23841,6 +25639,161 @@ namespace vk }; 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_ ) + { + conservativeRasterizationMode = conservativeRasterizationMode_; + return *this; + } + + PipelineRasterizationConservativeStateCreateInfoEXT& setExtraPrimitiveOverestimationSize( float extraPrimitiveOverestimationSize_ ) + { + extraPrimitiveOverestimationSize = extraPrimitiveOverestimationSize_; + return *this; + } + + operator const VkPipelineRasterizationConservativeStateCreateInfoEXT&() const + { + return *reinterpret_cast(this); + } + + bool operator==( PipelineRasterizationConservativeStateCreateInfoEXT const& rhs ) const + { + return ( sType == rhs.sType ) + && ( pNext == rhs.pNext ) + && ( flags == rhs.flags ) + && ( conservativeRasterizationMode == rhs.conservativeRasterizationMode ) + && ( extraPrimitiveOverestimationSize == rhs.extraPrimitiveOverestimationSize ); + } + + bool operator!=( PipelineRasterizationConservativeStateCreateInfoEXT const& rhs ) const + { + return !operator==( rhs ); + } + + private: + StructureType sType = StructureType::ePipelineRasterizationConservativeStateCreateInfoEXT; + + public: + 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 ); #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE template > @@ -23869,7 +25822,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::enumerateInstanceLayerProperties" ); + return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::enumerateInstanceLayerProperties" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -23902,7 +25855,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::enumerateInstanceExtensionProperties" ); + return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::enumerateInstanceExtensionProperties" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -23922,7 +25875,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT CommandBuffer( VkCommandBuffer commandBuffer ) - : m_commandBuffer( commandBuffer ) + : m_commandBuffer( commandBuffer ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -24118,16 +26071,16 @@ namespace vk void executeCommands( ArrayProxy commandBuffers ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - void debugMarkerBeginEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const; + void debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DebugMarkerMarkerInfoEXT debugMarkerBeginEXT() const; + void debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT & markerInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ void debugMarkerEndEXT() const; - void debugMarkerInsertEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const; + void debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - DebugMarkerMarkerInfoEXT debugMarkerInsertEXT() const; + void debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT & markerInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ void drawIndirectCountAMD( Buffer buffer, DeviceSize offset, Buffer countBuffer, DeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride ) const; @@ -24165,6 +26118,11 @@ namespace vk void setDiscardRectangleEXT( uint32_t firstDiscardRectangle, ArrayProxy discardRectangles ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void setSampleLocationsEXT( const SampleLocationsInfoEXT* pSampleLocationsInfo ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void setSampleLocationsEXT( const SampleLocationsInfoEXT & sampleLocationsInfo ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_TYPESAFE_EXPLICIT operator VkCommandBuffer() const @@ -24196,7 +26154,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::begin( const CommandBufferBeginInfo & beginInfo ) const { Result result = static_cast( vkBeginCommandBuffer( m_commandBuffer, reinterpret_cast( &beginInfo ) ) ); - return createResultValue( result, "vk::CommandBuffer::begin" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::CommandBuffer::begin" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -24209,7 +26167,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::end() const { Result result = static_cast( vkEndCommandBuffer( m_commandBuffer ) ); - return createResultValue( result, "vk::CommandBuffer::end" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::CommandBuffer::end" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -24222,7 +26180,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type CommandBuffer::reset( CommandBufferResetFlags flags ) const { Result result = static_cast( vkResetCommandBuffer( m_commandBuffer, static_cast( flags ) ) ); - return createResultValue( result, "vk::CommandBuffer::reset" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::CommandBuffer::reset" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -24316,7 +26274,7 @@ namespace vk #else if ( buffers.size() != offsets.size() ) { - throw LogicError( "vk::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); + throw LogicError( "VULKAN_HPP_NAMESPACE::CommandBuffer::bindVertexBuffers: buffers.size() != offsets.size()" ); } #endif // VULKAN_HPP_NO_EXCEPTIONS vkCmdBindVertexBuffers( m_commandBuffer, firstBinding, buffers.size() , reinterpret_cast( buffers.data() ), offsets.data() ); @@ -24570,16 +26528,14 @@ namespace vk } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo ) const { - vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); + vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE DebugMarkerMarkerInfoEXT CommandBuffer::debugMarkerBeginEXT() const + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerBeginEXT( const DebugMarkerMarkerInfoEXT & markerInfo ) const { - DebugMarkerMarkerInfoEXT markerInfo; - vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); - return markerInfo; + vkCmdDebugMarkerBeginEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -24588,16 +26544,14 @@ namespace vk vkCmdDebugMarkerEndEXT( m_commandBuffer ); } - VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( DebugMarkerMarkerInfoEXT* pMarkerInfo ) const + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT* pMarkerInfo ) const { - vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); + vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( pMarkerInfo ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE DebugMarkerMarkerInfoEXT CommandBuffer::debugMarkerInsertEXT() const + VULKAN_HPP_INLINE void CommandBuffer::debugMarkerInsertEXT( const DebugMarkerMarkerInfoEXT & markerInfo ) const { - DebugMarkerMarkerInfoEXT markerInfo; - vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); - return markerInfo; + vkCmdDebugMarkerInsertEXT( m_commandBuffer, reinterpret_cast( &markerInfo ) ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -24681,12 +26635,21 @@ namespace vk } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const SampleLocationsInfoEXT* pSampleLocationsInfo ) const + { + vkCmdSetSampleLocationsEXT( m_commandBuffer, reinterpret_cast( pSampleLocationsInfo ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void CommandBuffer::setSampleLocationsEXT( const SampleLocationsInfoEXT & sampleLocationsInfo ) const + { + vkCmdSetSampleLocationsEXT( m_commandBuffer, reinterpret_cast( &sampleLocationsInfo ) ); + } +#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_ ) @@ -24778,10 +26741,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eSubmitInfo; public: - const void* pNext; + const void* pNext = nullptr; uint32_t waitSemaphoreCount; const Semaphore* pWaitSemaphores; const PipelineStageFlags* pWaitDstStageMask; @@ -24804,7 +26767,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT Queue( VkQueue queue ) - : m_queue( queue ) + : m_queue( queue ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -24888,7 +26851,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Queue::submit( ArrayProxy submits, Fence fence ) const { Result result = static_cast( vkQueueSubmit( m_queue, submits.size() , reinterpret_cast( submits.data() ), static_cast( fence ) ) ); - return createResultValue( result, "vk::Queue::submit" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Queue::submit" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -24901,7 +26864,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Queue::waitIdle() const { Result result = static_cast( vkQueueWaitIdle( m_queue ) ); - return createResultValue( result, "vk::Queue::waitIdle" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Queue::waitIdle" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -24913,7 +26876,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Queue::bindSparse( ArrayProxy bindInfo, Fence fence ) const { Result result = static_cast( vkQueueBindSparse( m_queue, bindInfo.size() , reinterpret_cast( bindInfo.data() ), static_cast( fence ) ) ); - return createResultValue( result, "vk::Queue::bindSparse" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Queue::bindSparse" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -24925,61 +26888,92 @@ namespace vk VULKAN_HPP_INLINE Result Queue::presentKHR( const PresentInfoKHR & presentInfo ) const { Result result = static_cast( vkQueuePresentKHR( m_queue, reinterpret_cast( &presentInfo ) ) ); - return createResultValue( result, "vk::Queue::presentKHR", { Result::eSuccess, Result::eSuboptimalKHR } ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Queue::presentKHR", { Result::eSuccess, Result::eSuboptimalKHR } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifndef VULKAN_HPP_NO_SMART_HANDLE class BufferDeleter; - using UniqueBuffer = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = BufferDeleter; }; + using UniqueBuffer = UniqueHandle; class BufferViewDeleter; - using UniqueBufferView = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = BufferViewDeleter; }; + using UniqueBufferView = UniqueHandle; class CommandBufferDeleter; - using UniqueCommandBuffer = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = CommandBufferDeleter; }; + using UniqueCommandBuffer = UniqueHandle; class CommandPoolDeleter; - using UniqueCommandPool = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = CommandPoolDeleter; }; + using UniqueCommandPool = UniqueHandle; class DescriptorPoolDeleter; - using UniqueDescriptorPool = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = DescriptorPoolDeleter; }; + using UniqueDescriptorPool = UniqueHandle; class DescriptorSetDeleter; - using UniqueDescriptorSet = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = DescriptorSetDeleter; }; + using UniqueDescriptorSet = UniqueHandle; class DescriptorSetLayoutDeleter; - using UniqueDescriptorSetLayout = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = DescriptorSetLayoutDeleter; }; + using UniqueDescriptorSetLayout = UniqueHandle; class DescriptorUpdateTemplateKHRDeleter; - using UniqueDescriptorUpdateTemplateKHR = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = DescriptorUpdateTemplateKHRDeleter; }; + using UniqueDescriptorUpdateTemplateKHR = UniqueHandle; class DeviceMemoryDeleter; - using UniqueDeviceMemory = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = DeviceMemoryDeleter; }; + using UniqueDeviceMemory = UniqueHandle; class EventDeleter; - using UniqueEvent = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = EventDeleter; }; + using UniqueEvent = UniqueHandle; class FenceDeleter; - using UniqueFence = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = FenceDeleter; }; + using UniqueFence = UniqueHandle; class FramebufferDeleter; - using UniqueFramebuffer = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = FramebufferDeleter; }; + using UniqueFramebuffer = UniqueHandle; class ImageDeleter; - using UniqueImage = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ImageDeleter; }; + using UniqueImage = UniqueHandle; class ImageViewDeleter; - using UniqueImageView = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ImageViewDeleter; }; + using UniqueImageView = UniqueHandle; class IndirectCommandsLayoutNVXDeleter; - using UniqueIndirectCommandsLayoutNVX = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = IndirectCommandsLayoutNVXDeleter; }; + using UniqueIndirectCommandsLayoutNVX = UniqueHandle; class ObjectTableNVXDeleter; - using UniqueObjectTableNVX = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ObjectTableNVXDeleter; }; + using UniqueObjectTableNVX = UniqueHandle; class PipelineDeleter; - using UniquePipeline = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = PipelineDeleter; }; + using UniquePipeline = UniqueHandle; class PipelineCacheDeleter; - using UniquePipelineCache = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = PipelineCacheDeleter; }; + using UniquePipelineCache = UniqueHandle; class PipelineLayoutDeleter; - using UniquePipelineLayout = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = PipelineLayoutDeleter; }; + using UniquePipelineLayout = UniqueHandle; class QueryPoolDeleter; - using UniqueQueryPool = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = QueryPoolDeleter; }; + using UniqueQueryPool = UniqueHandle; class RenderPassDeleter; - using UniqueRenderPass = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = RenderPassDeleter; }; + using UniqueRenderPass = UniqueHandle; class SamplerDeleter; - using UniqueSampler = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = SamplerDeleter; }; + using UniqueSampler = UniqueHandle; + class SamplerYcbcrConversionKHRDeleter; + template <> class UniqueHandleTraits {public: using deleter = SamplerYcbcrConversionKHRDeleter; }; + using UniqueSamplerYcbcrConversionKHR = UniqueHandle; class SemaphoreDeleter; - using UniqueSemaphore = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = SemaphoreDeleter; }; + using UniqueSemaphore = UniqueHandle; class ShaderModuleDeleter; - using UniqueShaderModule = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = ShaderModuleDeleter; }; + using UniqueShaderModule = UniqueHandle; class SwapchainKHRDeleter; - using UniqueSwapchainKHR = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = SwapchainKHRDeleter; }; + using UniqueSwapchainKHR = UniqueHandle; + class ValidationCacheEXTDeleter; + template <> class UniqueHandleTraits {public: using deleter = ValidationCacheEXTDeleter; }; + using UniqueValidationCacheEXT = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ class Device @@ -24994,7 +26988,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT Device( VkDevice device ) - : m_device( device ) + : m_device( device ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -25051,7 +27045,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type allocateMemory( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDeviceMemory allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const; + ResultValueType::type allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25114,7 +27108,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createFence( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueFence createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25139,7 +27133,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createSemaphore( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSemaphore createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25152,7 +27146,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createEvent( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueEvent createEventUnique( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createEventUnique( const EventCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25179,7 +27173,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createQueryPool( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueQueryPool createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25198,7 +27192,7 @@ namespace vk #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; + ResultValueType::type createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25211,7 +27205,7 @@ namespace vk #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; + ResultValueType::type createBufferViewUnique( const BufferViewCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25224,7 +27218,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createImage( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueImage createImageUnique( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createImageUnique( const ImageCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25242,7 +27236,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createImageView( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueImageView createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25255,7 +27249,7 @@ namespace vk #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; + ResultValueType::type createShaderModuleUnique( const ShaderModuleCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25268,7 +27262,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createPipelineCache( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniquePipelineCache createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createPipelineCacheUnique( const PipelineCacheCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25295,8 +27289,8 @@ namespace vk ResultValueType::type createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE template > - std::vector createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; - UniquePipeline createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; + typename ResultValueType>::type createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; + ResultValueType::type createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25307,8 +27301,8 @@ namespace vk 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 ) const; - UniquePipeline createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; + typename ResultValueType>::type createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator = nullptr ) const; + ResultValueType::type createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25321,7 +27315,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createPipelineLayout( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniquePipelineLayout createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25334,7 +27328,7 @@ namespace vk #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; + ResultValueType::type createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25347,7 +27341,7 @@ namespace vk #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; + ResultValueType::type createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25360,7 +27354,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createDescriptorPool( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDescriptorPool createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25381,7 +27375,7 @@ namespace vk typename ResultValueType>::type allocateDescriptorSets( const DescriptorSetAllocateInfo & allocateInfo ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE template > - std::vector allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const; + typename ResultValueType>::type allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25399,7 +27393,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createFramebuffer( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueFramebuffer createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25412,7 +27406,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createRenderPass( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueRenderPass createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25430,7 +27424,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createCommandPool( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueCommandPool createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25451,7 +27445,7 @@ namespace vk typename ResultValueType>::type allocateCommandBuffers( const CommandBufferAllocateInfo & allocateInfo ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE template > - std::vector allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const; + typename ResultValueType>::type allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25467,8 +27461,8 @@ namespace vk 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 ) const; - UniqueSwapchainKHR createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + typename ResultValueType>::type createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator = nullptr ) const; + ResultValueType::type createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25476,7 +27470,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSwapchainKHR createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25496,14 +27490,14 @@ namespace vk ResultValue acquireNextImageKHR( SwapchainKHR swapchain, uint64_t timeout, Semaphore semaphore, Fence fence ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result debugMarkerSetObjectNameEXT( DebugMarkerObjectNameInfoEXT* pNameInfo ) const; + Result debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT* pNameInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type debugMarkerSetObjectNameEXT() const; + ResultValueType::type debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result debugMarkerSetObjectTagEXT( DebugMarkerObjectTagInfoEXT* pTagInfo ) const; + Result debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT* pTagInfo ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type debugMarkerSetObjectTagEXT() const; + ResultValueType::type debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #ifdef VK_USE_PLATFORM_WIN32_KHR @@ -25517,7 +27511,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createIndirectCommandsLayoutNVX( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueIndirectCommandsLayoutNVX createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25530,7 +27524,7 @@ namespace vk #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; + ResultValueType::type createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25634,12 +27628,12 @@ namespace vk Result registerEventEXT( const DeviceEventInfoEXT* pDeviceEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, const AllocationCallbacks & allocator ) const; + ResultValueType::type registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ Result registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT* pDisplayEventInfo, const AllocationCallbacks* pAllocator, Fence* pFence ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, const AllocationCallbacks & allocator ) const; + ResultValueType::type registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ Result getSwapchainCounterEXT( SwapchainKHR swapchain, SurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue ) const; @@ -25652,14 +27646,14 @@ namespace vk PeerMemoryFeatureFlagsKHX getGroupPeerMemoryFeaturesKHX( uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result bindBufferMemory2KHX( uint32_t bindInfoCount, const BindBufferMemoryInfoKHX* pBindInfos ) const; + Result bindBufferMemory2KHR( uint32_t bindInfoCount, const BindBufferMemoryInfoKHR* pBindInfos ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type bindBufferMemory2KHX( ArrayProxy bindInfos ) const; + ResultValueType::type bindBufferMemory2KHR( ArrayProxy bindInfos ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - Result bindImageMemory2KHX( uint32_t bindInfoCount, const BindImageMemoryInfoKHX* pBindInfos ) const; + Result bindImageMemory2KHR( uint32_t bindInfoCount, const BindImageMemoryInfoKHR* pBindInfos ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - ResultValueType::type bindImageMemory2KHX( ArrayProxy bindInfos ) const; + ResultValueType::type bindImageMemory2KHR( ArrayProxy bindInfos ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ Result getGroupPresentCapabilitiesKHX( DeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities ) const; @@ -25681,7 +27675,7 @@ namespace vk #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; + ResultValueType::type createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -25713,11 +27707,15 @@ namespace vk void getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR* pInfo, MemoryRequirements2KHR* pMemoryRequirements ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE MemoryRequirements2KHR getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR & info ) const; + template + StructureChain getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR & info ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ void getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR* pInfo, MemoryRequirements2KHR* pMemoryRequirements ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE MemoryRequirements2KHR getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR & info ) const; + template + StructureChain getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR & info ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ void getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR* pInfo, uint32_t* pSparseMemoryRequirementCount, SparseImageMemoryRequirements2KHR* pSparseMemoryRequirements ) const; @@ -25726,6 +27724,54 @@ namespace vk std::vector getImageSparseMemoryRequirements2KHR( const ImageSparseMemoryRequirementsInfo2KHR & info ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SamplerYcbcrConversionKHR* pYcbcrConversion ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + ResultValueType::type createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void destroySamplerYcbcrConversionKHR( SamplerYcbcrConversionKHR ycbcrConversion, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroySamplerYcbcrConversionKHR( SamplerYcbcrConversionKHR ycbcrConversion, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result createValidationCacheEXT( const ValidationCacheCreateInfoEXT* pCreateInfo, const AllocationCallbacks* pAllocator, ValidationCacheEXT* pValidationCache ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type createValidationCacheEXT( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; +#ifndef VULKAN_HPP_NO_SMART_HANDLE + ResultValueType::type createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + void destroyValidationCacheEXT( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + void destroyValidationCacheEXT( ValidationCacheEXT validationCache, Optional allocator = nullptr ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getValidationCacheDataEXT( ValidationCacheEXT validationCache, size_t* pDataSize, void* pData ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type getValidationCacheDataEXT( ValidationCacheEXT validationCache ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result mergeValidationCachesEXT( ValidationCacheEXT dstCache, uint32_t srcCacheCount, const ValidationCacheEXT* pSrcCaches ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type mergeValidationCachesEXT( ValidationCacheEXT dstCache, ArrayProxy srcCaches ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template > + typename ResultValueType>::type getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + Result getMemoryHostPointerPropertiesEXT( ExternalMemoryHandleTypeFlagBitsKHR handleType, const void* pHostPointer, MemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + ResultValueType::type getMemoryHostPointerPropertiesEXT( ExternalMemoryHandleTypeFlagBitsKHR handleType, const void* pHostPointer ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_TYPESAFE_EXPLICIT operator VkDevice() const @@ -25758,7 +27804,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( Buffer buffer ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( Buffer buffer ) { m_device.destroyBuffer( buffer, m_allocator ); } @@ -25776,7 +27826,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( BufferView bufferView ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( BufferView bufferView ) { m_device.destroyBufferView( bufferView, m_allocator ); } @@ -25794,7 +27848,11 @@ namespace vk , m_commandPool( commandPool ) {} - void operator()( CommandBuffer commandBuffer ) + Device getDevice() const { return m_device; } + CommandPool getCommandPool() const { return m_commandPool; } + + protected: + void destroy( CommandBuffer commandBuffer ) { m_device.freeCommandBuffers( m_commandPool, commandBuffer ); } @@ -25812,7 +27870,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( CommandPool commandPool ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( CommandPool commandPool ) { m_device.destroyCommandPool( commandPool, m_allocator ); } @@ -25830,7 +27892,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( DescriptorPool descriptorPool ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( DescriptorPool descriptorPool ) { m_device.destroyDescriptorPool( descriptorPool, m_allocator ); } @@ -25848,7 +27914,11 @@ namespace vk , m_descriptorPool( descriptorPool ) {} - void operator()( DescriptorSet descriptorSet ) + Device getDevice() const { return m_device; } + DescriptorPool getDescriptorPool() const { return m_descriptorPool; } + + protected: + void destroy( DescriptorSet descriptorSet ) { m_device.freeDescriptorSets( m_descriptorPool, descriptorSet ); } @@ -25866,7 +27936,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( DescriptorSetLayout descriptorSetLayout ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( DescriptorSetLayout descriptorSetLayout ) { m_device.destroyDescriptorSetLayout( descriptorSetLayout, m_allocator ); } @@ -25884,7 +27958,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( DescriptorUpdateTemplateKHR descriptorUpdateTemplateKHR ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( DescriptorUpdateTemplateKHR descriptorUpdateTemplateKHR ) { m_device.destroyDescriptorUpdateTemplateKHR( descriptorUpdateTemplateKHR, m_allocator ); } @@ -25902,7 +27980,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( DeviceMemory deviceMemory ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( DeviceMemory deviceMemory ) { m_device.freeMemory( deviceMemory, m_allocator ); } @@ -25920,7 +28002,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( Event event ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( Event event ) { m_device.destroyEvent( event, m_allocator ); } @@ -25938,7 +28024,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( Fence fence ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( Fence fence ) { m_device.destroyFence( fence, m_allocator ); } @@ -25956,7 +28046,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( Framebuffer framebuffer ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( Framebuffer framebuffer ) { m_device.destroyFramebuffer( framebuffer, m_allocator ); } @@ -25974,7 +28068,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( Image image ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( Image image ) { m_device.destroyImage( image, m_allocator ); } @@ -25992,7 +28090,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( ImageView imageView ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( ImageView imageView ) { m_device.destroyImageView( imageView, m_allocator ); } @@ -26010,7 +28112,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( IndirectCommandsLayoutNVX indirectCommandsLayoutNVX ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( IndirectCommandsLayoutNVX indirectCommandsLayoutNVX ) { m_device.destroyIndirectCommandsLayoutNVX( indirectCommandsLayoutNVX, m_allocator ); } @@ -26028,7 +28134,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( ObjectTableNVX objectTableNVX ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( ObjectTableNVX objectTableNVX ) { m_device.destroyObjectTableNVX( objectTableNVX, m_allocator ); } @@ -26046,7 +28156,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( Pipeline pipeline ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( Pipeline pipeline ) { m_device.destroyPipeline( pipeline, m_allocator ); } @@ -26064,7 +28178,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( PipelineCache pipelineCache ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( PipelineCache pipelineCache ) { m_device.destroyPipelineCache( pipelineCache, m_allocator ); } @@ -26082,7 +28200,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( PipelineLayout pipelineLayout ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( PipelineLayout pipelineLayout ) { m_device.destroyPipelineLayout( pipelineLayout, m_allocator ); } @@ -26100,7 +28222,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( QueryPool queryPool ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( QueryPool queryPool ) { m_device.destroyQueryPool( queryPool, m_allocator ); } @@ -26118,7 +28244,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( RenderPass renderPass ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( RenderPass renderPass ) { m_device.destroyRenderPass( renderPass, m_allocator ); } @@ -26136,7 +28266,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( Sampler sampler ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( Sampler sampler ) { m_device.destroySampler( sampler, m_allocator ); } @@ -26146,6 +28280,28 @@ namespace vk Optional m_allocator; }; + class SamplerYcbcrConversionKHRDeleter + { + public: + SamplerYcbcrConversionKHRDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( SamplerYcbcrConversionKHR samplerYcbcrConversionKHR ) + { + m_device.destroySamplerYcbcrConversionKHR( samplerYcbcrConversionKHR, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; + class SemaphoreDeleter { public: @@ -26154,7 +28310,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( Semaphore semaphore ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( Semaphore semaphore ) { m_device.destroySemaphore( semaphore, m_allocator ); } @@ -26172,7 +28332,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( ShaderModule shaderModule ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( ShaderModule shaderModule ) { m_device.destroyShaderModule( shaderModule, m_allocator ); } @@ -26190,7 +28354,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( SwapchainKHR swapchainKHR ) + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( SwapchainKHR swapchainKHR ) { m_device.destroySwapchainKHR( swapchainKHR, m_allocator ); } @@ -26199,6 +28367,28 @@ namespace vk Device m_device; Optional m_allocator; }; + + class ValidationCacheEXTDeleter + { + public: + ValidationCacheEXTDeleter( Device device = Device(), Optional allocator = nullptr ) + : m_device( device ) + , m_allocator( allocator ) + {} + + Device getDevice() const { return m_device; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( ValidationCacheEXT validationCacheEXT ) + { + m_device.destroyValidationCacheEXT( validationCacheEXT, m_allocator ); + } + + private: + Device m_device; + Optional m_allocator; + }; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ VULKAN_HPP_INLINE PFN_vkVoidFunction Device::getProcAddr( const char* pName ) const @@ -26245,7 +28435,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::waitIdle() const { Result result = static_cast( vkDeviceWaitIdle( m_device ) ); - return createResultValue( result, "vk::Device::waitIdle" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::waitIdle" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26258,13 +28448,16 @@ namespace vk { DeviceMemory memory; Result result = static_cast( vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &memory ) ) ); - return createResultValue( result, memory, "vk::Device::allocateMemory" ); + return createResultValue( result, memory, "VULKAN_HPP_NAMESPACE::Device::allocateMemory" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDeviceMemory Device::allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::allocateMemoryUnique( const MemoryAllocateInfo & allocateInfo, Optional allocator ) const { + DeviceMemory memory; + Result result = static_cast( vkAllocateMemory( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &memory ) ) ); + DeviceMemoryDeleter deleter( *this, allocator ); - return UniqueDeviceMemory( allocateMemory( allocateInfo, allocator ), deleter ); + return createResultValue( result, memory, "VULKAN_HPP_NAMESPACE::Device::allocateMemoryUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26289,7 +28482,7 @@ namespace vk { void* pData; Result result = static_cast( vkMapMemory( m_device, static_cast( memory ), offset, size, static_cast( flags ), &pData ) ); - return createResultValue( result, pData, "vk::Device::mapMemory" ); + return createResultValue( result, pData, "VULKAN_HPP_NAMESPACE::Device::mapMemory" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26306,7 +28499,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::flushMappedMemoryRanges( ArrayProxy memoryRanges ) const { Result result = static_cast( vkFlushMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); - return createResultValue( result, "vk::Device::flushMappedMemoryRanges" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::flushMappedMemoryRanges" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26318,7 +28511,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::invalidateMappedMemoryRanges( ArrayProxy memoryRanges ) const { Result result = static_cast( vkInvalidateMappedMemoryRanges( m_device, memoryRanges.size() , reinterpret_cast( memoryRanges.data() ) ) ); - return createResultValue( result, "vk::Device::invalidateMappedMemoryRanges" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::invalidateMappedMemoryRanges" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26357,7 +28550,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::bindBufferMemory( Buffer buffer, DeviceMemory memory, DeviceSize memoryOffset ) const { Result result = static_cast( vkBindBufferMemory( m_device, static_cast( buffer ), static_cast( memory ), memoryOffset ) ); - return createResultValue( result, "vk::Device::bindBufferMemory" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::bindBufferMemory" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26383,7 +28576,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::bindImageMemory( Image image, DeviceMemory memory, DeviceSize memoryOffset ) const { Result result = static_cast( vkBindImageMemory( m_device, static_cast( image ), static_cast( memory ), memoryOffset ) ); - return createResultValue( result, "vk::Device::bindImageMemory" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::bindImageMemory" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26413,13 +28606,16 @@ namespace vk { Fence fence; Result result = static_cast( vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); - return createResultValue( result, fence, "vk::Device::createFence" ); + return createResultValue( result, fence, "VULKAN_HPP_NAMESPACE::Device::createFence" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueFence Device::createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createFenceUnique( const FenceCreateInfo & createInfo, Optional allocator ) const { + Fence fence; + Result result = static_cast( vkCreateFence( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &fence ) ) ); + FenceDeleter deleter( *this, allocator ); - return UniqueFence( createFence( createInfo, allocator ), deleter ); + return createResultValue( result, fence, "VULKAN_HPP_NAMESPACE::Device::createFenceUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26443,7 +28639,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::resetFences( ArrayProxy fences ) const { Result result = static_cast( vkResetFences( m_device, fences.size() , reinterpret_cast( fences.data() ) ) ); - return createResultValue( result, "vk::Device::resetFences" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::resetFences" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26456,7 +28652,7 @@ namespace vk VULKAN_HPP_INLINE Result Device::getFenceStatus( Fence fence ) const { Result result = static_cast( vkGetFenceStatus( m_device, static_cast( fence ) ) ); - return createResultValue( result, "vk::Device::getFenceStatus", { Result::eSuccess, Result::eNotReady } ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::getFenceStatus", { Result::eSuccess, Result::eNotReady } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26468,7 +28664,7 @@ namespace vk VULKAN_HPP_INLINE Result Device::waitForFences( ArrayProxy fences, Bool32 waitAll, uint64_t timeout ) const { Result result = static_cast( vkWaitForFences( m_device, fences.size() , reinterpret_cast( fences.data() ), waitAll, timeout ) ); - return createResultValue( result, "vk::Device::waitForFences", { Result::eSuccess, Result::eTimeout } ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::waitForFences", { Result::eSuccess, Result::eTimeout } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26481,13 +28677,16 @@ namespace vk { Semaphore semaphore; Result result = static_cast( vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &semaphore ) ) ); - return createResultValue( result, semaphore, "vk::Device::createSemaphore" ); + return createResultValue( result, semaphore, "VULKAN_HPP_NAMESPACE::Device::createSemaphore" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSemaphore Device::createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createSemaphoreUnique( const SemaphoreCreateInfo & createInfo, Optional allocator ) const { + Semaphore semaphore; + Result result = static_cast( vkCreateSemaphore( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &semaphore ) ) ); + SemaphoreDeleter deleter( *this, allocator ); - return UniqueSemaphore( createSemaphore( createInfo, allocator ), deleter ); + return createResultValue( result, semaphore, "VULKAN_HPP_NAMESPACE::Device::createSemaphoreUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26512,13 +28711,16 @@ namespace vk { Event event; Result result = static_cast( vkCreateEvent( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &event ) ) ); - return createResultValue( result, event, "vk::Device::createEvent" ); + 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 + VULKAN_HPP_INLINE ResultValueType::type Device::createEventUnique( 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 ) ) ); + EventDeleter deleter( *this, allocator ); - return UniqueEvent( createEvent( createInfo, allocator ), deleter ); + return createResultValue( result, event, "VULKAN_HPP_NAMESPACE::Device::createEventUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26543,7 +28745,7 @@ namespace vk VULKAN_HPP_INLINE Result Device::getEventStatus( Event event ) const { Result result = static_cast( vkGetEventStatus( m_device, static_cast( event ) ) ); - return createResultValue( result, "vk::Device::getEventStatus", { Result::eEventSet, Result::eEventReset } ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::getEventStatus", { Result::eEventSet, Result::eEventReset } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26556,7 +28758,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::setEvent( Event event ) const { Result result = static_cast( vkSetEvent( m_device, static_cast( event ) ) ); - return createResultValue( result, "vk::Device::setEvent" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::setEvent" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26569,7 +28771,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::resetEvent( Event event ) const { Result result = static_cast( vkResetEvent( m_device, static_cast( event ) ) ); - return createResultValue( result, "vk::Device::resetEvent" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::resetEvent" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26582,13 +28784,16 @@ namespace vk { QueryPool queryPool; Result result = static_cast( vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &queryPool ) ) ); - return createResultValue( result, queryPool, "vk::Device::createQueryPool" ); + return createResultValue( result, queryPool, "VULKAN_HPP_NAMESPACE::Device::createQueryPool" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueQueryPool Device::createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createQueryPoolUnique( const QueryPoolCreateInfo & createInfo, Optional allocator ) const { + QueryPool queryPool; + Result result = static_cast( vkCreateQueryPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &queryPool ) ) ); + QueryPoolDeleter deleter( *this, allocator ); - return UniqueQueryPool( createQueryPool( createInfo, allocator ), deleter ); + return createResultValue( result, queryPool, "VULKAN_HPP_NAMESPACE::Device::createQueryPoolUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26613,7 +28818,7 @@ namespace vk VULKAN_HPP_INLINE Result Device::getQueryPoolResults( QueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, ArrayProxy data, DeviceSize stride, QueryResultFlags flags ) 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, "vk::Device::getQueryPoolResults", { Result::eSuccess, Result::eNotReady } ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::getQueryPoolResults", { Result::eSuccess, Result::eNotReady } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26626,13 +28831,16 @@ namespace vk { Buffer buffer; Result result = static_cast( vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &buffer ) ) ); - return createResultValue( result, buffer, "vk::Device::createBuffer" ); + return createResultValue( result, buffer, "VULKAN_HPP_NAMESPACE::Device::createBuffer" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueBuffer Device::createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createBufferUnique( const BufferCreateInfo & createInfo, Optional allocator ) const { + Buffer buffer; + Result result = static_cast( vkCreateBuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &buffer ) ) ); + BufferDeleter deleter( *this, allocator ); - return UniqueBuffer( createBuffer( createInfo, allocator ), deleter ); + return createResultValue( result, buffer, "VULKAN_HPP_NAMESPACE::Device::createBufferUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26657,13 +28865,16 @@ namespace vk { BufferView view; Result result = static_cast( vkCreateBufferView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); - return createResultValue( result, view, "vk::Device::createBufferView" ); + 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 + VULKAN_HPP_INLINE ResultValueType::type Device::createBufferViewUnique( 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 ) ) ); + BufferViewDeleter deleter( *this, allocator ); - return UniqueBufferView( createBufferView( createInfo, allocator ), deleter ); + return createResultValue( result, view, "VULKAN_HPP_NAMESPACE::Device::createBufferViewUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26688,13 +28899,16 @@ namespace vk { Image image; Result result = static_cast( vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &image ) ) ); - return createResultValue( result, image, "vk::Device::createImage" ); + return createResultValue( result, image, "VULKAN_HPP_NAMESPACE::Device::createImage" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueImage Device::createImageUnique( const ImageCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createImageUnique( const ImageCreateInfo & createInfo, Optional allocator ) const { + Image image; + Result result = static_cast( vkCreateImage( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &image ) ) ); + ImageDeleter deleter( *this, allocator ); - return UniqueImage( createImage( createInfo, allocator ), deleter ); + return createResultValue( result, image, "VULKAN_HPP_NAMESPACE::Device::createImageUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26732,13 +28946,16 @@ namespace vk { ImageView view; Result result = static_cast( vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); - return createResultValue( result, view, "vk::Device::createImageView" ); + return createResultValue( result, view, "VULKAN_HPP_NAMESPACE::Device::createImageView" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueImageView Device::createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createImageViewUnique( const ImageViewCreateInfo & createInfo, Optional allocator ) const { + ImageView view; + Result result = static_cast( vkCreateImageView( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &view ) ) ); + ImageViewDeleter deleter( *this, allocator ); - return UniqueImageView( createImageView( createInfo, allocator ), deleter ); + return createResultValue( result, view, "VULKAN_HPP_NAMESPACE::Device::createImageViewUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26763,13 +28980,16 @@ namespace vk { ShaderModule shaderModule; Result result = static_cast( vkCreateShaderModule( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &shaderModule ) ) ); - return createResultValue( result, shaderModule, "vk::Device::createShaderModule" ); + 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 + VULKAN_HPP_INLINE ResultValueType::type Device::createShaderModuleUnique( 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 ) ) ); + ShaderModuleDeleter deleter( *this, allocator ); - return UniqueShaderModule( createShaderModule( createInfo, allocator ), deleter ); + return createResultValue( result, shaderModule, "VULKAN_HPP_NAMESPACE::Device::createShaderModuleUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26794,13 +29014,16 @@ namespace vk { PipelineCache pipelineCache; Result result = static_cast( vkCreatePipelineCache( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineCache ) ) ); - return createResultValue( result, pipelineCache, "vk::Device::createPipelineCache" ); + 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 + VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineCacheUnique( 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 ) ) ); + PipelineCacheDeleter deleter( *this, allocator ); - return UniquePipelineCache( createPipelineCache( createInfo, allocator ), deleter ); + return createResultValue( result, pipelineCache, "VULKAN_HPP_NAMESPACE::Device::createPipelineCacheUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26838,7 +29061,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( dataSize <= data.size() ); data.resize( dataSize ); - return createResultValue( result, data, "vk::Device::getPipelineCacheData" ); + return createResultValue( result, data, "VULKAN_HPP_NAMESPACE::Device::getPipelineCacheData" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26850,7 +29073,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::mergePipelineCaches( PipelineCache dstCache, ArrayProxy srcCaches ) const { Result result = static_cast( vkMergePipelineCaches( m_device, static_cast( dstCache ), srcCaches.size() , reinterpret_cast( srcCaches.data() ) ) ); - return createResultValue( result, "vk::Device::mergePipelineCaches" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::mergePipelineCaches" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26864,32 +29087,38 @@ namespace vk { std::vector pipelines( createInfos.size() ); 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, "vk::Device::createGraphicsPipelines" ); + return createResultValue( result, pipelines, "VULKAN_HPP_NAMESPACE::Device::createGraphicsPipelines" ); } VULKAN_HPP_INLINE ResultValueType::type Device::createGraphicsPipeline( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator ) 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, "vk::Device::createGraphicsPipeline" ); + return createResultValue( result, pipeline, "VULKAN_HPP_NAMESPACE::Device::createGraphicsPipeline" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE template - VULKAN_HPP_INLINE std::vector Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createGraphicsPipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const { + std::vector pipelines( createInfos.size() ); + 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() ) ) ); + PipelineDeleter deleter( *this, allocator ); - std::vector pipelines = createGraphicsPipelines( pipelineCache, createInfos, allocator ); std::vector uniquePipelines; uniquePipelines.reserve( pipelines.size() ); - for ( auto pipeline : pipelines ) + for ( auto const& pipeline : pipelines ) { uniquePipelines.push_back( UniquePipeline( pipeline, deleter ) ); } - return uniquePipelines; + + return createResultValue( result, uniquePipelines, "VULKAN_HPP_NAMESPACE::Device::createGraphicsPipelinesUnique" ); } - VULKAN_HPP_INLINE UniquePipeline Device::createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createGraphicsPipelineUnique( PipelineCache pipelineCache, const GraphicsPipelineCreateInfo & createInfo, Optional allocator ) 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 ) ) ); + PipelineDeleter deleter( *this, allocator ); - return UniquePipeline( createGraphicsPipeline( pipelineCache, createInfo, allocator ), deleter ); + return createResultValue( result, pipeline, "VULKAN_HPP_NAMESPACE::Device::createGraphicsPipelineUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26904,32 +29133,38 @@ namespace vk { std::vector pipelines( createInfos.size() ); 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, "vk::Device::createComputePipelines" ); + return createResultValue( result, pipelines, "VULKAN_HPP_NAMESPACE::Device::createComputePipelines" ); } VULKAN_HPP_INLINE ResultValueType::type Device::createComputePipeline( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator ) 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, "vk::Device::createComputePipeline" ); + return createResultValue( result, pipeline, "VULKAN_HPP_NAMESPACE::Device::createComputePipeline" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE template - VULKAN_HPP_INLINE std::vector Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createComputePipelinesUnique( PipelineCache pipelineCache, ArrayProxy createInfos, Optional allocator ) const { + std::vector pipelines( createInfos.size() ); + 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() ) ) ); + PipelineDeleter deleter( *this, allocator ); - std::vector pipelines = createComputePipelines( pipelineCache, createInfos, allocator ); std::vector uniquePipelines; uniquePipelines.reserve( pipelines.size() ); - for ( auto pipeline : pipelines ) + for ( auto const& pipeline : pipelines ) { uniquePipelines.push_back( UniquePipeline( pipeline, deleter ) ); } - return uniquePipelines; + + return createResultValue( result, uniquePipelines, "VULKAN_HPP_NAMESPACE::Device::createComputePipelinesUnique" ); } - VULKAN_HPP_INLINE UniquePipeline Device::createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createComputePipelineUnique( PipelineCache pipelineCache, const ComputePipelineCreateInfo & createInfo, Optional allocator ) 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 ) ) ); + PipelineDeleter deleter( *this, allocator ); - return UniquePipeline( createComputePipeline( pipelineCache, createInfo, allocator ), deleter ); + return createResultValue( result, pipeline, "VULKAN_HPP_NAMESPACE::Device::createComputePipelineUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26954,13 +29189,16 @@ namespace vk { PipelineLayout pipelineLayout; Result result = static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineLayout ) ) ); - return createResultValue( result, pipelineLayout, "vk::Device::createPipelineLayout" ); + return createResultValue( result, pipelineLayout, "VULKAN_HPP_NAMESPACE::Device::createPipelineLayout" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniquePipelineLayout Device::createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createPipelineLayoutUnique( const PipelineLayoutCreateInfo & createInfo, Optional allocator ) const { + PipelineLayout pipelineLayout; + Result result = static_cast( vkCreatePipelineLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &pipelineLayout ) ) ); + PipelineLayoutDeleter deleter( *this, allocator ); - return UniquePipelineLayout( createPipelineLayout( createInfo, allocator ), deleter ); + return createResultValue( result, pipelineLayout, "VULKAN_HPP_NAMESPACE::Device::createPipelineLayoutUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -26985,13 +29223,16 @@ namespace vk { Sampler sampler; Result result = static_cast( vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &sampler ) ) ); - return createResultValue( result, sampler, "vk::Device::createSampler" ); + return createResultValue( result, sampler, "VULKAN_HPP_NAMESPACE::Device::createSampler" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSampler Device::createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createSamplerUnique( const SamplerCreateInfo & createInfo, Optional allocator ) const { + Sampler sampler; + Result result = static_cast( vkCreateSampler( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &sampler ) ) ); + SamplerDeleter deleter( *this, allocator ); - return UniqueSampler( createSampler( createInfo, allocator ), deleter ); + return createResultValue( result, sampler, "VULKAN_HPP_NAMESPACE::Device::createSamplerUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27016,13 +29257,16 @@ namespace vk { DescriptorSetLayout setLayout; Result result = static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &setLayout ) ) ); - return createResultValue( result, setLayout, "vk::Device::createDescriptorSetLayout" ); + return createResultValue( result, setLayout, "VULKAN_HPP_NAMESPACE::Device::createDescriptorSetLayout" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDescriptorSetLayout Device::createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorSetLayoutUnique( const DescriptorSetLayoutCreateInfo & createInfo, Optional allocator ) const { + DescriptorSetLayout setLayout; + Result result = static_cast( vkCreateDescriptorSetLayout( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &setLayout ) ) ); + DescriptorSetLayoutDeleter deleter( *this, allocator ); - return UniqueDescriptorSetLayout( createDescriptorSetLayout( createInfo, allocator ), deleter ); + return createResultValue( result, setLayout, "VULKAN_HPP_NAMESPACE::Device::createDescriptorSetLayoutUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27047,13 +29291,16 @@ namespace vk { DescriptorPool descriptorPool; Result result = static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorPool ) ) ); - return createResultValue( result, descriptorPool, "vk::Device::createDescriptorPool" ); + return createResultValue( result, descriptorPool, "VULKAN_HPP_NAMESPACE::Device::createDescriptorPool" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDescriptorPool Device::createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorPoolUnique( const DescriptorPoolCreateInfo & createInfo, Optional allocator ) const { + DescriptorPool descriptorPool; + Result result = static_cast( vkCreateDescriptorPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorPool ) ) ); + DescriptorPoolDeleter deleter( *this, allocator ); - return UniqueDescriptorPool( createDescriptorPool( createInfo, allocator ), deleter ); + return createResultValue( result, descriptorPool, "VULKAN_HPP_NAMESPACE::Device::createDescriptorPoolUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27078,7 +29325,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::resetDescriptorPool( DescriptorPool descriptorPool, DescriptorPoolResetFlags flags ) const { Result result = static_cast( vkResetDescriptorPool( m_device, static_cast( descriptorPool ), static_cast( flags ) ) ); - return createResultValue( result, "vk::Device::resetDescriptorPool" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::resetDescriptorPool" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27092,21 +29339,24 @@ namespace vk { std::vector descriptorSets( allocateInfo.descriptorSetCount ); Result result = static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); - return createResultValue( result, descriptorSets, "vk::Device::allocateDescriptorSets" ); + return createResultValue( result, descriptorSets, "VULKAN_HPP_NAMESPACE::Device::allocateDescriptorSets" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE template - VULKAN_HPP_INLINE std::vector Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const + VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateDescriptorSetsUnique( const DescriptorSetAllocateInfo & allocateInfo ) const { + std::vector descriptorSets( allocateInfo.descriptorSetCount ); + Result result = static_cast( vkAllocateDescriptorSets( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( descriptorSets.data() ) ) ); + DescriptorSetDeleter deleter( *this, allocateInfo.descriptorPool ); - std::vector descriptorSets = allocateDescriptorSets( allocateInfo ); std::vector uniqueDescriptorSets; uniqueDescriptorSets.reserve( descriptorSets.size() ); - for ( auto descriptorSet : descriptorSets ) + for ( auto const& descriptorSet : descriptorSets ) { uniqueDescriptorSets.push_back( UniqueDescriptorSet( descriptorSet, deleter ) ); } - return uniqueDescriptorSets; + + return createResultValue( result, uniqueDescriptorSets, "VULKAN_HPP_NAMESPACE::Device::allocateDescriptorSetsUnique" ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27119,7 +29369,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::freeDescriptorSets( DescriptorPool descriptorPool, ArrayProxy descriptorSets ) const { Result result = static_cast( vkFreeDescriptorSets( m_device, static_cast( descriptorPool ), descriptorSets.size() , reinterpret_cast( descriptorSets.data() ) ) ); - return createResultValue( result, "vk::Device::freeDescriptorSets" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::freeDescriptorSets" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27143,13 +29393,16 @@ namespace vk { Framebuffer framebuffer; Result result = static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &framebuffer ) ) ); - return createResultValue( result, framebuffer, "vk::Device::createFramebuffer" ); + return createResultValue( result, framebuffer, "VULKAN_HPP_NAMESPACE::Device::createFramebuffer" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueFramebuffer Device::createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createFramebufferUnique( const FramebufferCreateInfo & createInfo, Optional allocator ) const { + Framebuffer framebuffer; + Result result = static_cast( vkCreateFramebuffer( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &framebuffer ) ) ); + FramebufferDeleter deleter( *this, allocator ); - return UniqueFramebuffer( createFramebuffer( createInfo, allocator ), deleter ); + return createResultValue( result, framebuffer, "VULKAN_HPP_NAMESPACE::Device::createFramebufferUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27174,13 +29427,16 @@ namespace vk { RenderPass renderPass; Result result = static_cast( vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); - return createResultValue( result, renderPass, "vk::Device::createRenderPass" ); + return createResultValue( result, renderPass, "VULKAN_HPP_NAMESPACE::Device::createRenderPass" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueRenderPass Device::createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createRenderPassUnique( const RenderPassCreateInfo & createInfo, Optional allocator ) const { + RenderPass renderPass; + Result result = static_cast( vkCreateRenderPass( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &renderPass ) ) ); + RenderPassDeleter deleter( *this, allocator ); - return UniqueRenderPass( createRenderPass( createInfo, allocator ), deleter ); + return createResultValue( result, renderPass, "VULKAN_HPP_NAMESPACE::Device::createRenderPassUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27218,13 +29474,16 @@ namespace vk { CommandPool commandPool; Result result = static_cast( vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &commandPool ) ) ); - return createResultValue( result, commandPool, "vk::Device::createCommandPool" ); + return createResultValue( result, commandPool, "VULKAN_HPP_NAMESPACE::Device::createCommandPool" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueCommandPool Device::createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createCommandPoolUnique( const CommandPoolCreateInfo & createInfo, Optional allocator ) const { + CommandPool commandPool; + Result result = static_cast( vkCreateCommandPool( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &commandPool ) ) ); + CommandPoolDeleter deleter( *this, allocator ); - return UniqueCommandPool( createCommandPool( createInfo, allocator ), deleter ); + return createResultValue( result, commandPool, "VULKAN_HPP_NAMESPACE::Device::createCommandPoolUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27249,7 +29508,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::resetCommandPool( CommandPool commandPool, CommandPoolResetFlags flags ) const { Result result = static_cast( vkResetCommandPool( m_device, static_cast( commandPool ), static_cast( flags ) ) ); - return createResultValue( result, "vk::Device::resetCommandPool" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::resetCommandPool" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27263,21 +29522,24 @@ namespace vk { std::vector commandBuffers( allocateInfo.commandBufferCount ); Result result = static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); - return createResultValue( result, commandBuffers, "vk::Device::allocateCommandBuffers" ); + return createResultValue( result, commandBuffers, "VULKAN_HPP_NAMESPACE::Device::allocateCommandBuffers" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE template - VULKAN_HPP_INLINE std::vector Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const + VULKAN_HPP_INLINE typename ResultValueType>::type Device::allocateCommandBuffersUnique( const CommandBufferAllocateInfo & allocateInfo ) const { + std::vector commandBuffers( allocateInfo.commandBufferCount ); + Result result = static_cast( vkAllocateCommandBuffers( m_device, reinterpret_cast( &allocateInfo ), reinterpret_cast( commandBuffers.data() ) ) ); + CommandBufferDeleter deleter( *this, allocateInfo.commandPool ); - std::vector commandBuffers = allocateCommandBuffers( allocateInfo ); std::vector uniqueCommandBuffers; uniqueCommandBuffers.reserve( commandBuffers.size() ); - for ( auto commandBuffer : commandBuffers ) + for ( auto const& commandBuffer : commandBuffers ) { uniqueCommandBuffers.push_back( UniqueCommandBuffer( commandBuffer, deleter ) ); } - return uniqueCommandBuffers; + + return createResultValue( result, uniqueCommandBuffers, "VULKAN_HPP_NAMESPACE::Device::allocateCommandBuffersUnique" ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27303,32 +29565,38 @@ namespace vk { std::vector swapchains( createInfos.size() ); 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, "vk::Device::createSharedSwapchainsKHR" ); + return createResultValue( result, swapchains, "VULKAN_HPP_NAMESPACE::Device::createSharedSwapchainsKHR" ); } VULKAN_HPP_INLINE ResultValueType::type Device::createSharedSwapchainKHR( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) 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, "vk::Device::createSharedSwapchainKHR" ); + return createResultValue( result, swapchain, "VULKAN_HPP_NAMESPACE::Device::createSharedSwapchainKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE template - VULKAN_HPP_INLINE std::vector Device::createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator ) const + VULKAN_HPP_INLINE typename ResultValueType>::type Device::createSharedSwapchainsKHRUnique( ArrayProxy createInfos, Optional allocator ) const { + std::vector swapchains( createInfos.size() ); + Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, createInfos.size() , reinterpret_cast( createInfos.data() ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( swapchains.data() ) ) ); + SwapchainKHRDeleter deleter( *this, allocator ); - std::vector swapchainKHRs = createSharedSwapchainsKHR( createInfos, allocator ); - std::vector uniqueSwapchainKHRs; - uniqueSwapchainKHRs.reserve( swapchainKHRs.size() ); - for ( auto swapchainKHR : swapchainKHRs ) + std::vector uniqueSwapchains; + uniqueSwapchains.reserve( swapchains.size() ); + for ( auto const& swapchain : swapchains ) { - uniqueSwapchainKHRs.push_back( UniqueSwapchainKHR( swapchainKHR, deleter ) ); + uniqueSwapchains.push_back( UniqueSwapchainKHR( swapchain, deleter ) ); } - return uniqueSwapchainKHRs; + + return createResultValue( result, uniqueSwapchains, "VULKAN_HPP_NAMESPACE::Device::createSharedSwapchainsKHRUnique" ); } - VULKAN_HPP_INLINE UniqueSwapchainKHR Device::createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createSharedSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const { + SwapchainKHR swapchain; + Result result = static_cast( vkCreateSharedSwapchainsKHR( m_device, 1 , reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); + SwapchainKHRDeleter deleter( *this, allocator ); - return UniqueSwapchainKHR( createSharedSwapchainKHR( createInfo, allocator ), deleter ); + return createResultValue( result, swapchain, "VULKAN_HPP_NAMESPACE::Device::createSharedSwapchainKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27342,13 +29610,16 @@ namespace vk { SwapchainKHR swapchain; Result result = static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); - return createResultValue( result, swapchain, "vk::Device::createSwapchainKHR" ); + return createResultValue( result, swapchain, "VULKAN_HPP_NAMESPACE::Device::createSwapchainKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSwapchainKHR Device::createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createSwapchainKHRUnique( const SwapchainCreateInfoKHR & createInfo, Optional allocator ) const { + SwapchainKHR swapchain; + Result result = static_cast( vkCreateSwapchainKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &swapchain ) ) ); + SwapchainKHRDeleter deleter( *this, allocator ); - return UniqueSwapchainKHR( createSwapchainKHR( createInfo, allocator ), deleter ); + return createResultValue( result, swapchain, "VULKAN_HPP_NAMESPACE::Device::createSwapchainKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27386,7 +29657,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( swapchainImageCount <= swapchainImages.size() ); swapchainImages.resize( swapchainImageCount ); - return createResultValue( result, swapchainImages, "vk::Device::getSwapchainImagesKHR" ); + return createResultValue( result, swapchainImages, "VULKAN_HPP_NAMESPACE::Device::getSwapchainImagesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27399,33 +29670,31 @@ namespace vk { 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, "vk::Device::acquireNextImageKHR", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); + return createResultValue( result, imageIndex, "VULKAN_HPP_NAMESPACE::Device::acquireNextImageKHR", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectNameEXT( DebugMarkerObjectNameInfoEXT* pNameInfo ) const + VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT* pNameInfo ) const { - return static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( pNameInfo ) ) ); + return static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( pNameInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::debugMarkerSetObjectNameEXT() const + VULKAN_HPP_INLINE ResultValueType::type Device::debugMarkerSetObjectNameEXT( const DebugMarkerObjectNameInfoEXT & nameInfo ) const { - DebugMarkerObjectNameInfoEXT nameInfo; - Result result = static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); - return createResultValue( result, nameInfo, "vk::Device::debugMarkerSetObjectNameEXT" ); + Result result = static_cast( vkDebugMarkerSetObjectNameEXT( m_device, reinterpret_cast( &nameInfo ) ) ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::debugMarkerSetObjectNameEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT( DebugMarkerObjectTagInfoEXT* pTagInfo ) const + VULKAN_HPP_INLINE Result Device::debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT* pTagInfo ) const { - return static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( pTagInfo ) ) ); + return static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( pTagInfo ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::debugMarkerSetObjectTagEXT() const + VULKAN_HPP_INLINE ResultValueType::type Device::debugMarkerSetObjectTagEXT( const DebugMarkerObjectTagInfoEXT & tagInfo ) const { - DebugMarkerObjectTagInfoEXT tagInfo; - Result result = static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); - return createResultValue( result, tagInfo, "vk::Device::debugMarkerSetObjectTagEXT" ); + Result result = static_cast( vkDebugMarkerSetObjectTagEXT( m_device, reinterpret_cast( &tagInfo ) ) ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::debugMarkerSetObjectTagEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27439,7 +29708,7 @@ namespace vk { HANDLE handle; Result result = static_cast( vkGetMemoryWin32HandleNV( m_device, static_cast( memory ), static_cast( handleType ), &handle ) ); - return createResultValue( result, handle, "vk::Device::getMemoryWin32HandleNV" ); + return createResultValue( result, handle, "VULKAN_HPP_NAMESPACE::Device::getMemoryWin32HandleNV" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -27453,13 +29722,16 @@ namespace vk { IndirectCommandsLayoutNVX indirectCommandsLayout; Result result = static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); - return createResultValue( result, indirectCommandsLayout, "vk::Device::createIndirectCommandsLayoutNVX" ); + return createResultValue( result, indirectCommandsLayout, "VULKAN_HPP_NAMESPACE::Device::createIndirectCommandsLayoutNVX" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueIndirectCommandsLayoutNVX Device::createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createIndirectCommandsLayoutNVXUnique( const IndirectCommandsLayoutCreateInfoNVX & createInfo, Optional allocator ) const { + IndirectCommandsLayoutNVX indirectCommandsLayout; + Result result = static_cast( vkCreateIndirectCommandsLayoutNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &indirectCommandsLayout ) ) ); + IndirectCommandsLayoutNVXDeleter deleter( *this, allocator ); - return UniqueIndirectCommandsLayoutNVX( createIndirectCommandsLayoutNVX( createInfo, allocator ), deleter ); + return createResultValue( result, indirectCommandsLayout, "VULKAN_HPP_NAMESPACE::Device::createIndirectCommandsLayoutNVXUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27484,13 +29756,16 @@ namespace vk { ObjectTableNVX objectTable; Result result = static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &objectTable ) ) ); - return createResultValue( result, objectTable, "vk::Device::createObjectTableNVX" ); + return createResultValue( result, objectTable, "VULKAN_HPP_NAMESPACE::Device::createObjectTableNVX" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueObjectTableNVX Device::createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createObjectTableNVXUnique( const ObjectTableCreateInfoNVX & createInfo, Optional allocator ) const { + ObjectTableNVX objectTable; + Result result = static_cast( vkCreateObjectTableNVX( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &objectTable ) ) ); + ObjectTableNVXDeleter deleter( *this, allocator ); - return UniqueObjectTableNVX( createObjectTableNVX( createInfo, allocator ), deleter ); + return createResultValue( result, objectTable, "VULKAN_HPP_NAMESPACE::Device::createObjectTableNVXUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27518,11 +29793,11 @@ namespace vk #else if ( pObjectTableEntries.size() != objectIndices.size() ) { - throw LogicError( "vk::Device::registerObjectsNVX: pObjectTableEntries.size() != objectIndices.size()" ); + throw LogicError( "VULKAN_HPP_NAMESPACE::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, "vk::Device::registerObjectsNVX" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::registerObjectsNVX" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27538,11 +29813,11 @@ namespace vk #else if ( objectEntryTypes.size() != objectIndices.size() ) { - throw LogicError( "vk::Device::unregisterObjectsNVX: objectEntryTypes.size() != objectIndices.size()" ); + throw LogicError( "VULKAN_HPP_NAMESPACE::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, "vk::Device::unregisterObjectsNVX" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::unregisterObjectsNVX" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27561,7 +29836,7 @@ namespace vk { HANDLE handle; Result result = static_cast( vkGetMemoryWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); - return createResultValue( result, handle, "vk::Device::getMemoryWin32HandleKHR" ); + return createResultValue( result, handle, "VULKAN_HPP_NAMESPACE::Device::getMemoryWin32HandleKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -27576,7 +29851,7 @@ namespace vk { MemoryWin32HandlePropertiesKHR memoryWin32HandleProperties; Result result = static_cast( vkGetMemoryWin32HandlePropertiesKHR( m_device, static_cast( handleType ), handle, reinterpret_cast( &memoryWin32HandleProperties ) ) ); - return createResultValue( result, memoryWin32HandleProperties, "vk::Device::getMemoryWin32HandlePropertiesKHR" ); + return createResultValue( result, memoryWin32HandleProperties, "VULKAN_HPP_NAMESPACE::Device::getMemoryWin32HandlePropertiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -27590,7 +29865,7 @@ namespace vk { int fd; Result result = static_cast( vkGetMemoryFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); - return createResultValue( result, fd, "vk::Device::getMemoryFdKHR" ); + return createResultValue( result, fd, "VULKAN_HPP_NAMESPACE::Device::getMemoryFdKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27603,7 +29878,7 @@ namespace vk { MemoryFdPropertiesKHR memoryFdProperties; Result result = static_cast( vkGetMemoryFdPropertiesKHR( m_device, static_cast( handleType ), fd, reinterpret_cast( &memoryFdProperties ) ) ); - return createResultValue( result, memoryFdProperties, "vk::Device::getMemoryFdPropertiesKHR" ); + return createResultValue( result, memoryFdProperties, "VULKAN_HPP_NAMESPACE::Device::getMemoryFdPropertiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27617,7 +29892,7 @@ namespace vk { HANDLE handle; Result result = static_cast( vkGetSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); - return createResultValue( result, handle, "vk::Device::getSemaphoreWin32HandleKHR" ); + return createResultValue( result, handle, "VULKAN_HPP_NAMESPACE::Device::getSemaphoreWin32HandleKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -27631,7 +29906,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::importSemaphoreWin32HandleKHR( const ImportSemaphoreWin32HandleInfoKHR & importSemaphoreWin32HandleInfo ) const { Result result = static_cast( vkImportSemaphoreWin32HandleKHR( m_device, reinterpret_cast( &importSemaphoreWin32HandleInfo ) ) ); - return createResultValue( result, "vk::Device::importSemaphoreWin32HandleKHR" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::importSemaphoreWin32HandleKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -27645,7 +29920,7 @@ namespace vk { int fd; Result result = static_cast( vkGetSemaphoreFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); - return createResultValue( result, fd, "vk::Device::getSemaphoreFdKHR" ); + return createResultValue( result, fd, "VULKAN_HPP_NAMESPACE::Device::getSemaphoreFdKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27657,7 +29932,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::importSemaphoreFdKHR( const ImportSemaphoreFdInfoKHR & importSemaphoreFdInfo ) const { Result result = static_cast( vkImportSemaphoreFdKHR( m_device, reinterpret_cast( &importSemaphoreFdInfo ) ) ); - return createResultValue( result, "vk::Device::importSemaphoreFdKHR" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::importSemaphoreFdKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27671,7 +29946,7 @@ namespace vk { HANDLE handle; Result result = static_cast( vkGetFenceWin32HandleKHR( m_device, reinterpret_cast( &getWin32HandleInfo ), &handle ) ); - return createResultValue( result, handle, "vk::Device::getFenceWin32HandleKHR" ); + return createResultValue( result, handle, "VULKAN_HPP_NAMESPACE::Device::getFenceWin32HandleKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -27685,7 +29960,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::importFenceWin32HandleKHR( const ImportFenceWin32HandleInfoKHR & importFenceWin32HandleInfo ) const { Result result = static_cast( vkImportFenceWin32HandleKHR( m_device, reinterpret_cast( &importFenceWin32HandleInfo ) ) ); - return createResultValue( result, "vk::Device::importFenceWin32HandleKHR" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::importFenceWin32HandleKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -27699,7 +29974,7 @@ namespace vk { int fd; Result result = static_cast( vkGetFenceFdKHR( m_device, reinterpret_cast( &getFdInfo ), &fd ) ); - return createResultValue( result, fd, "vk::Device::getFenceFdKHR" ); + return createResultValue( result, fd, "VULKAN_HPP_NAMESPACE::Device::getFenceFdKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27711,7 +29986,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::importFenceFdKHR( const ImportFenceFdInfoKHR & importFenceFdInfo ) const { Result result = static_cast( vkImportFenceFdKHR( m_device, reinterpret_cast( &importFenceFdInfo ) ) ); - return createResultValue( result, "vk::Device::importFenceFdKHR" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::importFenceFdKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27723,7 +29998,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type Device::displayPowerControlEXT( DisplayKHR display, const DisplayPowerInfoEXT & displayPowerInfo ) const { Result result = static_cast( vkDisplayPowerControlEXT( m_device, static_cast( display ), reinterpret_cast( &displayPowerInfo ) ) ); - return createResultValue( result, "vk::Device::displayPowerControlEXT" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::displayPowerControlEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27732,11 +30007,11 @@ namespace vk return static_cast( 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, const AllocationCallbacks & allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::registerEventEXT( const DeviceEventInfoEXT & deviceEventInfo, Optional allocator ) const { Fence fence; - Result result = static_cast( vkRegisterDeviceEventEXT( m_device, reinterpret_cast( &deviceEventInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &fence ) ) ); - return createResultValue( result, fence, "vk::Device::registerEventEXT" ); + 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" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27745,11 +30020,11 @@ namespace vk return static_cast( 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, const AllocationCallbacks & allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::registerDisplayEventEXT( DisplayKHR display, const DisplayEventInfoEXT & displayEventInfo, Optional allocator ) const { Fence fence; - Result result = static_cast( vkRegisterDisplayEventEXT( m_device, static_cast( display ), reinterpret_cast( &displayEventInfo ), reinterpret_cast( &allocator ), reinterpret_cast( &fence ) ) ); - return createResultValue( result, fence, "vk::Device::registerDisplayEventEXT" ); + 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" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27762,7 +30037,7 @@ namespace vk { uint64_t counterValue; Result result = static_cast( vkGetSwapchainCounterEXT( m_device, static_cast( swapchain ), static_cast( counter ), &counterValue ) ); - return createResultValue( result, counterValue, "vk::Device::getSwapchainCounterEXT", { Result::eSuccess, Result::eErrorDeviceLost, Result::eErrorOutOfDateKHR } ); + return createResultValue( result, counterValue, "VULKAN_HPP_NAMESPACE::Device::getSwapchainCounterEXT", { Result::eSuccess, Result::eErrorDeviceLost, Result::eErrorOutOfDateKHR } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27779,27 +30054,27 @@ namespace vk } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::bindBufferMemory2KHX( uint32_t bindInfoCount, const BindBufferMemoryInfoKHX* pBindInfos ) const + VULKAN_HPP_INLINE Result Device::bindBufferMemory2KHR( uint32_t bindInfoCount, const BindBufferMemoryInfoKHR* pBindInfos ) const { - return static_cast( vkBindBufferMemory2KHX( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); + return static_cast( vkBindBufferMemory2KHR( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::bindBufferMemory2KHX( ArrayProxy bindInfos ) const + VULKAN_HPP_INLINE ResultValueType::type Device::bindBufferMemory2KHR( ArrayProxy bindInfos ) const { - Result result = static_cast( vkBindBufferMemory2KHX( m_device, bindInfos.size() , reinterpret_cast( bindInfos.data() ) ) ); - return createResultValue( result, "vk::Device::bindBufferMemory2KHX" ); + Result result = static_cast( vkBindBufferMemory2KHR( m_device, bindInfos.size() , reinterpret_cast( bindInfos.data() ) ) ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::bindBufferMemory2KHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ - VULKAN_HPP_INLINE Result Device::bindImageMemory2KHX( uint32_t bindInfoCount, const BindImageMemoryInfoKHX* pBindInfos ) const + VULKAN_HPP_INLINE Result Device::bindImageMemory2KHR( uint32_t bindInfoCount, const BindImageMemoryInfoKHR* pBindInfos ) const { - return static_cast( vkBindImageMemory2KHX( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); + return static_cast( vkBindImageMemory2KHR( m_device, bindInfoCount, reinterpret_cast( pBindInfos ) ) ); } #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE - VULKAN_HPP_INLINE ResultValueType::type Device::bindImageMemory2KHX( ArrayProxy bindInfos ) const + VULKAN_HPP_INLINE ResultValueType::type Device::bindImageMemory2KHR( ArrayProxy bindInfos ) const { - Result result = static_cast( vkBindImageMemory2KHX( m_device, bindInfos.size() , reinterpret_cast( bindInfos.data() ) ) ); - return createResultValue( result, "vk::Device::bindImageMemory2KHX" ); + Result result = static_cast( vkBindImageMemory2KHR( m_device, bindInfos.size() , reinterpret_cast( bindInfos.data() ) ) ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::bindImageMemory2KHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27812,7 +30087,7 @@ namespace vk { DeviceGroupPresentCapabilitiesKHX deviceGroupPresentCapabilities; Result result = static_cast( vkGetDeviceGroupPresentCapabilitiesKHX( m_device, reinterpret_cast( &deviceGroupPresentCapabilities ) ) ); - return createResultValue( result, deviceGroupPresentCapabilities, "vk::Device::getGroupPresentCapabilitiesKHX" ); + return createResultValue( result, deviceGroupPresentCapabilities, "VULKAN_HPP_NAMESPACE::Device::getGroupPresentCapabilitiesKHX" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27825,7 +30100,7 @@ namespace vk { DeviceGroupPresentModeFlagsKHX modes; Result result = static_cast( vkGetDeviceGroupSurfacePresentModesKHX( m_device, static_cast( surface ), reinterpret_cast( &modes ) ) ); - return createResultValue( result, modes, "vk::Device::getGroupSurfacePresentModesKHX" ); + return createResultValue( result, modes, "VULKAN_HPP_NAMESPACE::Device::getGroupSurfacePresentModesKHX" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27838,7 +30113,7 @@ namespace vk { uint32_t imageIndex; Result result = static_cast( vkAcquireNextImage2KHX( m_device, reinterpret_cast( &acquireInfo ), &imageIndex ) ); - return createResultValue( result, imageIndex, "vk::Device::acquireNextImage2KHX", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); + return createResultValue( result, imageIndex, "VULKAN_HPP_NAMESPACE::Device::acquireNextImage2KHX", { Result::eSuccess, Result::eTimeout, Result::eNotReady, Result::eSuboptimalKHR } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27851,13 +30126,16 @@ namespace vk { DescriptorUpdateTemplateKHR descriptorUpdateTemplate; Result result = static_cast( vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); - return createResultValue( result, descriptorUpdateTemplate, "vk::Device::createDescriptorUpdateTemplateKHR" ); + return createResultValue( result, descriptorUpdateTemplate, "VULKAN_HPP_NAMESPACE::Device::createDescriptorUpdateTemplateKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDescriptorUpdateTemplateKHR Device::createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Device::createDescriptorUpdateTemplateKHRUnique( const DescriptorUpdateTemplateCreateInfoKHR & createInfo, Optional allocator ) const { + DescriptorUpdateTemplateKHR descriptorUpdateTemplate; + Result result = static_cast( vkCreateDescriptorUpdateTemplateKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &descriptorUpdateTemplate ) ) ); + DescriptorUpdateTemplateKHRDeleter deleter( *this, allocator ); - return UniqueDescriptorUpdateTemplateKHR( createDescriptorUpdateTemplateKHR( createInfo, allocator ), deleter ); + return createResultValue( result, descriptorUpdateTemplate, "VULKAN_HPP_NAMESPACE::Device::createDescriptorUpdateTemplateKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27890,7 +30168,7 @@ namespace vk #else if ( swapchains.size() != metadata.size() ) { - throw LogicError( "vk::Device::setHdrMetadataEXT: swapchains.size() != metadata.size()" ); + throw LogicError( "VULKAN_HPP_NAMESPACE::Device::setHdrMetadataEXT: swapchains.size() != metadata.size()" ); } #endif // VULKAN_HPP_NO_EXCEPTIONS vkSetHdrMetadataEXT( m_device, swapchains.size() , reinterpret_cast( swapchains.data() ), reinterpret_cast( metadata.data() ) ); @@ -27906,7 +30184,7 @@ namespace vk VULKAN_HPP_INLINE Result Device::getSwapchainStatusKHR( SwapchainKHR swapchain ) const { Result result = static_cast( vkGetSwapchainStatusKHR( m_device, static_cast( swapchain ) ) ); - return createResultValue( result, "vk::Device::getSwapchainStatusKHR", { Result::eSuccess, Result::eSuboptimalKHR } ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::Device::getSwapchainStatusKHR", { Result::eSuccess, Result::eSuboptimalKHR } ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27919,7 +30197,7 @@ namespace vk { RefreshCycleDurationGOOGLE displayTimingProperties; Result result = static_cast( vkGetRefreshCycleDurationGOOGLE( m_device, static_cast( swapchain ), reinterpret_cast( &displayTimingProperties ) ) ); - return createResultValue( result, displayTimingProperties, "vk::Device::getRefreshCycleDurationGOOGLE" ); + return createResultValue( result, displayTimingProperties, "VULKAN_HPP_NAMESPACE::Device::getRefreshCycleDurationGOOGLE" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27933,13 +30211,19 @@ namespace vk { 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, "vk::Device::getPastPresentationTimingGOOGLE" ); + result = static_cast( vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, nullptr ) ); + if ( ( result == Result::eSuccess ) && presentationTimingCount ) + { + presentationTimings.resize( presentationTimingCount ); + result = static_cast( vkGetPastPresentationTimingGOOGLE( m_device, static_cast( swapchain ), &presentationTimingCount, reinterpret_cast( presentationTimings.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( presentationTimingCount <= presentationTimings.size() ); + presentationTimings.resize( presentationTimingCount ); + return createResultValue( result, presentationTimings, "VULKAN_HPP_NAMESPACE::Device::getPastPresentationTimingGOOGLE" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -27954,6 +30238,14 @@ namespace vk vkGetBufferMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } + template + VULKAN_HPP_INLINE StructureChain Device::getBufferMemoryRequirements2KHR( const BufferMemoryRequirementsInfo2KHR & info ) const + { + StructureChain structureChain; + MemoryRequirements2KHR& memoryRequirements = structureChain.template get(); + 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 @@ -27967,6 +30259,14 @@ namespace vk vkGetImageMemoryRequirements2KHR( m_device, reinterpret_cast( &info ), reinterpret_cast( &memoryRequirements ) ); return memoryRequirements; } + template + VULKAN_HPP_INLINE StructureChain Device::getImageMemoryRequirements2KHR( const ImageMemoryRequirementsInfo2KHR & info ) const + { + StructureChain structureChain; + MemoryRequirements2KHR& memoryRequirements = structureChain.template get(); + 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 @@ -27986,9 +30286,155 @@ namespace vk } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + VULKAN_HPP_INLINE Result Device::createSamplerYcbcrConversionKHR( const SamplerYcbcrConversionCreateInfoKHR* pCreateInfo, const AllocationCallbacks* pAllocator, SamplerYcbcrConversionKHR* pYcbcrConversion ) const + { + return static_cast( 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 + { + 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" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE ResultValueType::type Device::createSamplerYcbcrConversionKHRUnique( const SamplerYcbcrConversionCreateInfoKHR & createInfo, Optional allocator ) const + { + SamplerYcbcrConversionKHR ycbcrConversion; + Result result = static_cast( vkCreateSamplerYcbcrConversionKHR( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &ycbcrConversion ) ) ); + + SamplerYcbcrConversionKHRDeleter deleter( *this, allocator ); + return createResultValue( result, ycbcrConversion, "VULKAN_HPP_NAMESPACE::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 + { + 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 + { + 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 + { + return static_cast( 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 + { + 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" ); + } +#ifndef VULKAN_HPP_NO_SMART_HANDLE + VULKAN_HPP_INLINE ResultValueType::type Device::createValidationCacheEXTUnique( const ValidationCacheCreateInfoEXT & createInfo, Optional allocator ) const + { + ValidationCacheEXT validationCache; + Result result = static_cast( vkCreateValidationCacheEXT( m_device, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &validationCache ) ) ); + + ValidationCacheEXTDeleter deleter( *this, allocator ); + return createResultValue( result, validationCache, "VULKAN_HPP_NAMESPACE::Device::createValidationCacheEXTUnique", deleter ); + } +#endif /*VULKAN_HPP_NO_SMART_HANDLE*/ +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( ValidationCacheEXT validationCache, const AllocationCallbacks* pAllocator ) const + { + vkDestroyValidationCacheEXT( m_device, static_cast( validationCache ), reinterpret_cast( pAllocator ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE void Device::destroyValidationCacheEXT( ValidationCacheEXT validationCache, Optional allocator ) const + { + vkDestroyValidationCacheEXT( m_device, static_cast( validationCache ), reinterpret_cast( static_cast( allocator ) ) ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::getValidationCacheDataEXT( ValidationCacheEXT validationCache, size_t* pDataSize, void* pData ) const + { + return static_cast( vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), pDataSize, pData ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + template + VULKAN_HPP_INLINE typename ResultValueType>::type Device::getValidationCacheDataEXT( ValidationCacheEXT validationCache ) const + { + std::vector data; + size_t dataSize; + Result result; + do + { + result = static_cast( vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, nullptr ) ); + if ( ( result == Result::eSuccess ) && dataSize ) + { + data.resize( dataSize ); + result = static_cast( vkGetValidationCacheDataEXT( m_device, static_cast( validationCache ), &dataSize, reinterpret_cast( data.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( dataSize <= data.size() ); + data.resize( dataSize ); + return createResultValue( result, data, "VULKAN_HPP_NAMESPACE::Device::getValidationCacheDataEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::mergeValidationCachesEXT( ValidationCacheEXT dstCache, uint32_t srcCacheCount, const ValidationCacheEXT* pSrcCaches ) const + { + return static_cast( vkMergeValidationCachesEXT( m_device, static_cast( dstCache ), srcCacheCount, reinterpret_cast( pSrcCaches ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::mergeValidationCachesEXT( ValidationCacheEXT dstCache, ArrayProxy srcCaches ) 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" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo ) const + { + return static_cast( 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::getShaderInfoAMD( Pipeline pipeline, ShaderStageFlagBits shaderStage, ShaderInfoTypeAMD infoType ) const + { + std::vector info; + size_t infoSize; + Result result; + do + { + result = static_cast( vkGetShaderInfoAMD( m_device, static_cast( pipeline ), static_cast( shaderStage ), static_cast( infoType ), &infoSize, nullptr ) ); + if ( ( result == Result::eSuccess ) && infoSize ) + { + info.resize( infoSize ); + result = static_cast( vkGetShaderInfoAMD( m_device, static_cast( pipeline ), static_cast( shaderStage ), static_cast( infoType ), &infoSize, reinterpret_cast( info.data() ) ) ); + } + } while ( result == Result::eIncomplete ); + assert( infoSize <= info.size() ); + info.resize( infoSize ); + return createResultValue( result, info, "VULKAN_HPP_NAMESPACE::Device::getShaderInfoAMD" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE Result Device::getMemoryHostPointerPropertiesEXT( ExternalMemoryHandleTypeFlagBitsKHR handleType, const void* pHostPointer, MemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties ) const + { + return static_cast( vkGetMemoryHostPointerPropertiesEXT( m_device, static_cast( handleType ), pHostPointer, reinterpret_cast( pMemoryHostPointerProperties ) ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE ResultValueType::type Device::getMemoryHostPointerPropertiesEXT( ExternalMemoryHandleTypeFlagBitsKHR handleType, const void* pHostPointer ) const + { + MemoryHostPointerPropertiesEXT memoryHostPointerProperties; + Result result = static_cast( vkGetMemoryHostPointerPropertiesEXT( m_device, static_cast( handleType ), pHostPointer, reinterpret_cast( &memoryHostPointerProperties ) ) ); + return createResultValue( result, memoryHostPointerProperties, "VULKAN_HPP_NAMESPACE::Device::getMemoryHostPointerPropertiesEXT" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + #ifndef VULKAN_HPP_NO_SMART_HANDLE class DeviceDeleter; - using UniqueDevice = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = DeviceDeleter; }; + using UniqueDevice = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ class PhysicalDevice @@ -28003,7 +30449,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT PhysicalDevice( VkPhysicalDevice physicalDevice ) - : m_physicalDevice( physicalDevice ) + : m_physicalDevice( physicalDevice ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -28070,7 +30516,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createDevice( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDevice createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28193,11 +30639,15 @@ namespace vk void getFeatures2KHR( PhysicalDeviceFeatures2KHR* pFeatures ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE PhysicalDeviceFeatures2KHR getFeatures2KHR() const; + template + StructureChain getFeatures2KHR() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ void getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE PhysicalDeviceProperties2KHR getProperties2KHR() const; + template + StructureChain getProperties2KHR() const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ void getFormatProperties2KHR( Format format, FormatProperties2KHR* pFormatProperties ) const; @@ -28208,6 +30658,8 @@ namespace vk Result getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, ImageFormatProperties2KHR* pImageFormatProperties ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const; + template + typename ResultValueType>::type getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ void getQueueFamilyProperties2KHR( uint32_t* pQueueFamilyPropertyCount, QueueFamilyProperties2KHR* pQueueFamilyProperties ) const; @@ -28273,9 +30725,16 @@ namespace vk typename ResultValueType>::type getPresentRectanglesKHX( SurfaceKHR surface ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + void getMultisamplePropertiesEXT( SampleCountFlagBits samples, MultisamplePropertiesEXT* pMultisampleProperties ) const; +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + MultisamplePropertiesEXT getMultisamplePropertiesEXT( SampleCountFlagBits samples ) const; +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + Result getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, SurfaceCapabilities2KHR* pSurfaceCapabilities ) const; #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; + template + typename ResultValueType>::type getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) const; #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ Result getSurfaceFormats2KHR( const PhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, SurfaceFormat2KHR* pSurfaceFormats ) const; @@ -28315,7 +30774,10 @@ namespace vk : m_allocator( allocator ) {} - void operator()( Device device ) + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( Device device ) { device.destroy( m_allocator ); } @@ -28403,7 +30865,7 @@ namespace vk { 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, "vk::PhysicalDevice::getImageFormatProperties" ); + return createResultValue( result, imageFormatProperties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getImageFormatProperties" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28416,13 +30878,16 @@ namespace vk { Device device; Result result = static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &device ) ) ); - return createResultValue( result, device, "vk::PhysicalDevice::createDevice" ); + return createResultValue( result, device, "VULKAN_HPP_NAMESPACE::PhysicalDevice::createDevice" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDevice PhysicalDevice::createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::createDeviceUnique( const DeviceCreateInfo & createInfo, Optional allocator ) const { + Device device; + Result result = static_cast( vkCreateDevice( m_physicalDevice, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &device ) ) ); + DeviceDeleter deleter( allocator ); - return UniqueDevice( createDevice( createInfo, allocator ), deleter ); + return createResultValue( result, device, "VULKAN_HPP_NAMESPACE::PhysicalDevice::createDeviceUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28449,7 +30914,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceLayerProperties" ); + return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::enumerateDeviceLayerProperties" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28475,7 +30940,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::enumerateDeviceExtensionProperties" ); + return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::enumerateDeviceExtensionProperties" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28518,7 +30983,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPropertiesKHR" ); + return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getDisplayPropertiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28544,7 +31009,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayPlanePropertiesKHR" ); + return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getDisplayPlanePropertiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28570,7 +31035,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( displayCount <= displays.size() ); displays.resize( displayCount ); - return createResultValue( result, displays, "vk::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); + return createResultValue( result, displays, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getDisplayPlaneSupportedDisplaysKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28596,7 +31061,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( propertyCount <= properties.size() ); properties.resize( propertyCount ); - return createResultValue( result, properties, "vk::PhysicalDevice::getDisplayModePropertiesKHR" ); + return createResultValue( result, properties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getDisplayModePropertiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28609,7 +31074,7 @@ namespace vk { 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, "vk::PhysicalDevice::createDisplayModeKHR" ); + return createResultValue( result, mode, "VULKAN_HPP_NAMESPACE::PhysicalDevice::createDisplayModeKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28622,7 +31087,7 @@ namespace vk { DisplayPlaneCapabilitiesKHR capabilities; Result result = static_cast( vkGetDisplayPlaneCapabilitiesKHR( m_physicalDevice, static_cast( mode ), planeIndex, reinterpret_cast( &capabilities ) ) ); - return createResultValue( result, capabilities, "vk::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); + return createResultValue( result, capabilities, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getDisplayPlaneCapabilitiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28648,7 +31113,7 @@ namespace vk { Bool32 supported; Result result = static_cast( vkGetPhysicalDeviceSurfaceSupportKHR( m_physicalDevice, queueFamilyIndex, static_cast( surface ), &supported ) ); - return createResultValue( result, supported, "vk::PhysicalDevice::getSurfaceSupportKHR" ); + return createResultValue( result, supported, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfaceSupportKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28661,7 +31126,7 @@ namespace vk { SurfaceCapabilitiesKHR surfaceCapabilities; Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilitiesKHR( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); - return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilitiesKHR" ); + return createResultValue( result, surfaceCapabilities, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfaceCapabilitiesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28687,7 +31152,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( surfaceFormatCount <= surfaceFormats.size() ); surfaceFormats.resize( surfaceFormatCount ); - return createResultValue( result, surfaceFormats, "vk::PhysicalDevice::getSurfaceFormatsKHR" ); + return createResultValue( result, surfaceFormats, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfaceFormatsKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28713,7 +31178,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( presentModeCount <= presentModes.size() ); presentModes.resize( presentModeCount ); - return createResultValue( result, presentModes, "vk::PhysicalDevice::getSurfacePresentModesKHR" ); + return createResultValue( result, presentModes, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfacePresentModesKHR" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28772,7 +31237,7 @@ namespace vk { 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, "vk::PhysicalDevice::getExternalImageFormatPropertiesNV" ); + return createResultValue( result, externalImageFormatProperties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getExternalImageFormatPropertiesNV" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28800,6 +31265,14 @@ namespace vk vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); return features; } + template + VULKAN_HPP_INLINE StructureChain PhysicalDevice::getFeatures2KHR() const + { + StructureChain structureChain; + PhysicalDeviceFeatures2KHR& features = structureChain.template get(); + vkGetPhysicalDeviceFeatures2KHR( m_physicalDevice, reinterpret_cast( &features ) ); + return structureChain; + } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ VULKAN_HPP_INLINE void PhysicalDevice::getProperties2KHR( PhysicalDeviceProperties2KHR* pProperties ) const @@ -28813,6 +31286,14 @@ namespace vk vkGetPhysicalDeviceProperties2KHR( m_physicalDevice, reinterpret_cast( &properties ) ); return properties; } + template + VULKAN_HPP_INLINE StructureChain PhysicalDevice::getProperties2KHR() const + { + StructureChain structureChain; + PhysicalDeviceProperties2KHR& properties = structureChain.template get(); + 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 @@ -28837,7 +31318,15 @@ namespace vk { ImageFormatProperties2KHR imageFormatProperties; Result result = static_cast( vkGetPhysicalDeviceImageFormatProperties2KHR( m_physicalDevice, reinterpret_cast( &imageFormatInfo ), reinterpret_cast( &imageFormatProperties ) ) ); - return createResultValue( result, imageFormatProperties, "vk::PhysicalDevice::getImageFormatProperties2KHR" ); + return createResultValue( result, imageFormatProperties, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getImageFormatProperties2KHR" ); + } + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getImageFormatProperties2KHR( const PhysicalDeviceImageFormatInfo2KHR & imageFormatInfo ) 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" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28936,7 +31425,7 @@ namespace vk VULKAN_HPP_INLINE ResultValueType::type PhysicalDevice::releaseDisplayEXT( DisplayKHR display ) const { Result result = static_cast( vkReleaseDisplayEXT( m_physicalDevice, static_cast( display ) ) ); - return createResultValue( result, "vk::PhysicalDevice::releaseDisplayEXT" ); + return createResultValue( result, "VULKAN_HPP_NAMESPACE::PhysicalDevice::releaseDisplayEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -28950,7 +31439,7 @@ namespace vk { Display dpy; Result result = static_cast( vkAcquireXlibDisplayEXT( m_physicalDevice, &dpy, static_cast( display ) ) ); - return createResultValue( result, dpy, "vk::PhysicalDevice::acquireXlibDisplayEXT" ); + return createResultValue( result, dpy, "VULKAN_HPP_NAMESPACE::PhysicalDevice::acquireXlibDisplayEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ @@ -28965,7 +31454,7 @@ namespace vk { DisplayKHR display; Result result = static_cast( vkGetRandROutputDisplayEXT( m_physicalDevice, &dpy, rrOutput, reinterpret_cast( &display ) ) ); - return createResultValue( result, display, "vk::PhysicalDevice::getRandROutputDisplayEXT" ); + return createResultValue( result, display, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getRandROutputDisplayEXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_XRANDR_EXT*/ @@ -28979,7 +31468,7 @@ namespace vk { SurfaceCapabilities2EXT surfaceCapabilities; Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilities2EXT( m_physicalDevice, static_cast( surface ), reinterpret_cast( &surfaceCapabilities ) ) ); - return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilities2EXT" ); + return createResultValue( result, surfaceCapabilities, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfaceCapabilities2EXT" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29005,7 +31494,20 @@ namespace vk } while ( result == Result::eIncomplete ); assert( rectCount <= rects.size() ); rects.resize( rectCount ); - return createResultValue( result, rects, "vk::PhysicalDevice::getPresentRectanglesKHX" ); + return createResultValue( result, rects, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getPresentRectanglesKHX" ); + } +#endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + + VULKAN_HPP_INLINE void PhysicalDevice::getMultisamplePropertiesEXT( SampleCountFlagBits samples, MultisamplePropertiesEXT* pMultisampleProperties ) const + { + vkGetPhysicalDeviceMultisamplePropertiesEXT( m_physicalDevice, static_cast( samples ), reinterpret_cast( pMultisampleProperties ) ); + } +#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE + VULKAN_HPP_INLINE MultisamplePropertiesEXT PhysicalDevice::getMultisamplePropertiesEXT( SampleCountFlagBits samples ) const + { + MultisamplePropertiesEXT multisampleProperties; + vkGetPhysicalDeviceMultisamplePropertiesEXT( m_physicalDevice, static_cast( samples ), reinterpret_cast( &multisampleProperties ) ); + return multisampleProperties; } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29018,7 +31520,15 @@ namespace vk { SurfaceCapabilities2KHR surfaceCapabilities; Result result = static_cast( vkGetPhysicalDeviceSurfaceCapabilities2KHR( m_physicalDevice, reinterpret_cast( &surfaceInfo ), reinterpret_cast( &surfaceCapabilities ) ) ); - return createResultValue( result, surfaceCapabilities, "vk::PhysicalDevice::getSurfaceCapabilities2KHR" ); + return createResultValue( result, surfaceCapabilities, "VULKAN_HPP_NAMESPACE::PhysicalDevice::getSurfaceCapabilities2KHR" ); + } + template + VULKAN_HPP_INLINE typename ResultValueType>::type PhysicalDevice::getSurfaceCapabilities2KHR( const PhysicalDeviceSurfaceInfo2KHR & surfaceInfo ) 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" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29044,16 +31554,14 @@ namespace vk } while ( result == Result::eIncomplete ); assert( surfaceFormatCount <= surfaceFormats.size() ); surfaceFormats.resize( surfaceFormatCount ); - return createResultValue( result, surfaceFormats, "vk::PhysicalDevice::getSurfaceFormats2KHR" ); + return createResultValue( result, surfaceFormats, "VULKAN_HPP_NAMESPACE::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_ ) @@ -29169,10 +31677,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eCmdProcessCommandsInfoNVX; public: - const void* pNext; + const void* pNext = nullptr; ObjectTableNVX objectTable; IndirectCommandsLayoutNVX indirectCommandsLayout; uint32_t indirectCommandsTokenCount; @@ -29208,10 +31716,10 @@ namespace vk } 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; @@ -29220,9 +31728,11 @@ namespace vk #ifndef VULKAN_HPP_NO_SMART_HANDLE class DebugReportCallbackEXTDeleter; - using UniqueDebugReportCallbackEXT = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = DebugReportCallbackEXTDeleter; }; + using UniqueDebugReportCallbackEXT = UniqueHandle; class SurfaceKHRDeleter; - using UniqueSurfaceKHR = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = SurfaceKHRDeleter; }; + using UniqueSurfaceKHR = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ class Instance @@ -29237,7 +31747,7 @@ namespace vk {} VULKAN_HPP_TYPESAFE_EXPLICIT Instance( VkInstance instance ) - : m_instance( instance ) + : m_instance( instance ) {} #if defined(VULKAN_HPP_TYPESAFE_CONVERSION) @@ -29290,7 +31800,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createAndroidSurfaceKHR( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_ANDROID_KHR*/ @@ -29299,7 +31809,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createDisplayPlaneSurfaceKHR( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29308,7 +31818,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createMirSurfaceKHR( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_MIR_KHR*/ @@ -29323,7 +31833,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createViSurfaceNN( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_VI_NN*/ @@ -29333,7 +31843,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createWaylandSurfaceKHR( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WAYLAND_KHR*/ @@ -29343,7 +31853,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createWin32SurfaceKHR( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_WIN32_KHR*/ @@ -29353,7 +31863,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createXlibSurfaceKHR( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XLIB_KHR*/ @@ -29363,7 +31873,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createXcbSurfaceKHR( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_XCB_KHR*/ @@ -29372,7 +31882,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createDebugReportCallbackEXT( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueDebugReportCallbackEXT createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29397,7 +31907,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createIOSSurfaceMVK( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_IOS_MVK*/ @@ -29407,7 +31917,7 @@ namespace vk #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createMacOSSurfaceMVK( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueSurfaceKHR createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; + ResultValueType::type createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator = nullptr ) const; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ #endif /*VK_USE_PLATFORM_MACOS_MVK*/ @@ -29444,7 +31954,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( DebugReportCallbackEXT debugReportCallbackEXT ) + Instance getInstance() const { return m_instance; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( DebugReportCallbackEXT debugReportCallbackEXT ) { m_instance.destroyDebugReportCallbackEXT( debugReportCallbackEXT, m_allocator ); } @@ -29462,7 +31976,11 @@ namespace vk , m_allocator( allocator ) {} - void operator()( SurfaceKHR surfaceKHR ) + Instance getInstance() const { return m_instance; } + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( SurfaceKHR surfaceKHR ) { m_instance.destroySurfaceKHR( surfaceKHR, m_allocator ); } @@ -29506,7 +32024,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( physicalDeviceCount <= physicalDevices.size() ); physicalDevices.resize( physicalDeviceCount ); - return createResultValue( result, physicalDevices, "vk::Instance::enumeratePhysicalDevices" ); + return createResultValue( result, physicalDevices, "VULKAN_HPP_NAMESPACE::Instance::enumeratePhysicalDevices" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29531,13 +32049,16 @@ namespace vk { SurfaceKHR surface; Result result = static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createAndroidSurfaceKHR" ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createAndroidSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createAndroidSurfaceKHRUnique( const AndroidSurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateAndroidSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createAndroidSurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createAndroidSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29552,13 +32073,16 @@ namespace vk { SurfaceKHR surface; Result result = static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createDisplayPlaneSurfaceKHR" ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createDisplayPlaneSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createDisplayPlaneSurfaceKHRUnique( const DisplaySurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateDisplayPlaneSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createDisplayPlaneSurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createDisplayPlaneSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29573,13 +32097,16 @@ namespace vk { SurfaceKHR surface; Result result = static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createMirSurfaceKHR" ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createMirSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createMirSurfaceKHRUnique( const MirSurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateMirSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createMirSurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createMirSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29606,13 +32133,16 @@ namespace vk { SurfaceKHR surface; Result result = static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createViSurfaceNN" ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createViSurfaceNN" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createViSurfaceNNUnique( const ViSurfaceCreateInfoNN & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateViSurfaceNN( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createViSurfaceNN( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createViSurfaceNNUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29628,13 +32158,16 @@ namespace vk { SurfaceKHR surface; Result result = static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createWaylandSurfaceKHR" ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createWaylandSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createWaylandSurfaceKHRUnique( const WaylandSurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateWaylandSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createWaylandSurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createWaylandSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29650,13 +32183,16 @@ namespace vk { SurfaceKHR surface; Result result = static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createWin32SurfaceKHR" ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createWin32SurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createWin32SurfaceKHRUnique( const Win32SurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateWin32SurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createWin32SurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createWin32SurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29672,13 +32208,16 @@ namespace vk { SurfaceKHR surface; Result result = static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createXlibSurfaceKHR" ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createXlibSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createXlibSurfaceKHRUnique( const XlibSurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateXlibSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createXlibSurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createXlibSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29694,13 +32233,16 @@ namespace vk { SurfaceKHR surface; Result result = static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createXcbSurfaceKHR" ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createXcbSurfaceKHR" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createXcbSurfaceKHRUnique( const XcbSurfaceCreateInfoKHR & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateXcbSurfaceKHR( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createXcbSurfaceKHR( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createXcbSurfaceKHRUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29715,13 +32257,16 @@ namespace vk { DebugReportCallbackEXT callback; Result result = static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &callback ) ) ); - return createResultValue( result, callback, "vk::Instance::createDebugReportCallbackEXT" ); + return createResultValue( result, callback, "VULKAN_HPP_NAMESPACE::Instance::createDebugReportCallbackEXT" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueDebugReportCallbackEXT Instance::createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createDebugReportCallbackEXTUnique( const DebugReportCallbackCreateInfoEXT & createInfo, Optional allocator ) const { + DebugReportCallbackEXT callback; + Result result = static_cast( vkCreateDebugReportCallbackEXT( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &callback ) ) ); + DebugReportCallbackEXTDeleter deleter( *this, allocator ); - return UniqueDebugReportCallbackEXT( createDebugReportCallbackEXT( createInfo, allocator ), deleter ); + return createResultValue( result, callback, "VULKAN_HPP_NAMESPACE::Instance::createDebugReportCallbackEXTUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29749,7 +32294,7 @@ namespace vk #else if ( layerPrefix.size() != message.size() ) { - throw LogicError( "vk::Instance::debugReportMessageEXT: layerPrefix.size() != message.size()" ); + throw LogicError( "VULKAN_HPP_NAMESPACE::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() ); @@ -29778,7 +32323,7 @@ namespace vk } while ( result == Result::eIncomplete ); assert( physicalDeviceGroupCount <= physicalDeviceGroupProperties.size() ); physicalDeviceGroupProperties.resize( physicalDeviceGroupCount ); - return createResultValue( result, physicalDeviceGroupProperties, "vk::Instance::enumeratePhysicalDeviceGroupsKHX" ); + return createResultValue( result, physicalDeviceGroupProperties, "VULKAN_HPP_NAMESPACE::Instance::enumeratePhysicalDeviceGroupsKHX" ); } #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29792,13 +32337,16 @@ namespace vk { SurfaceKHR surface; Result result = static_cast( vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createIOSSurfaceMVK" ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createIOSSurfaceMVK" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createIOSSurfaceMVKUnique( const IOSSurfaceCreateInfoMVK & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateIOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createIOSSurfaceMVK( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createIOSSurfaceMVKUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29814,13 +32362,16 @@ namespace vk { SurfaceKHR surface; Result result = static_cast( vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); - return createResultValue( result, surface, "vk::Instance::createMacOSSurfaceMVK" ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createMacOSSurfaceMVK" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueSurfaceKHR Instance::createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator ) const + VULKAN_HPP_INLINE ResultValueType::type Instance::createMacOSSurfaceMVKUnique( const MacOSSurfaceCreateInfoMVK & createInfo, Optional allocator ) const { + SurfaceKHR surface; + Result result = static_cast( vkCreateMacOSSurfaceMVK( m_instance, reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &surface ) ) ); + SurfaceKHRDeleter deleter( *this, allocator ); - return UniqueSurfaceKHR( createMacOSSurfaceMVK( createInfo, allocator ), deleter ); + return createResultValue( result, surface, "VULKAN_HPP_NAMESPACE::Instance::createMacOSSurfaceMVKUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29829,9 +32380,7 @@ namespace vk struct DeviceGroupDeviceCreateInfoKHX { DeviceGroupDeviceCreateInfoKHX( uint32_t physicalDeviceCount_ = 0, const PhysicalDevice* pPhysicalDevices_ = nullptr ) - : sType( StructureType::eDeviceGroupDeviceCreateInfoKHX ) - , pNext( nullptr ) - , physicalDeviceCount( physicalDeviceCount_ ) + : physicalDeviceCount( physicalDeviceCount_ ) , pPhysicalDevices( pPhysicalDevices_ ) { } @@ -29883,10 +32432,10 @@ namespace vk } private: - StructureType sType; + StructureType sType = StructureType::eDeviceGroupDeviceCreateInfoKHX; public: - const void* pNext; + const void* pNext = nullptr; uint32_t physicalDeviceCount; const PhysicalDevice* pPhysicalDevices; }; @@ -29894,14 +32443,15 @@ namespace vk #ifndef VULKAN_HPP_NO_SMART_HANDLE class InstanceDeleter; - using UniqueInstance = UniqueHandle; + template <> class UniqueHandleTraits {public: using deleter = InstanceDeleter; }; + using UniqueInstance = UniqueHandle; #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ Result createInstance( const InstanceCreateInfo* pCreateInfo, const AllocationCallbacks* pAllocator, Instance* pInstance ); #ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE ResultValueType::type createInstance( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ); #ifndef VULKAN_HPP_NO_SMART_HANDLE - UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ); + ResultValueType::type createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator = nullptr ); #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ @@ -29913,7 +32463,10 @@ namespace vk : m_allocator( allocator ) {} - void operator()( Instance instance ) + Optional getAllocator() const { return m_allocator; } + + protected: + void destroy( Instance instance ) { instance.destroy( m_allocator ); } @@ -29932,18 +32485,129 @@ namespace vk { Instance instance; Result result = static_cast( vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &instance ) ) ); - return createResultValue( result, instance, "vk::createInstance" ); + return createResultValue( result, instance, "VULKAN_HPP_NAMESPACE::createInstance" ); } #ifndef VULKAN_HPP_NO_SMART_HANDLE - VULKAN_HPP_INLINE UniqueInstance createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator ) + VULKAN_HPP_INLINE ResultValueType::type createInstanceUnique( const InstanceCreateInfo & createInfo, Optional allocator ) { + Instance instance; + Result result = static_cast( vkCreateInstance( reinterpret_cast( &createInfo ), reinterpret_cast( static_cast( allocator ) ), reinterpret_cast( &instance ) ) ); + InstanceDeleter deleter( allocator ); - return UniqueInstance( createInstance( createInfo, allocator ), deleter ); + return createResultValue( result, instance, "VULKAN_HPP_NAMESPACE::createInstanceUnique", deleter ); } #endif /*VULKAN_HPP_NO_SMART_HANDLE*/ #endif /*VULKAN_HPP_DISABLE_ENHANCED_MODE*/ + 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 <> struct isStructureChainValid{ enum { value = true }; }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + template <> struct isStructureChainValid{ enum { value = true }; }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + 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 <> struct isStructureChainValid{ enum { value = true }; }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + template <> struct isStructureChainValid{ enum { value = true }; }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + template <> struct isStructureChainValid{ enum { value = true }; }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + template <> struct isStructureChainValid{ enum { value = true }; }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ +#ifdef VK_USE_PLATFORM_WIN32_KHR + template <> struct isStructureChainValid{ enum { value = true }; }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + 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 <> struct isStructureChainValid{ enum { value = true }; }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + 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 <> struct isStructureChainValid{ enum { value = true }; }; +#endif /*VK_USE_PLATFORM_WIN32_KHR*/ + 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)"; @@ -30410,6 +33074,26 @@ namespace vk return "{}"; } + VULKAN_HPP_INLINE std::string to_string(ValidationCacheCreateFlagBitsEXT) + { + return "(void)"; + } + + VULKAN_HPP_INLINE std::string to_string(ValidationCacheCreateFlagsEXT) + { + 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) @@ -30425,6 +33109,8 @@ namespace vk case ImageLayout::ePreinitialized: return "Preinitialized"; case ImageLayout::ePresentSrcKHR: return "PresentSrcKHR"; case ImageLayout::eSharedPresentKHR: return "SharedPresentKHR"; + case ImageLayout::eDepthReadOnlyStencilAttachmentOptimalKHR: return "DepthReadOnlyStencilAttachmentOptimalKHR"; + case ImageLayout::eDepthAttachmentStencilReadOnlyOptimalKHR: return "DepthAttachmentStencilReadOnlyOptimalKHR"; default: return "invalid"; } } @@ -31076,6 +33762,40 @@ namespace vk case Format::ePvrtc14BppSrgbBlockIMG: return "Pvrtc14BppSrgbBlockIMG"; case Format::ePvrtc22BppSrgbBlockIMG: return "Pvrtc22BppSrgbBlockIMG"; case Format::ePvrtc24BppSrgbBlockIMG: return "Pvrtc24BppSrgbBlockIMG"; + case Format::eG8B8G8R8422UnormKHR: return "G8B8G8R8422UnormKHR"; + case Format::eB8G8R8G8422UnormKHR: return "B8G8R8G8422UnormKHR"; + case Format::eG8B8R83Plane420UnormKHR: return "G8B8R83Plane420UnormKHR"; + case Format::eG8B8R82Plane420UnormKHR: return "G8B8R82Plane420UnormKHR"; + case Format::eG8B8R83Plane422UnormKHR: return "G8B8R83Plane422UnormKHR"; + case Format::eG8B8R82Plane422UnormKHR: return "G8B8R82Plane422UnormKHR"; + case Format::eG8B8R83Plane444UnormKHR: return "G8B8R83Plane444UnormKHR"; + case Format::eR10X6UnormPack16KHR: return "R10X6UnormPack16KHR"; + case Format::eR10X6G10X6Unorm2Pack16KHR: return "R10X6G10X6Unorm2Pack16KHR"; + case Format::eR10X6G10X6B10X6A10X6Unorm4Pack16KHR: return "R10X6G10X6B10X6A10X6Unorm4Pack16KHR"; + case Format::eG10X6B10X6G10X6R10X6422Unorm4Pack16KHR: return "G10X6B10X6G10X6R10X6422Unorm4Pack16KHR"; + case Format::eB10X6G10X6R10X6G10X6422Unorm4Pack16KHR: return "B10X6G10X6R10X6G10X6422Unorm4Pack16KHR"; + case Format::eG10X6B10X6R10X63Plane420Unorm3Pack16KHR: return "G10X6B10X6R10X63Plane420Unorm3Pack16KHR"; + case Format::eG10X6B10X6R10X62Plane420Unorm3Pack16KHR: return "G10X6B10X6R10X62Plane420Unorm3Pack16KHR"; + case Format::eG10X6B10X6R10X63Plane422Unorm3Pack16KHR: return "G10X6B10X6R10X63Plane422Unorm3Pack16KHR"; + case Format::eG10X6B10X6R10X62Plane422Unorm3Pack16KHR: return "G10X6B10X6R10X62Plane422Unorm3Pack16KHR"; + case Format::eG10X6B10X6R10X63Plane444Unorm3Pack16KHR: return "G10X6B10X6R10X63Plane444Unorm3Pack16KHR"; + case Format::eR12X4UnormPack16KHR: return "R12X4UnormPack16KHR"; + case Format::eR12X4G12X4Unorm2Pack16KHR: return "R12X4G12X4Unorm2Pack16KHR"; + case Format::eR12X4G12X4B12X4A12X4Unorm4Pack16KHR: return "R12X4G12X4B12X4A12X4Unorm4Pack16KHR"; + case Format::eG12X4B12X4G12X4R12X4422Unorm4Pack16KHR: return "G12X4B12X4G12X4R12X4422Unorm4Pack16KHR"; + case Format::eB12X4G12X4R12X4G12X4422Unorm4Pack16KHR: return "B12X4G12X4R12X4G12X4422Unorm4Pack16KHR"; + case Format::eG12X4B12X4R12X43Plane420Unorm3Pack16KHR: return "G12X4B12X4R12X43Plane420Unorm3Pack16KHR"; + case Format::eG12X4B12X4R12X42Plane420Unorm3Pack16KHR: return "G12X4B12X4R12X42Plane420Unorm3Pack16KHR"; + case Format::eG12X4B12X4R12X43Plane422Unorm3Pack16KHR: return "G12X4B12X4R12X43Plane422Unorm3Pack16KHR"; + case Format::eG12X4B12X4R12X42Plane422Unorm3Pack16KHR: return "G12X4B12X4R12X42Plane422Unorm3Pack16KHR"; + case Format::eG12X4B12X4R12X43Plane444Unorm3Pack16KHR: return "G12X4B12X4R12X43Plane444Unorm3Pack16KHR"; + case Format::eG16B16G16R16422UnormKHR: return "G16B16G16R16422UnormKHR"; + case Format::eB16G16R16G16422UnormKHR: return "B16G16R16G16422UnormKHR"; + case Format::eG16B16R163Plane420UnormKHR: return "G16B16R163Plane420UnormKHR"; + case Format::eG16B16R162Plane420UnormKHR: return "G16B16R162Plane420UnormKHR"; + case Format::eG16B16R163Plane422UnormKHR: return "G16B16R163Plane422UnormKHR"; + case Format::eG16B16R162Plane422UnormKHR: return "G16B16R162Plane422UnormKHR"; + case Format::eG16B16R163Plane444UnormKHR: return "G16B16R163Plane444UnormKHR"; default: return "invalid"; } } @@ -31171,16 +33891,16 @@ namespace vk case StructureType::eSparseImageFormatProperties2KHR: return "SparseImageFormatProperties2KHR"; case StructureType::ePhysicalDeviceSparseImageFormatInfo2KHR: return "PhysicalDeviceSparseImageFormatInfo2KHR"; case StructureType::eMemoryAllocateFlagsInfoKHX: return "MemoryAllocateFlagsInfoKHX"; - case StructureType::eBindBufferMemoryInfoKHX: return "BindBufferMemoryInfoKHX"; - case StructureType::eBindImageMemoryInfoKHX: return "BindImageMemoryInfoKHX"; case StructureType::eDeviceGroupRenderPassBeginInfoKHX: return "DeviceGroupRenderPassBeginInfoKHX"; case StructureType::eDeviceGroupCommandBufferBeginInfoKHX: return "DeviceGroupCommandBufferBeginInfoKHX"; case StructureType::eDeviceGroupSubmitInfoKHX: return "DeviceGroupSubmitInfoKHX"; case StructureType::eDeviceGroupBindSparseInfoKHX: return "DeviceGroupBindSparseInfoKHX"; + case StructureType::eAcquireNextImageInfoKHX: return "AcquireNextImageInfoKHX"; + case StructureType::eBindBufferMemoryDeviceGroupInfoKHX: return "BindBufferMemoryDeviceGroupInfoKHX"; + case StructureType::eBindImageMemoryDeviceGroupInfoKHX: return "BindImageMemoryDeviceGroupInfoKHX"; case StructureType::eDeviceGroupPresentCapabilitiesKHX: return "DeviceGroupPresentCapabilitiesKHX"; case StructureType::eImageSwapchainCreateInfoKHX: return "ImageSwapchainCreateInfoKHX"; case StructureType::eBindImageMemorySwapchainInfoKHX: return "BindImageMemorySwapchainInfoKHX"; - case StructureType::eAcquireNextImageInfoKHX: return "AcquireNextImageInfoKHX"; case StructureType::eDeviceGroupPresentInfoKHX: return "DeviceGroupPresentInfoKHX"; case StructureType::eDeviceGroupSwapchainCreateInfoKHX: return "DeviceGroupSwapchainCreateInfoKHX"; case StructureType::eValidationFlagsEXT: return "ValidationFlagsEXT"; @@ -31233,6 +33953,8 @@ namespace vk 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"; @@ -31243,6 +33965,10 @@ namespace vk case StructureType::eFenceGetWin32HandleInfoKHR: return "FenceGetWin32HandleInfoKHR"; case StructureType::eImportFenceFdInfoKHR: return "ImportFenceFdInfoKHR"; case StructureType::eFenceGetFdInfoKHR: return "FenceGetFdInfoKHR"; + case StructureType::ePhysicalDevicePointClippingPropertiesKHR: return "PhysicalDevicePointClippingPropertiesKHR"; + case StructureType::eRenderPassInputAttachmentAspectCreateInfoKHR: return "RenderPassInputAttachmentAspectCreateInfoKHR"; + case StructureType::eImageViewUsageCreateInfoKHR: return "ImageViewUsageCreateInfoKHR"; + case StructureType::ePipelineTessellationDomainOriginStateCreateInfoKHR: return "PipelineTessellationDomainOriginStateCreateInfoKHR"; case StructureType::ePhysicalDeviceSurfaceInfo2KHR: return "PhysicalDeviceSurfaceInfo2KHR"; case StructureType::eSurfaceCapabilities2KHR: return "SurfaceCapabilities2KHR"; case StructureType::eSurfaceFormat2KHR: return "SurfaceFormat2KHR"; @@ -31253,16 +33979,36 @@ namespace vk case StructureType::eMemoryDedicatedAllocateInfoKHR: return "MemoryDedicatedAllocateInfoKHR"; case StructureType::ePhysicalDeviceSamplerFilterMinmaxPropertiesEXT: return "PhysicalDeviceSamplerFilterMinmaxPropertiesEXT"; case StructureType::eSamplerReductionModeCreateInfoEXT: return "SamplerReductionModeCreateInfoEXT"; + case StructureType::eSampleLocationsInfoEXT: return "SampleLocationsInfoEXT"; + case StructureType::eRenderPassSampleLocationsBeginInfoEXT: return "RenderPassSampleLocationsBeginInfoEXT"; + case StructureType::ePipelineSampleLocationsStateCreateInfoEXT: return "PipelineSampleLocationsStateCreateInfoEXT"; + case StructureType::ePhysicalDeviceSampleLocationsPropertiesEXT: return "PhysicalDeviceSampleLocationsPropertiesEXT"; + case StructureType::eMultisamplePropertiesEXT: return "MultisamplePropertiesEXT"; case StructureType::eBufferMemoryRequirementsInfo2KHR: return "BufferMemoryRequirementsInfo2KHR"; case StructureType::eImageMemoryRequirementsInfo2KHR: return "ImageMemoryRequirementsInfo2KHR"; case StructureType::eImageSparseMemoryRequirementsInfo2KHR: return "ImageSparseMemoryRequirementsInfo2KHR"; case StructureType::eMemoryRequirements2KHR: return "MemoryRequirements2KHR"; case StructureType::eSparseImageMemoryRequirements2KHR: return "SparseImageMemoryRequirements2KHR"; + case StructureType::eImageFormatListCreateInfoKHR: return "ImageFormatListCreateInfoKHR"; case StructureType::ePhysicalDeviceBlendOperationAdvancedFeaturesEXT: return "PhysicalDeviceBlendOperationAdvancedFeaturesEXT"; case StructureType::ePhysicalDeviceBlendOperationAdvancedPropertiesEXT: return "PhysicalDeviceBlendOperationAdvancedPropertiesEXT"; case StructureType::ePipelineColorBlendAdvancedStateCreateInfoEXT: return "PipelineColorBlendAdvancedStateCreateInfoEXT"; case StructureType::ePipelineCoverageToColorStateCreateInfoNV: return "PipelineCoverageToColorStateCreateInfoNV"; case StructureType::ePipelineCoverageModulationStateCreateInfoNV: return "PipelineCoverageModulationStateCreateInfoNV"; + case StructureType::eSamplerYcbcrConversionCreateInfoKHR: return "SamplerYcbcrConversionCreateInfoKHR"; + case StructureType::eSamplerYcbcrConversionInfoKHR: return "SamplerYcbcrConversionInfoKHR"; + case StructureType::eBindImagePlaneMemoryInfoKHR: return "BindImagePlaneMemoryInfoKHR"; + case StructureType::eImagePlaneMemoryRequirementsInfoKHR: return "ImagePlaneMemoryRequirementsInfoKHR"; + case StructureType::ePhysicalDeviceSamplerYcbcrConversionFeaturesKHR: return "PhysicalDeviceSamplerYcbcrConversionFeaturesKHR"; + case StructureType::eSamplerYcbcrConversionImageFormatPropertiesKHR: return "SamplerYcbcrConversionImageFormatPropertiesKHR"; + case StructureType::eBindBufferMemoryInfoKHR: return "BindBufferMemoryInfoKHR"; + 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"; } } @@ -31292,6 +34038,7 @@ namespace vk case DynamicState::eStencilReference: return "StencilReference"; case DynamicState::eViewportWScalingNV: return "ViewportWScalingNV"; case DynamicState::eDiscardRectangleEXT: return "DiscardRectangleEXT"; + case DynamicState::eSampleLocationsEXT: return "SampleLocationsEXT"; default: return "invalid"; } } @@ -31344,6 +34091,8 @@ namespace vk case ObjectType::eDescriptorUpdateTemplateKHR: return "DescriptorUpdateTemplateKHR"; case ObjectType::eObjectTableNVX: return "ObjectTableNVX"; case ObjectType::eIndirectCommandsLayoutNVX: return "IndirectCommandsLayoutNVX"; + case ObjectType::eSamplerYcbcrConversionKHR: return "SamplerYcbcrConversionKHR"; + case ObjectType::eValidationCacheEXT: return "ValidationCacheEXT"; default: return "invalid"; } } @@ -31597,6 +34346,11 @@ namespace vk case ImageCreateFlagBits::eCubeCompatible: return "CubeCompatible"; case ImageCreateFlagBits::eBindSfrKHX: return "BindSfrKHX"; case ImageCreateFlagBits::e2DArrayCompatibleKHR: return "2DArrayCompatibleKHR"; + case ImageCreateFlagBits::eBlockTexelViewCompatibleKHR: return "BlockTexelViewCompatibleKHR"; + case ImageCreateFlagBits::eExtendedUsageKHR: return "ExtendedUsageKHR"; + case ImageCreateFlagBits::eSampleLocationsCompatibleDepthEXT: return "SampleLocationsCompatibleDepthEXT"; + case ImageCreateFlagBits::eDisjointKHR: return "DisjointKHR"; + case ImageCreateFlagBits::eAliasKHR: return "AliasKHR"; default: return "invalid"; } } @@ -31612,6 +34366,11 @@ namespace vk if (value & ImageCreateFlagBits::eCubeCompatible) result += "CubeCompatible | "; if (value & ImageCreateFlagBits::eBindSfrKHX) result += "BindSfrKHX | "; if (value & ImageCreateFlagBits::e2DArrayCompatibleKHR) result += "2DArrayCompatibleKHR | "; + if (value & ImageCreateFlagBits::eBlockTexelViewCompatibleKHR) result += "BlockTexelViewCompatibleKHR | "; + if (value & ImageCreateFlagBits::eExtendedUsageKHR) result += "ExtendedUsageKHR | "; + if (value & ImageCreateFlagBits::eSampleLocationsCompatibleDepthEXT) result += "SampleLocationsCompatibleDepthEXT | "; + if (value & ImageCreateFlagBits::eDisjointKHR) result += "DisjointKHR | "; + if (value & ImageCreateFlagBits::eAliasKHR) result += "AliasKHR | "; return "{" + result.substr(0, result.size() - 3) + "}"; } @@ -31701,6 +34460,13 @@ namespace vk case FormatFeatureFlagBits::eTransferSrcKHR: return "TransferSrcKHR"; case FormatFeatureFlagBits::eTransferDstKHR: return "TransferDstKHR"; case FormatFeatureFlagBits::eSampledImageFilterMinmaxEXT: return "SampledImageFilterMinmaxEXT"; + case FormatFeatureFlagBits::eMidpointChromaSamplesKHR: return "MidpointChromaSamplesKHR"; + case FormatFeatureFlagBits::eSampledImageYcbcrConversionLinearFilterKHR: return "SampledImageYcbcrConversionLinearFilterKHR"; + case FormatFeatureFlagBits::eSampledImageYcbcrConversionSeparateReconstructionFilterKHR: return "SampledImageYcbcrConversionSeparateReconstructionFilterKHR"; + case FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitKHR: return "SampledImageYcbcrConversionChromaReconstructionExplicitKHR"; + case FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitForceableKHR: return "SampledImageYcbcrConversionChromaReconstructionExplicitForceableKHR"; + case FormatFeatureFlagBits::eDisjointKHR: return "DisjointKHR"; + case FormatFeatureFlagBits::eCositedChromaSamplesKHR: return "CositedChromaSamplesKHR"; default: return "invalid"; } } @@ -31726,6 +34492,13 @@ namespace vk if (value & FormatFeatureFlagBits::eTransferSrcKHR) result += "TransferSrcKHR | "; if (value & FormatFeatureFlagBits::eTransferDstKHR) result += "TransferDstKHR | "; if (value & FormatFeatureFlagBits::eSampledImageFilterMinmaxEXT) result += "SampledImageFilterMinmaxEXT | "; + if (value & FormatFeatureFlagBits::eMidpointChromaSamplesKHR) result += "MidpointChromaSamplesKHR | "; + if (value & FormatFeatureFlagBits::eSampledImageYcbcrConversionLinearFilterKHR) result += "SampledImageYcbcrConversionLinearFilterKHR | "; + if (value & FormatFeatureFlagBits::eSampledImageYcbcrConversionSeparateReconstructionFilterKHR) result += "SampledImageYcbcrConversionSeparateReconstructionFilterKHR | "; + if (value & FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitKHR) result += "SampledImageYcbcrConversionChromaReconstructionExplicitKHR | "; + if (value & FormatFeatureFlagBits::eSampledImageYcbcrConversionChromaReconstructionExplicitForceableKHR) result += "SampledImageYcbcrConversionChromaReconstructionExplicitForceableKHR | "; + if (value & FormatFeatureFlagBits::eDisjointKHR) result += "DisjointKHR | "; + if (value & FormatFeatureFlagBits::eCositedChromaSamplesKHR) result += "CositedChromaSamplesKHR | "; return "{" + result.substr(0, result.size() - 3) + "}"; } @@ -31835,6 +34608,9 @@ namespace vk case ImageAspectFlagBits::eDepth: return "Depth"; case ImageAspectFlagBits::eStencil: return "Stencil"; case ImageAspectFlagBits::eMetadata: return "Metadata"; + case ImageAspectFlagBits::ePlane0KHR: return "Plane0KHR"; + case ImageAspectFlagBits::ePlane1KHR: return "Plane1KHR"; + case ImageAspectFlagBits::ePlane2KHR: return "Plane2KHR"; default: return "invalid"; } } @@ -31847,6 +34623,9 @@ namespace vk if (value & ImageAspectFlagBits::eDepth) result += "Depth | "; if (value & ImageAspectFlagBits::eStencil) result += "Stencil | "; if (value & ImageAspectFlagBits::eMetadata) result += "Metadata | "; + if (value & ImageAspectFlagBits::ePlane0KHR) result += "Plane0KHR | "; + if (value & ImageAspectFlagBits::ePlane1KHR) result += "Plane1KHR | "; + if (value & ImageAspectFlagBits::ePlane2KHR) result += "Plane2KHR | "; return "{" + result.substr(0, result.size() - 3) + "}"; } @@ -32129,6 +34908,7 @@ namespace vk case ColorSpaceKHR::eAdobergbLinearEXT: return "AdobergbLinearEXT"; case ColorSpaceKHR::eAdobergbNonlinearEXT: return "AdobergbNonlinearEXT"; case ColorSpaceKHR::ePassThroughEXT: return "PassThroughEXT"; + case ColorSpaceKHR::eExtendedSrgbNonlinearEXT: return "ExtendedSrgbNonlinearEXT"; default: return "invalid"; } } @@ -32274,7 +35054,9 @@ namespace vk case DebugReportObjectTypeEXT::eDisplayModeKhr: return "DisplayModeKhr"; case DebugReportObjectTypeEXT::eObjectTableNvx: return "ObjectTableNvx"; case DebugReportObjectTypeEXT::eIndirectCommandsLayoutNvx: return "IndirectCommandsLayoutNvx"; + case DebugReportObjectTypeEXT::eValidationCacheExt: return "ValidationCacheExt"; case DebugReportObjectTypeEXT::eDescriptorUpdateTemplateKHR: return "DescriptorUpdateTemplateKHR"; + case DebugReportObjectTypeEXT::eSamplerYcbcrConversionKHR: return "SamplerYcbcrConversionKHR"; default: return "invalid"; } } @@ -32442,6 +35224,9 @@ namespace vk 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"; } } @@ -32457,6 +35242,9 @@ namespace vk 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) + "}"; } @@ -32772,6 +35560,16 @@ namespace vk return "{" + result.substr(0, result.size() - 3) + "}"; } + VULKAN_HPP_INLINE std::string to_string(PointClippingBehaviorKHR value) + { + switch (value) + { + case PointClippingBehaviorKHR::eAllClipPlanes: return "AllClipPlanes"; + case PointClippingBehaviorKHR::eUserClipPlanesOnly: return "UserClipPlanesOnly"; + default: return "invalid"; + } + } + VULKAN_HPP_INLINE std::string to_string(SamplerReductionModeEXT value) { switch (value) @@ -32783,6 +35581,49 @@ namespace vk } } + VULKAN_HPP_INLINE std::string to_string(TessellationDomainOriginKHR value) + { + switch (value) + { + case TessellationDomainOriginKHR::eUpperLeft: return "UpperLeft"; + case TessellationDomainOriginKHR::eLowerLeft: return "LowerLeft"; + default: return "invalid"; + } + } + + VULKAN_HPP_INLINE std::string to_string(SamplerYcbcrModelConversionKHR value) + { + switch (value) + { + case SamplerYcbcrModelConversionKHR::eRgbIdentity: return "RgbIdentity"; + case SamplerYcbcrModelConversionKHR::eYcbcrIdentity: return "YcbcrIdentity"; + case SamplerYcbcrModelConversionKHR::eYcbcr709: return "Ycbcr709"; + case SamplerYcbcrModelConversionKHR::eYcbcr601: return "Ycbcr601"; + case SamplerYcbcrModelConversionKHR::eYcbcr2020: return "Ycbcr2020"; + default: return "invalid"; + } + } + + VULKAN_HPP_INLINE std::string to_string(SamplerYcbcrRangeKHR value) + { + switch (value) + { + case SamplerYcbcrRangeKHR::eItuFull: return "ItuFull"; + case SamplerYcbcrRangeKHR::eItuNarrow: return "ItuNarrow"; + default: return "invalid"; + } + } + + VULKAN_HPP_INLINE std::string to_string(ChromaLocationKHR value) + { + switch (value) + { + case ChromaLocationKHR::eCositedEven: return "CositedEven"; + case ChromaLocationKHR::eMidpoint: return "Midpoint"; + default: return "invalid"; + } + } + VULKAN_HPP_INLINE std::string to_string(BlendOverlapEXT value) { switch (value) @@ -32806,6 +35647,49 @@ namespace vk } } -} // namespace vk + VULKAN_HPP_INLINE std::string to_string(ValidationCacheHeaderVersionEXT value) + { + switch (value) + { + case ValidationCacheHeaderVersionEXT::eOne: return "One"; + default: return "invalid"; + } + } + + 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"; + } + } + +} // namespace VULKAN_HPP_NAMESPACE #endif From 30e0a258e4b4fca546691f92e8da5d7a104c65f8 Mon Sep 17 00:00:00 2001 From: DrChat Date: Thu, 15 Feb 2018 17:05:54 -0600 Subject: [PATCH 13/15] [Vulkan] Buffers typically aren't aligned. --- src/xenia/gpu/vulkan/buffer_cache.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/xenia/gpu/vulkan/buffer_cache.cc b/src/xenia/gpu/vulkan/buffer_cache.cc index 5050e7469..72b2f2d39 100644 --- a/src/xenia/gpu/vulkan/buffer_cache.cc +++ b/src/xenia/gpu/vulkan/buffer_cache.cc @@ -297,12 +297,12 @@ std::pair BufferCache::UploadIndexBuffer( // TODO(benvanik): memcpy then use compute shaders to swap? if (format == IndexFormat::kInt16) { // Endian::k8in16, swap half-words. - xe::copy_and_swap_16_aligned(transient_buffer_->host_base() + offset, - source_ptr, source_length / 2); + xe::copy_and_swap_16_unaligned(transient_buffer_->host_base() + offset, + source_ptr, source_length / 2); } else if (format == IndexFormat::kInt32) { // Endian::k8in32, swap words. - xe::copy_and_swap_32_aligned(transient_buffer_->host_base() + offset, - source_ptr, source_length / 4); + xe::copy_and_swap_32_unaligned(transient_buffer_->host_base() + offset, + source_ptr, source_length / 4); } transient_buffer_->Flush(offset, source_length); @@ -348,11 +348,11 @@ std::pair BufferCache::UploadVertexBuffer( // TODO(benvanik): memcpy then use compute shaders to swap? if (endian == Endian::k8in32) { // Endian::k8in32, swap words. - xe::copy_and_swap_32_aligned(transient_buffer_->host_base() + offset, - source_ptr, source_length / 4); + xe::copy_and_swap_32_unaligned(transient_buffer_->host_base() + offset, + source_ptr, source_length / 4); } else if (endian == Endian::k16in32) { - xe::copy_and_swap_16_in_32_aligned(transient_buffer_->host_base() + offset, - source_ptr, source_length / 4); + xe::copy_and_swap_16_in_32_unaligned( + transient_buffer_->host_base() + offset, source_ptr, source_length / 4); } else { assert_always(); } From e4bc5968870f55cbebedb0aba5a5cb30a1962fa3 Mon Sep 17 00:00:00 2001 From: DrChat Date: Thu, 15 Feb 2018 21:14:52 -0600 Subject: [PATCH 14/15] [Base] Faster copy-and-swap routines --- src/xenia/base/memory.cc | 90 ++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 60 deletions(-) diff --git a/src/xenia/base/memory.cc b/src/xenia/base/memory.cc index 3ddef8113..2c22c7c5b 100644 --- a/src/xenia/base/memory.cc +++ b/src/xenia/base/memory.cc @@ -28,11 +28,14 @@ void copy_and_swap_16_aligned(void* dest_ptr, const void* src_ptr, size_t count) { auto dest = reinterpret_cast(dest_ptr); auto src = reinterpret_cast(src_ptr); + __m128i shufmask = + _mm_set_epi8(0x0E, 0x0F, 0x0C, 0x0D, 0x0A, 0x0B, 0x08, 0x09, 0x06, 0x07, + 0x04, 0x05, 0x02, 0x03, 0x00, 0x01); + size_t i; for (i = 0; i + 8 <= count; i += 8) { __m128i input = _mm_load_si128(reinterpret_cast(&src[i])); - __m128i output = - _mm_or_si128(_mm_slli_epi16(input, 8), _mm_srli_epi16(input, 8)); + __m128i output = _mm_shuffle_epi8(input, shufmask); _mm_store_si128(reinterpret_cast<__m128i*>(&dest[i]), output); } for (; i < count; ++i) { // handle residual elements @@ -44,11 +47,14 @@ void copy_and_swap_16_unaligned(void* dest_ptr, const void* src_ptr, size_t count) { auto dest = reinterpret_cast(dest_ptr); auto src = reinterpret_cast(src_ptr); + __m128i shufmask = + _mm_set_epi8(0x0E, 0x0F, 0x0C, 0x0D, 0x0A, 0x0B, 0x08, 0x09, 0x06, 0x07, + 0x04, 0x05, 0x02, 0x03, 0x00, 0x01); + size_t i; for (i = 0; i + 8 <= count; i += 8) { __m128i input = _mm_loadu_si128(reinterpret_cast(&src[i])); - __m128i output = - _mm_or_si128(_mm_slli_epi16(input, 8), _mm_srli_epi16(input, 8)); + __m128i output = _mm_shuffle_epi8(input, shufmask); _mm_storeu_si128(reinterpret_cast<__m128i*>(&dest[i]), output); } for (; i < count; ++i) { // handle residual elements @@ -60,22 +66,14 @@ void copy_and_swap_32_aligned(void* dest_ptr, const void* src_ptr, size_t count) { auto dest = reinterpret_cast(dest_ptr); auto src = reinterpret_cast(src_ptr); - __m128i byte2mask = _mm_set1_epi32(0x00FF0000); - __m128i byte3mask = _mm_set1_epi32(0x0000FF00); + __m128i shufmask = + _mm_set_epi8(0x0C, 0x0D, 0x0E, 0x0F, 0x08, 0x09, 0x0A, 0x0B, 0x04, 0x05, + 0x06, 0x07, 0x00, 0x01, 0x02, 0x03); + size_t i; for (i = 0; i + 4 <= count; i += 4) { __m128i input = _mm_load_si128(reinterpret_cast(&src[i])); - // Do the four shifts. - __m128i byte1 = _mm_slli_epi32(input, 24); - __m128i byte2 = _mm_slli_epi32(input, 8); - __m128i byte3 = _mm_srli_epi32(input, 8); - __m128i byte4 = _mm_srli_epi32(input, 24); - // OR bytes together. - __m128i output = _mm_or_si128(byte1, byte4); - byte2 = _mm_and_si128(byte2, byte2mask); - output = _mm_or_si128(output, byte2); - byte3 = _mm_and_si128(byte3, byte3mask); - output = _mm_or_si128(output, byte3); + __m128i output = _mm_shuffle_epi8(input, shufmask); _mm_store_si128(reinterpret_cast<__m128i*>(&dest[i]), output); } for (; i < count; ++i) { // handle residual elements @@ -87,22 +85,14 @@ void copy_and_swap_32_unaligned(void* dest_ptr, const void* src_ptr, size_t count) { auto dest = reinterpret_cast(dest_ptr); auto src = reinterpret_cast(src_ptr); - __m128i byte2mask = _mm_set1_epi32(0x00FF0000); - __m128i byte3mask = _mm_set1_epi32(0x0000FF00); + __m128i shufmask = + _mm_set_epi8(0x0C, 0x0D, 0x0E, 0x0F, 0x08, 0x09, 0x0A, 0x0B, 0x04, 0x05, + 0x06, 0x07, 0x00, 0x01, 0x02, 0x03); + size_t i; for (i = 0; i + 4 <= count; i += 4) { __m128i input = _mm_loadu_si128(reinterpret_cast(&src[i])); - // Do the four shifts. - __m128i byte1 = _mm_slli_epi32(input, 24); - __m128i byte2 = _mm_slli_epi32(input, 8); - __m128i byte3 = _mm_srli_epi32(input, 8); - __m128i byte4 = _mm_srli_epi32(input, 24); - // OR bytes together. - __m128i output = _mm_or_si128(byte1, byte4); - byte2 = _mm_and_si128(byte2, byte2mask); - output = _mm_or_si128(output, byte2); - byte3 = _mm_and_si128(byte3, byte3mask); - output = _mm_or_si128(output, byte3); + __m128i output = _mm_shuffle_epi8(input, shufmask); _mm_storeu_si128(reinterpret_cast<__m128i*>(&dest[i]), output); } for (; i < count; ++i) { // handle residual elements @@ -114,24 +104,14 @@ void copy_and_swap_64_aligned(void* dest_ptr, const void* src_ptr, size_t count) { auto dest = reinterpret_cast(dest_ptr); auto src = reinterpret_cast(src_ptr); - __m128i byte2mask = _mm_set1_epi32(0x00FF0000); - __m128i byte3mask = _mm_set1_epi32(0x0000FF00); + __m128i shufmask = + _mm_set_epi8(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00, 0x01, + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07); + size_t i; for (i = 0; i + 2 <= count; i += 2) { __m128i input = _mm_load_si128(reinterpret_cast(&src[i])); - // Do the four shifts. - __m128i byte1 = _mm_slli_epi32(input, 24); - __m128i byte2 = _mm_slli_epi32(input, 8); - __m128i byte3 = _mm_srli_epi32(input, 8); - __m128i byte4 = _mm_srli_epi32(input, 24); - // OR bytes together. - __m128i output = _mm_or_si128(byte1, byte4); - byte2 = _mm_and_si128(byte2, byte2mask); - output = _mm_or_si128(output, byte2); - byte3 = _mm_and_si128(byte3, byte3mask); - output = _mm_or_si128(output, byte3); - // Reorder the two words. - output = _mm_shuffle_epi32(output, _MM_SHUFFLE(2, 3, 0, 1)); + __m128i output = _mm_shuffle_epi8(input, shufmask); _mm_store_si128(reinterpret_cast<__m128i*>(&dest[i]), output); } for (; i < count; ++i) { // handle residual elements @@ -143,24 +123,14 @@ void copy_and_swap_64_unaligned(void* dest_ptr, const void* src_ptr, size_t count) { auto dest = reinterpret_cast(dest_ptr); auto src = reinterpret_cast(src_ptr); - __m128i byte2mask = _mm_set1_epi32(0x00FF0000); - __m128i byte3mask = _mm_set1_epi32(0x0000FF00); + __m128i shufmask = + _mm_set_epi8(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00, 0x01, + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07); + size_t i; for (i = 0; i + 2 <= count; i += 2) { __m128i input = _mm_loadu_si128(reinterpret_cast(&src[i])); - // Do the four shifts. - __m128i byte1 = _mm_slli_epi32(input, 24); - __m128i byte2 = _mm_slli_epi32(input, 8); - __m128i byte3 = _mm_srli_epi32(input, 8); - __m128i byte4 = _mm_srli_epi32(input, 24); - // OR bytes together. - __m128i output = _mm_or_si128(byte1, byte4); - byte2 = _mm_and_si128(byte2, byte2mask); - output = _mm_or_si128(output, byte2); - byte3 = _mm_and_si128(byte3, byte3mask); - output = _mm_or_si128(output, byte3); - // Reorder the two words. - output = _mm_shuffle_epi32(output, _MM_SHUFFLE(2, 3, 0, 1)); + __m128i output = _mm_shuffle_epi8(input, shufmask); _mm_storeu_si128(reinterpret_cast<__m128i*>(&dest[i]), output); } for (; i < count; ++i) { // handle residual elements From 43f9cebb0ccb7b1b41616baeeaa946d2968ba42d Mon Sep 17 00:00:00 2001 From: DrChat Date: Fri, 16 Feb 2018 12:51:39 -0600 Subject: [PATCH 15/15] [JIT] Rewrite CNTLZ and remove one branch --- src/xenia/cpu/backend/x64/x64_sequences.cc | 84 ++++++++-------------- 1 file changed, 28 insertions(+), 56 deletions(-) diff --git a/src/xenia/cpu/backend/x64/x64_sequences.cc b/src/xenia/cpu/backend/x64/x64_sequences.cc index ac2a158c0..cc868d758 100644 --- a/src/xenia/cpu/backend/x64/x64_sequences.cc +++ b/src/xenia/cpu/backend/x64/x64_sequences.cc @@ -6484,24 +6484,17 @@ struct CNTLZ_I8 : Sequence> { e.lzcnt(i.dest.reg().cvt16(), i.dest.reg().cvt16()); e.sub(i.dest, 8); } else { - Xbyak::Label jz, jend; - + Xbyak::Label end; e.inLocalLabel(); - // BSR: searches $2 until MSB 1 found, stores idx (from bit 0) in $1 - // if input is 0, results are undefined (and ZF is set) - e.bsr(i.dest, i.src1); - e.jz(jz); // Jump if zero + e.bsr(e.rax, i.src1); // ZF set if i.src1 is 0 + e.mov(i.dest, 0x8); + e.jz(end); - // Invert the result (7 - i.dest) - e.xor_(i.dest, 0x7); - e.jmp(jend); // Jmp to end + e.xor_(e.rax, 0x7); + e.mov(i.dest, e.rax); - // src1 was zero, so write 8 to the dest reg - e.L(jz); - e.mov(i.dest, 8); - - e.L(jend); + e.L(end); e.outLocalLabel(); } } @@ -6512,24 +6505,17 @@ struct CNTLZ_I16 : Sequence> { // LZCNT: searches $2 until MSB 1 found, stores idx (from last bit) in $1 e.lzcnt(i.dest.reg().cvt32(), i.src1); } else { - Xbyak::Label jz, jend; - + Xbyak::Label end; e.inLocalLabel(); - // BSR: searches $2 until MSB 1 found, stores idx (from bit 0) in $1 - // if input is 0, results are undefined (and ZF is set) - e.bsr(i.dest, i.src1); - e.jz(jz); // Jump if zero + e.bsr(e.rax, i.src1); // ZF set if i.src1 is 0 + e.mov(i.dest, 0x10); + e.jz(end); - // Invert the result (15 - i.dest) - e.xor_(i.dest, 0xF); - e.jmp(jend); // Jmp to end + e.xor_(e.rax, 0x0F); + e.mov(i.dest, e.rax); - // src1 was zero, so write 16 to the dest reg - e.L(jz); - e.mov(i.dest, 16); - - e.L(jend); + e.L(end); e.outLocalLabel(); } } @@ -6539,24 +6525,17 @@ struct CNTLZ_I32 : Sequence> { if (e.IsFeatureEnabled(kX64EmitLZCNT)) { e.lzcnt(i.dest.reg().cvt32(), i.src1); } else { - Xbyak::Label jz, jend; - + Xbyak::Label end; e.inLocalLabel(); - // BSR: searches $2 until MSB 1 found, stores idx (from bit 0) in $1 - // if input is 0, results are undefined (and ZF is set) - e.bsr(i.dest, i.src1); - e.jz(jz); // Jump if zero + e.bsr(e.rax, i.src1); // ZF set if i.src1 is 0 + e.mov(i.dest, 0x20); + e.jz(end); - // Invert the result (31 - i.dest) - e.xor_(i.dest, 0x1F); - e.jmp(jend); // Jmp to end + e.xor_(e.rax, 0x1F); + e.mov(i.dest, e.rax); - // src1 was zero, so write 32 to the dest reg - e.L(jz); - e.mov(i.dest, 32); - - e.L(jend); + e.L(end); e.outLocalLabel(); } } @@ -6566,24 +6545,17 @@ struct CNTLZ_I64 : Sequence> { if (e.IsFeatureEnabled(kX64EmitLZCNT)) { e.lzcnt(i.dest.reg().cvt64(), i.src1); } else { - Xbyak::Label jz, jend; - + Xbyak::Label end; e.inLocalLabel(); - // BSR: searches $2 until MSB 1 found, stores idx (from bit 0) in $1 - // if input is 0, results are undefined (and ZF is set) - e.bsr(i.dest, i.src1); - e.jz(jz); // Jump if zero + e.bsr(e.rax, i.src1); // ZF set if i.src1 is 0 + e.mov(i.dest, 0x40); + e.jz(end); - // Invert the result (63 - i.dest) - e.xor_(i.dest, 0x3F); - e.jmp(jend); // Jmp to end + e.xor_(e.rax, 0x3F); + e.mov(i.dest, e.rax); - // src1 was zero, so write 64 to the dest reg - e.L(jz); - e.mov(i.dest, 64); - - e.L(jend); + e.L(end); e.outLocalLabel(); } }