Skip to content

Instantly share code, notes, and snippets.

@maierfelix
Created February 13, 2020 17:11
Show Gist options
  • Save maierfelix/f35b54d19a3c56f60a80be2ac32893db to your computer and use it in GitHub Desktop.
Save maierfelix/f35b54d19a3c56f60a80be2ac32893db to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
/*
* MACHINE GENERATED, DO NOT EDIT
* GENERATED BY nvk v0.7.8
*/
"use strict";
const {platform} = process;
const nvk = require("./build/Release/addon-" + platform + ".node");
let ENABLE_SHARED_MEMORY_HINTS = !!process.env.npm_config_enable_shared_memory_hints;
if (!ENABLE_SHARED_MEMORY_HINTS) {
process.argv.map(arg => {
if (arg.match("enable-shared-memory-hints")) ENABLE_SHARED_MEMORY_HINTS = true;
});
}
if (typeof BigInt === "undefined") {
throw new ReferenceError(`BigInt Type is not available on your platform!`);
}
const BI0 = BigInt(0);
const BI4 = BigInt(4);
const BI8 = BigInt(8);
const NULLT = String.fromCharCode(0x0);
const VK_ENUMERATIONS = nvk.$getVulkanEnumerations();
const getAddressFromArrayBuffer = nvk.getAddressFromArrayBuffer;
const getArrayBufferFromAddress = nvk.getArrayBufferFromAddress;
global.ArrayBuffer.prototype.getAddress = function() {
return getAddressFromArrayBuffer(this);
};
global.ArrayBuffer.fromAddress = function(address, byteLength) {
return getArrayBufferFromAddress(address, BigInt(byteLength));
};
global.BigInt.prototype.dereference = function() {
return new BigUint64Array(ArrayBuffer.fromAddress(this, BI8))[0];
};
const textEncoder = new (typeof TextEncoder === "undefined" ? require("util").TextEncoder : TextEncoder);
const textDecoder = new (typeof TextDecoder === "undefined" ? require("util").TextDecoder : TextDecoder);
function getStructFromStack(byteOffset, ctor, cache) {
if (cache[byteOffset] === void 0) {
let stackAllocated = new ctor();
cache[byteOffset] = stackAllocated;
return stackAllocated;
}
let stackAllocated = cache[byteOffset];
return stackAllocated;
};
function decodeNullTerminatedUTF8String(view) {
let terminator = view.indexOf(0x0);
let subview = view.subarray(0, terminator > -1 ? terminator : view.length);
return textDecoder.decode(subview);
};
function findNullTerminatedUTF8StringLength(addr) {
let limit = 2 << 12;
// read 4 bytes on each iteration
for (let ii = 0; ii < limit; ii += 4) {
let chunk = getArrayBufferFromAddress(addr + BigInt(ii), BI4);
let chunkU8 = new Uint8Array(chunk);
if (chunkU8[0x0] === 0) return ii + 0x1 + 0x0;
if (chunkU8[0x1] === 0) return ii + 0x1 + 0x1;
if (chunkU8[0x2] === 0) return ii + 0x1 + 0x2;
if (chunkU8[0x3] === 0) return ii + 0x1 + 0x3;
};
throw new ReferenceError(`Failed to find UTF8 String length - Memory is either corrupted, misses a NULL terminator or exceeds the Limit of '${limit}' bytes`);
return -1;
};
function decodeNativeArrayOfObjects(addr, length, ctor) {
let out = [];
let byteLength = BigInt(ctor.byteLength);
for (let ii = 0; ii < length; ++ii) {
let buffer = getArrayBufferFromAddress(
addr + BigInt(ii) * byteLength,
byteLength
);
let item = new ctor({
$memoryBuffer: buffer,
$memoryOffset: 0
});
out.push(item);
};
return out;
};
function typeToString(value) {
return ((value === void 0 || value === null) ? String(value) : value.constructor.name);
};
function ASSERT_IS_STRING(value, name) {
if (typeof value !== "string") {
throw new TypeError(`Invalid type for '${name}': Expected 'String' but got '" + typeToString(value) + "'`);
}
}
function ASSERT_IS_NUMBER(value, name) {
if (typeof value !== "number") {
throw new TypeError(`Invalid type for '${name}': Expected 'Number' but got '" + typeToString(value) + "'`);
}
};
function ASSERT_IS_NUMBER_OR_BIGINT(value, name) {
if (typeof value !== "bigint" && typeof value !== "number") {
throw new TypeError(`Invalid type for '${name}': Expected 'BigInt' or 'Number' but got '" + typeToString(value) + "'`);
}
};
class NativeStringArray {
constructor(array) {
this.array = array;
this.address = BI0;
let stringBuffers = [];
let addressView = new BigInt64Array(array.length);
let addressBuffer = addressView.buffer;
let addressBufferAddress = getAddressFromArrayBuffer(addressBuffer);
for (let ii = 0; ii < array.length; ++ii) {
let strBuffer = textEncoder.encode(array[ii] + NULLT).buffer;
addressView[ii] = getAddressFromArrayBuffer(strBuffer);
stringBuffers.push(strBuffer);
};
this.address = addressBufferAddress;
// keep references to prevent deallocation
this.addressBuffer = addressBuffer;
this.stringBuffers = stringBuffers;
}
};
class NativeObjectArray {
constructor(array) {
this.array = array;
this.address = BI0;
let byteStride = array[0].memoryBuffer.byteLength;
let objectBuffer = new ArrayBuffer(array.length * byteStride);
let objectBufferView = new Uint8Array(objectBuffer);
let objectBufferAddress = getAddressFromArrayBuffer(objectBuffer);
for (let ii = 0; ii < array.length; ++ii) {
let byteOffset = ii * byteStride;
let srcView = new Uint8Array(array[ii].memoryBuffer);
let dstView = objectBufferView.subarray(byteOffset, byteOffset + byteStride);
dstView.set(srcView, 0x0);
};
this.address = objectBufferAddress;
// keep reference to prevent deallocation
this.objectBuffer = objectBuffer;
}
};
class NativeObjectReferenceArray {
constructor(array) {
this.array = array;
this.address = BI0;
let addressView = new BigInt64Array(array.length);
let addressBuffer = addressView.buffer;
let addressBufferAddress = getAddressFromArrayBuffer(addressBuffer);
for (let ii = 0; ii < array.length; ++ii) {
let object = array[ii];
let objectAddress = object.address;
addressView[ii] = objectAddress;
};
this.address = addressBufferAddress;
// keep reference to prevent deallocation
this.addressBuffer = addressBuffer;
}
};
const STRUCT_RESET_CACHE = {
"0x10": new Uint8Array(0x10),
"0x8": new Uint8Array(0x8),
"0xC": new Uint8Array(0xC),
"0x18": new Uint8Array(0x18),
"0x338": new Uint8Array(0x338),
"0x104": new Uint8Array(0x104),
"0x208": new Uint8Array(0x208),
"0x30": new Uint8Array(0x30),
"0x28": new Uint8Array(0x28),
"0x48": new Uint8Array(0x48),
"0x40": new Uint8Array(0x40),
"0x20": new Uint8Array(0x20),
"0x14": new Uint8Array(0x14),
"0x38": new Uint8Array(0x38),
"0x58": new Uint8Array(0x58),
"0x50": new Uint8Array(0x50),
"0x60": new Uint8Array(0x60),
"0x44": new Uint8Array(0x44),
"0x1C": new Uint8Array(0x1C),
"0x68": new Uint8Array(0x68),
"0x90": new Uint8Array(0x90),
"0x24": new Uint8Array(0x24),
"0xDC": new Uint8Array(0xDC),
"0x1F8": new Uint8Array(0x1F8),
"0x34": new Uint8Array(0x34),
"0xF0": new Uint8Array(0xF0),
"0x348": new Uint8Array(0x348),
"0x218": new Uint8Array(0x218),
"0x4": new Uint8Array(0x4),
"0x120": new Uint8Array(0x120),
"0x98": new Uint8Array(0x98),
"0x70": new Uint8Array(0x70),
"0x88": new Uint8Array(0x88),
"0xA8": new Uint8Array(0xA8),
"0x110": new Uint8Array(0x110),
"0x220": new Uint8Array(0x220),
"0x228": new Uint8Array(0x228),
};
function $VAL_R_API_Extensions(value) {
switch (value) {
case 0x1: case 0x2: case 0x0: case 0x3: case 0xB: case 0x8: case 0x4: case 0x9: case 0x6: case 0x17: case 0xA: case 0xE: case 0x19: case 0x46:
return true;
};
return false;
};
function $VAL_R_API_Constants(value) {
switch (value) {
case -0x1: case 0x0: case 0x3E8: case 0x8: case 0x100: case 0x20: case 0x10: case -0x2: case -0x3: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkImageLayout(value) {
switch (value) {
case 0x2: case 0x3B9C9309: case 0x3B9C9308: case 0x3: case 0x4: case 0x3B9E1D90: case 0x1: case 0x8: case 0x3B9ACDEA: case 0x5: case 0x3B9D4AA3: case 0x3B9C7B98: case 0x7: case 0x6: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkAttachmentLoadOp(value) {
switch (value) {
case 0x1: case 0x2: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkAttachmentStoreOp(value) {
switch (value) {
case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkImageType(value) {
switch (value) {
case 0x0: case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkImageTiling(value) {
switch (value) {
case 0x3B9D3330: case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkImageViewType(value) {
switch (value) {
case 0x0: case 0x4: case 0x1: case 0x5: case 0x2: case 0x3: case 0x6:
return true;
};
return false;
};
function $VAL_R_VkCommandBufferLevel(value) {
switch (value) {
case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkComponentSwizzle(value) {
switch (value) {
case 0x6: case 0x5: case 0x4: case 0x0: case 0x2: case 0x3: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkDescriptorType(value) {
switch (value) {
case 0x3B9D4E88: case 0x1: case 0x3B9CE510: case 0xA: case 0x2: case 0x0: case 0x7: case 0x9: case 0x3: case 0x5: case 0x6: case 0x8: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkQueryType(value) {
switch (value) {
case 0x3B9D4E88: case 0x0: case 0x3B9DFE50: case 0x1: case 0x3B9B27C4: case 0x3B9B23E0: case 0x2: case 0x3B9B3764:
return true;
};
return false;
};
function $VAL_R_VkBorderColor(value) {
switch (value) {
case 0x2: case 0x4: case 0x0: case 0x3: case 0x5: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkPipelineBindPoint(value) {
switch (value) {
case 0x1: case 0x0: case 0x3B9D4E88:
return true;
};
return false;
};
function $VAL_R_VkPipelineCacheHeaderVersion(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkPrimitiveTopology(value) {
switch (value) {
case 0x1: case 0x6: case 0x2: case 0x7: case 0xA: case 0x0: case 0x5: case 0x3: case 0x8: case 0x4: case 0x9:
return true;
};
return false;
};
function $VAL_R_VkSharingMode(value) {
switch (value) {
case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkIndexType(value) {
switch (value) {
case 0x3B9D4E88: case 0x0: case 0x1: case 0x3B9ED528:
return true;
};
return false;
};
function $VAL_R_VkFilter(value) {
switch (value) {
case 0x3B9B0498: case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkSamplerMipmapMode(value) {
switch (value) {
case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkSamplerAddressMode(value) {
switch (value) {
case 0x3: case 0x2: case 0x1: case 0x4: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkCompareOp(value) {
switch (value) {
case 0x7: case 0x2: case 0x4: case 0x6: case 0x1: case 0x3: case 0x0: case 0x5:
return true;
};
return false;
};
function $VAL_R_VkPolygonMode(value) {
switch (value) {
case 0x0: case 0x3B9D1FA8: case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkFrontFace(value) {
switch (value) {
case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkBlendFactor(value) {
switch (value) {
case 0xC: case 0xA: case 0x8: case 0x4: case 0x1: case 0xD: case 0xB: case 0x9: case 0x5: case 0x12: case 0x10: case 0x7: case 0x3: case 0x11: case 0xF: case 0x6: case 0xE: case 0x2: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkBlendOp(value) {
switch (value) {
case 0x0: case 0x3B9D0C4D: case 0x3B9D0C32: case 0x3B9D0C31: case 0x3B9D0C49: case 0x3B9D0C2F: case 0x3B9D0C35: case 0x3B9D0C2A: case 0x3B9D0C22: case 0x3B9D0C26: case 0x3B9D0C28: case 0x3B9D0C24: case 0x3B9D0C36: case 0x3B9D0C4C: case 0x3B9D0C33: case 0x3B9D0C3E: case 0x3B9D0C41: case 0x3B9D0C3F: case 0x3B9D0C42: case 0x3B9D0C40: case 0x3B9D0C37: case 0x3B9D0C4A: case 0x3B9D0C38: case 0x3B9D0C30: case 0x3B9D0C3A: case 0x3B9D0C39: case 0x3B9D0C3C: case 0x4: case 0x3: case 0x3B9D0C48: case 0x3B9D0C47: case 0x3B9D0C2C: case 0x3B9D0C2E: case 0x3B9D0C3D: case 0x3B9D0C45: case 0x3B9D0C44: case 0x3B9D0C46: case 0x3B9D0C43: case 0x3B9D0C4B: case 0x2: case 0x3B9D0C2D: case 0x3B9D0C34: case 0x3B9D0C29: case 0x3B9D0C21: case 0x3B9D0C25: case 0x3B9D0C27: case 0x3B9D0C23: case 0x1: case 0x3B9D0C3B: case 0x3B9D0C2B: case 0x3B9D0C20:
return true;
};
return false;
};
function $VAL_R_VkStencilOp(value) {
switch (value) {
case 0x4: case 0x7: case 0x3: case 0x6: case 0x5: case 0x0: case 0x2: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkLogicOp(value) {
switch (value) {
case 0x1: case 0x4: case 0x2: case 0x0: case 0x3: case 0xC: case 0x9: case 0xA: case 0xE: case 0x8: case 0x5: case 0x7: case 0xD: case 0xB: case 0xF: case 0x6:
return true;
};
return false;
};
function $VAL_R_VkInternalAllocationType(value) {
switch (value) {
case 0x0:
return true;
};
return false;
};
function $VAL_R_VkSystemAllocationScope(value) {
switch (value) {
case 0x2: case 0x0: case 0x3: case 0x4: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkPhysicalDeviceType(value) {
switch (value) {
case 0x4: case 0x2: case 0x1: case 0x0: case 0x3:
return true;
};
return false;
};
function $VAL_R_VkVertexInputRate(value) {
switch (value) {
case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkFormat(value) {
switch (value) {
case 0x8: case 0x45: case 0x41: case 0x43: case 0x44: case 0x40: case 0x42: case 0x3F: case 0x3B: case 0x3D: case 0x3E: case 0x3A: case 0x3C: case 0x38: case 0x34: case 0x39: case 0x36: case 0x37: case 0x33: case 0x35: case 0x3B9BCBDB: case 0xB4: case 0xB3: case 0x3B9BCBD8: case 0xAE: case 0xAD: case 0x3B9BCBD9: case 0xB0: case 0xAF: case 0x3B9BCBDA: case 0xB2: case 0xB1: case 0x3B9BCBDC: case 0xB6: case 0xB5: case 0x3B9BCBDD: case 0xB8: case 0xB7: case 0x3B9BCBD0: case 0x9E: case 0x9D: case 0x3B9BCBD1: case 0xA0: case 0x9F: case 0x3B9BCBD2: case 0xA2: case 0xA1: case 0x3B9BCBD3: case 0xA4: case 0xA3: case 0x3B9BCBD4: case 0xA6: case 0xA5: case 0x3B9BCBD5: case 0xA8: case 0xA7: case 0x3B9BCBD6: case 0xAA: case 0xA9: case 0x3B9BCBD7: case 0xAC: case 0xAB: case 0x7A: case 0x3B9D2B6B: case 0x3B9D2B75: case 0x3B9D2B7C: case 0x3: case 0x7: case 0x5: case 0x31: case 0x2D: case 0x32: case 0x2F: case 0x30: case 0x2C: case 0x2E: case 0x3B9D2B61: case 0x23: case 0x1F: case 0x24: case 0x21: case 0x22: case 0x1E: case 0x20: case 0x86: case 0x85: case 0x84: case 0x83: case 0x88: case 0x87: case 0x8A: case 0x89: case 0x8C: case 0x8B: case 0x8E: case 0x8D: case 0x90: case 0x8F: case 0x92: case 0x91: case 0x7C: case 0x80: case 0x81: case 0x7E: case 0x82: case 0x7B: case 0x9C: case 0x9B: case 0x9A: case 0x99: case 0x96: case 0x95: case 0x98: case 0x97: case 0x94: case 0x93: case 0x3B9D2B6A: case 0x3B9D2B6D: case 0x3B9D2B6F: case 0x3B9D2B6C: case 0x3B9D2B6E: case 0x3B9D2B70: case 0x3B9D2B74: case 0x3B9D2B77: case 0x3B9D2B79: case 0x3B9D2B76: case 0x3B9D2B78: case 0x3B9D2B7A: case 0x3B9D2B7B: case 0x3B9D2B7E: case 0x3B9D2B80: case 0x3B9D2B7D: case 0x3B9D2B7F: case 0x3B9D2B81: case 0x3B9D2B60: case 0x3B9D2B63: case 0x3B9D2B65: case 0x3B9D2B62: case 0x3B9D2B64: case 0x3B9D2B66: case 0x3B9B9CF4: case 0x3B9B9CF0: case 0x3B9B9CF5: case 0x3B9B9CF1: case 0x3B9B9CF6: case 0x3B9B9CF2: case 0x3B9B9CF7: case 0x3B9B9CF3: case 0x3B9D2B69: case 0x3B9D2B68: case 0x3B9D2B67: case 0x3B9D2B73: case 0x3B9D2B72: case 0x3B9D2B71: case 0x61: case 0x60: case 0x5C: case 0x5E: case 0x5F: case 0x5B: case 0x5D: case 0x5A: case 0x59: case 0x55: case 0x57: case 0x58: case 0x54: case 0x56: case 0x53: case 0x52: case 0x4E: case 0x50: case 0x51: case 0x4D: case 0x4F: case 0x4C: case 0x4B: case 0x47: case 0x49: case 0x4A: case 0x46: case 0x48: case 0x6D: case 0x6C: case 0x6B: case 0x6A: case 0x69: case 0x68: case 0x67: case 0x66: case 0x65: case 0x64: case 0x63: case 0x62: case 0x2: case 0x1: case 0x6: case 0x4: case 0x79: case 0x78: case 0x77: case 0x76: case 0x75: case 0x74: case 0x73: case 0x72: case 0x71: case 0x70: case 0x6F: case 0x6E: case 0x2A: case 0x26: case 0x2B: case 0x28: case 0x29: case 0x25: case 0x27: case 0x1C: case 0x18: case 0x1D: case 0x1A: case 0x1B: case 0x17: case 0x19: case 0x15: case 0x11: case 0x16: case 0x13: case 0x14: case 0x10: case 0x12: case 0xE: case 0xA: case 0xF: case 0xC: case 0xD: case 0x9: case 0xB: case 0x7F: case 0x0: case 0x7D:
return true;
};
return false;
};
function $VAL_R_VkStructureType(value) {
switch (value) {
case 0x3B9D4E89: case 0x3B9D4E94: case 0x3B9D4E90: case 0x3B9BB46A: case 0x3B9CC1EA: case 0x3B9CC1E9: case 0x3B9CC1E8: case 0x3B9AE940: case 0x0: case 0x3B9C73C8: case 0x3B9C73C9: case 0x3B9D4E8E: case 0x3B9BB46D: case 0x3B9D2F48: case 0x3B9BB46E: case 0x3B9D2F49: case 0x3B9BB469: case 0x3B9D2B62: case 0x7: case 0xC: case 0x3B9E8322: case 0x3B9E8321: case 0x2C: case 0x3B9D0450: case 0xD: case 0x3B9D98C0: case 0x3B9DEEB0: case 0x3B9C19F2: case 0x3B9C19F3: case 0x28: case 0x2A: case 0x3B9C0668: case 0x29: case 0x27: case 0x1D: case 0x3B9C066A: case 0x3B9E96A9: case 0x24: case 0x3B9BFAB2: case 0x3B9B1FF2: case 0x3B9B1FF0: case 0x3B9B1FF1: case 0x3B9AF4F8: case 0x3B9CBE02: case 0x3B9CBE03: case 0x3B9CBE04: case 0x3B9CBE00: case 0x3B9CBE01: case 0x3B9B2F91: case 0x3B9B2F90: case 0x3B9B2F92: case 0x21: case 0x3B9CE513: case 0x22: case 0x3B9D3EE8: case 0x20: case 0x3B9D5A41: case 0x3B9D3EEB: case 0x3B9D3EEC: case 0x3B9C1608: case 0x3: case 0x3B9C2D79: case 0x3B9C19F5: case 0x3B9C19F4: case 0x3B9BB466: case 0x3B9BB464: case 0x3B9BDB71: case 0x3B9BB467: case 0x3B9BB46B: case 0x3B9BB463: case 0x3B9BB465: case 0x3B9BB46C: case 0x3B9DAC48: case 0x2: case 0x3B9D71B0: case 0x3B9D006B: case 0x3B9C2D7A: case 0x3B9AD1D0: case 0x3B9CA2AA: case 0x3B9E0A08: case 0x3B9CA2AC: case 0x3B9CA2AB: case 0x3B9CA2A9: case 0x3B9C2D78: case 0x3B9AD5B8: case 0x3B9CA2A8: case 0x3B9AD1D1: case 0x3B9D3331: case 0x3B9D3330: case 0xA: case 0x3B9C8368: case 0x3B9C8751: case 0x3B9BE342: case 0x3B9BA4C1: case 0x3B9BE729: case 0x3B9BA8A9: case 0x3B9BF6C8: case 0x3B9BFAB1: case 0x3B9BDF5B: case 0x3B9C7F81: case 0x3B9CC1ED: case 0x3B9BDF59: case 0x3B9BE340: case 0x3B9BE341: case 0x3B9BA4C0: case 0x3B9BF2E1: case 0x8: case 0x3B9C8B39: case 0x3B9C8752: case 0x3B9D6211: case 0x3B9BB07A: case 0x3B9C6FE1: case 0x3B9C6FE2: case 0x25: case 0x3B9E9A92: case 0x3B9D4E8D: case 0x3B9D4E8B: case 0x3B9D4E8C: case 0x1C: case 0x3B9C6428: case 0x3B9EB200: case 0x3B9E0DF0: case 0xE: case 0x3B9D3334: case 0x3B9D3333: case 0x3B9D3335: case 0x3B9D0838: case 0x3B9BB07B: case 0x2D: case 0x3B9D0451: case 0x3B9D2B63: case 0x3B9D0452: case 0x3B9E8AF0: case 0x3B9BB468: case 0x3B9BCFB8: case 0xF: case 0x3B9B3F30: case 0x3B9C930A: case 0x3B9CC1EB: case 0x3B9C8B38: case 0x3B9C8750: case 0x3B9BEB10: case 0x3B9D8150: case 0x3B9BE728: case 0x3B9BA8A8: case 0x3B9BFE98: case 0x3B9BFAB0: case 0x3B9C19F1: case 0x3B9DFE51: case 0x1: case 0x3B9CA690: case 0x30: case 0x2F: case 0x3B9CAA78: case 0x6: case 0x3B9BB460: case 0x5: case 0x2E: case 0x3B9CBA19: case 0x3B9CBA18: case 0x3B9BEB11: case 0x3B9CC1EC: case 0x3B9BEB12: case 0x3B9BE72B: case 0x3B9D8151: case 0x3B9E6BB1: case 0x3B9D0453: case 0x3B9BE72A: case 0x3B9E19A8: case 0x3B9CF89C: case 0x3B9AF110: case 0x3B9C19F0: case 0x3B9DFE55: case 0x3B9DFE52: case 0x3B9DFE54: case 0x3B9DFE53: case 0x3B9C0E38: case 0x3B9D7D68: case 0x3B9BCFB9: case 0x3B9D0C20: case 0x3B9D0C21: case 0x3B9E8320: case 0x3B9E4888: case 0x3B9DDB28: case 0x3B9C0669: case 0x3B9C5488: case 0x3B9E96A8: case 0x3B9E96AA: case 0x3B9B8D50: case 0x3B9E9A90: case 0x3B9E7380: case 0x3B9C5870: case 0x3B9DD358: case 0x3B9D3EE9: case 0x3B9D3EEA: case 0x3B9C4CB8: case 0x3B9DC7A0: case 0x3B9DEACA: case 0x3B9BDF5A: case 0x3B9C7F80: case 0x3B9BDF58: case 0x3B9D8152: case 0x3B9BF2E0: case 0x3B9BB078: case 0x3B9C0A50: case 0x3B9DCB88: case 0x3B9E1D90: case 0x3B9E1D91: case 0x3B9DE2F8: case 0x3B9E9E78: case 0x3B9BDB70: case 0x3B9EC588: case 0x3B9BDF5C: case 0x3B9C6FE0: case 0x3B9D3332: case 0x3B9BB07C: case 0x3B9D6210: case 0x3B9ED528: case 0x3B9CE510: case 0x3B9CE511: case 0x3B9EBDB8: case 0x3B9EBDBA: case 0x3B9D5A40: case 0x3B9E67C8: case 0x3B9E6BB0: case 0x3B9BB07E: case 0x3B9DDF10: case 0x3B9DDF11: case 0x3B9B9909: case 0x3B9C44E8: case 0x3B9B990A: case 0x3B9E0620: case 0x3B9EE4C8: case 0x3B9C9308: case 0x3B9AF112: case 0x3B9BB079: case 0x3B9D0069: case 0x3B9D006A: case 0x3B9C0280: case 0x3B9D4E91: case 0x3B9D5270: case 0x3B9CC5D0: case 0x3B9D2B64: case 0x3B9CF89B: case 0x3B9E2948: case 0x3B9D8920: case 0x3B9D8D08: case 0x3B9E40B8: case 0x3B9D9CA8: case 0x3B9F0020: case 0x3B9BC018: case 0x3B9DE6E0: case 0x3B9DFA68: case 0x3B9D2390: case 0x3B9D2391: case 0x3B9D7598: case 0x3B9D4AA1: case 0x3B9D4AA2: case 0x3B9BB080: case 0x3B9C3930: case 0x3B9E38EA: case 0x3B9E38E8: case 0x3B9C9AD8: case 0x3B9F13A8: case 0x3B9F13A9: case 0x3B9BCBD0: case 0x3B9DF298: case 0x3B9DF299: case 0x3B9B3760: case 0x3B9B3761: case 0x3B9EA648: case 0x3B9C9EC0: case 0x3B9DB032: case 0x3B9DB030: case 0x3B9E0238: case 0x3B9EA260: case 0x11: case 0x3B9D0C22: case 0x1A: case 0x3B9D94D8: case 0x3B9D1BC0: case 0x3B9E9A91: case 0x3B9D1008: case 0x3B9DB800: case 0x19: case 0x3B9C4CB9: case 0x1B: case 0x3B9EE4CB: case 0x3B9EE4CD: case 0x3B9EE4CA: case 0x3B9EE4CC: case 0x3B9EE4C9: case 0x14: case 0x1E: case 0x18: case 0x3B9C5489: case 0x3B9C5871: case 0x3B9EBDB9: case 0x17: case 0x3B9B1050: case 0x3B9B3762: case 0x3B9D5271: case 0x3B9CF89A: case 0x12: case 0x3B9E38E9: case 0x3B9C930B: case 0x15: case 0x3B9DB031: case 0x13: case 0x3B9D4AA5: case 0x3B9DEAC8: case 0x3B9D4AA0: case 0x16: case 0x3B9C48D0: case 0x3B9C1DD8: case 0x3B9DB418: case 0x3B9ACDE9: case 0x3B9C1220: case 0x3B9C3160: case 0x3B9D0068: case 0xB: case 0x3B9DFE50: case 0x3B9DEEB1: case 0x3B9BB07D: case 0x3B9D4E88: case 0x3B9D4E93: case 0x3B9C6FE3: case 0x2B: case 0x26: case 0x3B9C73CC: case 0x3B9E1D92: case 0x3B9C9309: case 0x3B9B9908: case 0x3B9CF899: case 0x1F: case 0x3B9CC5D1: case 0x3B9D2B60: case 0x3B9D2B65: case 0x3B9D2B61: case 0x3B9CF898: case 0x9: case 0x3B9BFE99: case 0x3B9BFAB3: case 0x3B9DF29D: case 0x3B9DF29A: case 0x3B9DF29C: case 0x10: case 0x3B9D3B01: case 0x3B9C7B98: case 0x3B9BB07F: case 0x3B9D0454: case 0x3B9B8968: case 0x4: case 0x3B9C73CD: case 0x3B9C73CB: case 0x3B9C73CA: case 0x3B9DD359: case 0x3B9C73CE: case 0x3B9C2990: case 0x3B9C9AD9: case 0x3B9EAE1A: case 0x3B9C9ADA: case 0x3B9EAE18: case 0x3B9EAE19: case 0x3B9E6F98: case 0x3B9C2D7B: case 0x3B9ACDE8: case 0x3B9E0A09: case 0x3B9AF111: case 0x3B9B6A28: case 0x3B9DF29B: case 0x3B9D3B00: case 0x3B9E8ED8: case 0x3B9BB848: case 0x3B9BBC30: case 0x3B9AE170: case 0x3B9BEEF8: case 0x3B9BAC90: case 0x3B9AED28: case 0x23: case 0x3B9D4E8F: case 0x3B9CE512: case 0x3B9ADD88: case 0x3B9AD9A0:
return true;
};
return false;
};
function $VAL_R_VkSubpassContents(value) {
switch (value) {
case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkResult(value) {
switch (value) {
case -0x4: case -0x7: case -0x8: case -0xB: case -0x3B9D3EE8: case -0xC: case -0x3B9EAE18: case -0x3B9AD5B9: case -0x9: case -0x3: case -0x3B9E8320: case -0x3B9D3330: case -0x3B9BE343: case -0x3B9AF8E0: case -0x6: case -0x5: case -0x3B9ACA01: case -0x3B9D71B1: case -0x3B9ACDEC: case -0x2: case -0x1: case -0x3B9BD788: case -0x3B9ACA00: case -0xA: case -0x3B9AF4F9: case 0x4: case 0x3: case 0x5: case 0x1: case 0x3B9ACDEB: case 0x0: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkDynamicState(value) {
switch (value) {
case 0x4: case 0x3: case 0x5: case 0x3B9C4CB8: case 0x3B9DEAC9: case 0x3B9EBDB8: case 0x2: case 0x3B9CF898: case 0x1: case 0x6: case 0x8: case 0x7: case 0x0: case 0x3B9D4AA6: case 0x3B9D4AA4: case 0x3B9C1DD8:
return true;
};
return false;
};
function $VAL_R_VkDescriptorUpdateTemplateType(value) {
switch (value) {
case 0x0:
return true;
};
return false;
};
function $VAL_R_VkObjectType(value) {
switch (value) {
case 0x3B9D4E88: case 0x9: case 0xD: case 0x6: case 0x19: case 0x3B9AF4F8: case 0x3B9CBE00: case 0x16: case 0x17: case 0x14: case 0x3B9C1608: case 0x3: case 0x8: case 0x3B9AD1D0: case 0x3B9AD1D1: case 0xB: case 0x7: case 0x18: case 0xA: case 0xE: case 0x3B9C19F1: case 0x1: case 0x3B9C19F0: case 0x3B9DFE50: case 0x2: case 0x13: case 0x10: case 0x11: case 0xC: case 0x4: case 0x12: case 0x15: case 0x3B9D2B60: case 0x5: case 0xF: case 0x3B9ACA00: case 0x3B9ACDE8: case 0x0: case 0x3B9D3B00:
return true;
};
return false;
};
function $VAL_R_VkSemaphoreTypeKHR(value) {
switch (value) {
case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkPresentModeKHR(value) {
switch (value) {
case 0x2: case 0x3: case 0x0: case 0x1: case 0x3B9C7B99: case 0x3B9C7B98:
return true;
};
return false;
};
function $VAL_R_VkColorSpaceKHR(value) {
switch (value) {
case 0x0: case 0x3B9C604B: case 0x3B9C604C: case 0x3B9C6047: case 0x3B9C6045: case 0x3B9C6046: case 0x3B9C6043: case 0x3B9C6044: case 0x3B9E0A08: case 0x3B9C6041: case 0x3B9C6049: case 0x3B9C6042: case 0x3B9C604E: case 0x3B9C604A: case 0x3B9C6048: case 0x3B9C604D:
return true;
};
return false;
};
function $VAL_R_VkTimeDomainEXT(value) {
switch (value) {
case 0x1: case 0x2: case 0x0: case 0x3:
return true;
};
return false;
};
function $VAL_R_VkDebugReportObjectTypeEXT(value) {
switch (value) {
case 0x3B9D4E88: case 0x9: case 0xD: case 0x6: case 0x19: case 0x1C: case 0x16: case 0x17: case 0x14: case 0x3B9C1608: case 0x3: case 0x8: case 0x1D: case 0x1E: case 0xB: case 0x7: case 0x18: case 0xA: case 0xE: case 0x20: case 0x1: case 0x1F: case 0x2: case 0x10: case 0x13: case 0x11: case 0xC: case 0x4: case 0x12: case 0x15: case 0x3B9D2B60: case 0x5: case 0xF: case 0x1A: case 0x1B: case 0x0: case 0x21:
return true;
};
return false;
};
function $VAL_R_VkRasterizationOrderAMD(value) {
switch (value) {
case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkValidationCheckEXT(value) {
switch (value) {
case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkValidationFeatureEnableEXT(value) {
switch (value) {
case 0x2: case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkValidationFeatureDisableEXT(value) {
switch (value) {
case 0x0: case 0x3: case 0x5: case 0x4: case 0x1: case 0x2: case 0x6:
return true;
};
return false;
};
function $VAL_R_VkIndirectCommandsTokenTypeNVX(value) {
switch (value) {
case 0x1: case 0x7: case 0x5: case 0x6: case 0x2: case 0x0: case 0x4: case 0x3:
return true;
};
return false;
};
function $VAL_R_VkObjectEntryTypeNVX(value) {
switch (value) {
case 0x0: case 0x2: case 0x1: case 0x4: case 0x3:
return true;
};
return false;
};
function $VAL_R_VkDisplayPowerStateEXT(value) {
switch (value) {
case 0x0: case 0x2: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkDeviceEventTypeEXT(value) {
switch (value) {
case 0x0:
return true;
};
return false;
};
function $VAL_R_VkDisplayEventTypeEXT(value) {
switch (value) {
case 0x0:
return true;
};
return false;
};
function $VAL_R_VkViewportCoordinateSwizzleNV(value) {
switch (value) {
case 0x7: case 0x1: case 0x3: case 0x5: case 0x6: case 0x0: case 0x2: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkDiscardRectangleModeEXT(value) {
switch (value) {
case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkPointClippingBehavior(value) {
switch (value) {
case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkSamplerReductionModeEXT(value) {
switch (value) {
case 0x2: case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkTessellationDomainOrigin(value) {
switch (value) {
case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkSamplerYcbcrModelConversion(value) {
switch (value) {
case 0x0: case 0x4: case 0x3: case 0x2: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkSamplerYcbcrRange(value) {
switch (value) {
case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkChromaLocation(value) {
switch (value) {
case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkBlendOverlapEXT(value) {
switch (value) {
case 0x2: case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkCoverageModulationModeNV(value) {
switch (value) {
case 0x2: case 0x0: case 0x3: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkCoverageReductionModeNV(value) {
switch (value) {
case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkValidationCacheHeaderVersionEXT(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkShaderInfoTypeAMD(value) {
switch (value) {
case 0x1: case 0x2: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkQueueGlobalPriorityEXT(value) {
switch (value) {
case 0x200: case 0x80: case 0x100: case 0x400:
return true;
};
return false;
};
function $VAL_R_VkConservativeRasterizationModeEXT(value) {
switch (value) {
case 0x0: case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkVendorId(value) {
switch (value) {
case 0x10003: case 0x10001: case 0x10002:
return true;
};
return false;
};
function $VAL_R_VkDriverIdKHR(value) {
switch (value) {
case 0x2: case 0x1: case 0x9: case 0xC: case 0xB: case 0xA: case 0x7: case 0x6: case 0x5: case 0x3: case 0x4: case 0x8:
return true;
};
return false;
};
function $VAL_R_VkShadingRatePaletteEntryNV(value) {
switch (value) {
case 0x1: case 0x7: case 0x6: case 0x8: case 0xA: case 0x9: case 0xB: case 0x5: case 0x4: case 0x3: case 0x2: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkCoarseSampleOrderTypeNV(value) {
switch (value) {
case 0x1: case 0x0: case 0x2: case 0x3:
return true;
};
return false;
};
function $VAL_R_VkCopyAccelerationStructureModeNV(value) {
switch (value) {
case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkAccelerationStructureTypeNV(value) {
switch (value) {
case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkGeometryTypeNV(value) {
switch (value) {
case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkAccelerationStructureMemoryRequirementsTypeNV(value) {
switch (value) {
case 0x1: case 0x0: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkRayTracingShaderGroupTypeNV(value) {
switch (value) {
case 0x0: case 0x2: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkMemoryOverallocationBehaviorAMD(value) {
switch (value) {
case 0x1: case 0x0: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkScopeNV(value) {
switch (value) {
case 0x1: case 0x5: case 0x3: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkComponentTypeNV(value) {
switch (value) {
case 0x0: case 0x1: case 0x2: case 0x4: case 0x5: case 0x6: case 0x3: case 0x8: case 0x9: case 0xA: case 0x7:
return true;
};
return false;
};
function $VAL_R_VkFullScreenExclusiveEXT(value) {
switch (value) {
case 0x1: case 0x3: case 0x0: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkPerformanceConfigurationTypeINTEL(value) {
switch (value) {
case 0x0:
return true;
};
return false;
};
function $VAL_R_VkQueryPoolSamplingModeINTEL(value) {
switch (value) {
case 0x0:
return true;
};
return false;
};
function $VAL_R_VkPerformanceOverrideTypeINTEL(value) {
switch (value) {
case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkPerformanceParameterTypeINTEL(value) {
switch (value) {
case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkPerformanceValueTypeINTEL(value) {
switch (value) {
case 0x3: case 0x2: case 0x4: case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkPipelineExecutableStatisticFormatKHR(value) {
switch (value) {
case 0x0: case 0x3: case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkShaderFloatControlsIndependenceKHR(value) {
switch (value) {
case 0x0: case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkLineRasterizationModeEXT(value) {
switch (value) {
case 0x2: case 0x0: case 0x1: case 0x3:
return true;
};
return false;
};
function $VAL_R_VkCullModeFlagBits(value) {
switch (value) {
case 0x2: case 0x3: case 0x1: case 0x0:
return true;
};
return false;
};
function $VAL_R_VkQueueFlagBits(value) {
switch (value) {
case 0x2: case 0x1: case 0x10: case 0x20: case 0x40: case 0x8: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkRenderPassCreateFlagBits(value) {
switch (value) {
case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkDeviceQueueCreateFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkMemoryPropertyFlagBits(value) {
switch (value) {
case 0x40: case 0x1: case 0x80: case 0x8: case 0x4: case 0x2: case 0x10: case 0x20:
return true;
};
return false;
};
function $VAL_R_VkMemoryHeapFlagBits(value) {
switch (value) {
case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkAccessFlagBits(value) {
switch (value) {
case 0x200000: case 0x400000: case 0x80: case 0x80000: case 0x100: case 0x20000: case 0x40000: case 0x100000: case 0x200: case 0x400: case 0x1000000: case 0x2000: case 0x4000: case 0x2: case 0x1: case 0x10: case 0x8000: case 0x10000: case 0x10000000: case 0x20000000: case 0x40000000: case -0x80000000: case 0x20: case 0x40: case 0x800000: case 0x800: case 0x1000: case 0x4000000: case 0x8000000: case 0x2000000: case 0x8: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkBufferUsageFlagBits(value) {
switch (value) {
case 0x200: case 0x40: case 0x100: case 0x400: case 0x2000: case 0x4000: case 0x8000: case 0x10000: case 0x20000: case 0x20: case 0x8: case 0x2: case 0x1: case 0x800: case 0x1000: case 0x10: case 0x4: case 0x80:
return true;
};
return false;
};
function $VAL_R_VkBufferCreateFlagBits(value) {
switch (value) {
case 0x10: case 0x8: case 0x4: case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkShaderStageFlagBits(value) {
switch (value) {
case 0x7FFFFFFF: case 0x1F: case 0x200: case 0x2000: case 0x400: case 0x20: case 0x10: case 0x8: case 0x1000: case 0x80: case 0x800: case 0x100: case 0x40: case 0x2: case 0x4: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkImageUsageFlagBits(value) {
switch (value) {
case 0x10: case 0x20: case 0x200: case 0x80: case 0x400: case 0x800: case 0x1000: case 0x2000: case 0x4000: case 0x8000: case 0x4: case 0x100: case 0x8: case 0x2: case 0x1: case 0x40:
return true;
};
return false;
};
function $VAL_R_VkImageCreateFlagBits(value) {
switch (value) {
case 0x20: case 0x400: case 0x80: case 0x2000: case 0x10: case 0x200: case 0x100: case 0x8: case 0x800: case 0x1000: case 0x4: case 0x1: case 0x2: case 0x40: case 0x4000:
return true;
};
return false;
};
function $VAL_R_VkImageViewCreateFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkSamplerCreateFlagBits(value) {
switch (value) {
case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkPipelineCreateFlagBits(value) {
switch (value) {
case 0x2: case 0x80: case 0x40: case 0x20: case 0x4: case 0x1: case 0x10: case 0x8:
return true;
};
return false;
};
function $VAL_R_VkPipelineShaderStageCreateFlagBits(value) {
switch (value) {
case 0x1: case 0x2: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkColorComponentFlagBits(value) {
switch (value) {
case 0x8: case 0x4: case 0x2: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkFenceCreateFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkSemaphoreCreateFlagBits(value) {
return false;
};
function $VAL_R_VkFormatFeatureFlagBits(value) {
switch (value) {
case 0x800: case 0x400: case 0x80: case 0x100: case 0x800000: case 0x200: case 0x400000: case 0x1000000: case 0x20000: case 0x2000000: case 0x4000000: case 0x8000000: case 0x10000000: case 0x1: case 0x2000: case 0x1000: case 0x10000: case 0x100000: case 0x200000: case 0x40000: case 0x80000: case 0x4: case 0x2: case 0x20: case 0x10: case 0x8000: case 0x4000: case 0x8: case 0x40:
return true;
};
return false;
};
function $VAL_R_VkQueryControlFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkQueryResultFlagBits(value) {
switch (value) {
case 0x1: case 0x8: case 0x2: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkCommandBufferUsageFlagBits(value) {
switch (value) {
case 0x1: case 0x2: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkQueryPipelineStatisticFlagBits(value) {
switch (value) {
case 0x20: case 0x40: case 0x400: case 0x80: case 0x8: case 0x10: case 0x2: case 0x1: case 0x100: case 0x200: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkImageAspectFlagBits(value) {
switch (value) {
case 0x1: case 0x2: case 0x80: case 0x100: case 0x200: case 0x400: case 0x8: case 0x10: case 0x20: case 0x40: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkSparseImageFormatFlagBits(value) {
switch (value) {
case 0x2: case 0x4: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkSparseMemoryBindFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkPipelineStageFlagBits(value) {
switch (value) {
case 0x2000000: case 0x10000: case 0x8000: case 0x2000: case 0x400: case 0x20000: case 0x800: case 0x40000: case 0x2: case 0x100: case 0x800000: case 0x80: case 0x40: case 0x4000: case 0x200: case 0x100000: case 0x200000: case 0x4000000: case 0x8000000: case 0x400000: case 0x80000: case 0x10: case 0x20: case 0x1: case 0x1000: case 0x1000000: case 0x4: case 0x8:
return true;
};
return false;
};
function $VAL_R_VkCommandPoolCreateFlagBits(value) {
switch (value) {
case 0x4: case 0x2: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkCommandPoolResetFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkCommandBufferResetFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkSampleCountFlagBits(value) {
switch (value) {
case 0x10: case 0x1: case 0x2: case 0x20: case 0x4: case 0x40: case 0x8:
return true;
};
return false;
};
function $VAL_R_VkAttachmentDescriptionFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkStencilFaceFlagBits(value) {
switch (value) {
case 0x2: case 0x3: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkDescriptorPoolCreateFlagBits(value) {
switch (value) {
case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkDependencyFlagBits(value) {
switch (value) {
case 0x1: case 0x4: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkSemaphoreWaitFlagBitsKHR(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkDisplayPlaneAlphaFlagBitsKHR(value) {
switch (value) {
case 0x2: case 0x1: case 0x4: case 0x8:
return true;
};
return false;
};
function $VAL_R_VkCompositeAlphaFlagBitsKHR(value) {
switch (value) {
case 0x8: case 0x1: case 0x4: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkSurfaceTransformFlagBitsKHR(value) {
switch (value) {
case 0x10: case 0x40: case 0x80: case 0x20: case 0x1: case 0x100: case 0x4: case 0x8: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkSwapchainImageUsageFlagBitsANDROID(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkDebugReportFlagBitsEXT(value) {
switch (value) {
case 0x10: case 0x8: case 0x1: case 0x4: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkExternalMemoryHandleTypeFlagBitsNV(value) {
switch (value) {
case 0x4: case 0x8: case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkExternalMemoryFeatureFlagBitsNV(value) {
switch (value) {
case 0x1: case 0x2: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkSubgroupFeatureFlagBits(value) {
switch (value) {
case 0x4: case 0x8: case 0x1: case 0x40: case 0x100: case 0x80: case 0x10: case 0x20: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkIndirectCommandsLayoutUsageFlagBitsNVX(value) {
switch (value) {
case 0x4: case 0x8: case 0x2: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkObjectEntryUsageFlagBitsNVX(value) {
switch (value) {
case 0x2: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkDescriptorSetLayoutCreateFlagBits(value) {
switch (value) {
case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkExternalMemoryHandleTypeFlagBits(value) {
switch (value) {
case 0x400: case 0x8: case 0x10: case 0x20: case 0x40: case 0x200: case 0x80: case 0x100: case 0x1: case 0x2: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkExternalMemoryFeatureFlagBits(value) {
switch (value) {
case 0x1: case 0x2: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkExternalSemaphoreHandleTypeFlagBits(value) {
switch (value) {
case 0x8: case 0x1: case 0x2: case 0x4: case 0x10:
return true;
};
return false;
};
function $VAL_R_VkExternalSemaphoreFeatureFlagBits(value) {
switch (value) {
case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkSemaphoreImportFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkExternalFenceHandleTypeFlagBits(value) {
switch (value) {
case 0x1: case 0x2: case 0x4: case 0x8:
return true;
};
return false;
};
function $VAL_R_VkExternalFenceFeatureFlagBits(value) {
switch (value) {
case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkFenceImportFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkSurfaceCounterFlagBitsEXT(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkPeerMemoryFeatureFlagBits(value) {
switch (value) {
case 0x2: case 0x1: case 0x8: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkMemoryAllocateFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkDeviceGroupPresentModeFlagBitsKHR(value) {
switch (value) {
case 0x1: case 0x8: case 0x2: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkSwapchainCreateFlagBitsKHR(value) {
switch (value) {
case 0x4: case 0x2: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkSubpassDescriptionFlagBits(value) {
switch (value) {
case 0x1: case 0x2: case 0x4: case 0x8:
return true;
};
return false;
};
function $VAL_R_VkDebugUtilsMessageSeverityFlagBitsEXT(value) {
switch (value) {
case 0x1000: case 0x10: case 0x1: case 0x100:
return true;
};
return false;
};
function $VAL_R_VkDebugUtilsMessageTypeFlagBitsEXT(value) {
switch (value) {
case 0x1: case 0x4: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkDescriptorBindingFlagBitsEXT(value) {
switch (value) {
case 0x4: case 0x1: case 0x2: case 0x8:
return true;
};
return false;
};
function $VAL_R_VkConditionalRenderingFlagBitsEXT(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkResolveModeFlagBitsKHR(value) {
switch (value) {
case 0x2: case 0x8: case 0x4: case 0x0: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkGeometryInstanceFlagBitsNV(value) {
switch (value) {
case 0x8: case 0x4: case 0x1: case 0x2:
return true;
};
return false;
};
function $VAL_R_VkGeometryFlagBitsNV(value) {
switch (value) {
case 0x2: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkBuildAccelerationStructureFlagBitsNV(value) {
switch (value) {
case 0x2: case 0x1: case 0x10: case 0x8: case 0x4:
return true;
};
return false;
};
function $VAL_R_VkFramebufferCreateFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkPipelineCreationFeedbackFlagBitsEXT(value) {
switch (value) {
case 0x2: case 0x4: case 0x1:
return true;
};
return false;
};
function $VAL_R_VkShaderCorePropertiesFlagBitsAMD(value) {
return false;
};
function $VAL_R_VkShaderModuleCreateFlagBits(value) {
switch (value) {
case 0x1:
return true;
};
return false;
};
function $VAL_R_VkPipelineCompilerControlFlagBitsAMD(value) {
return false;
};
/** VkInstance **/
function VkInstance(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkInstance' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkInstance.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkInstance"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkInstance.byteLength = 0x8;
/** VkPhysicalDevice **/
function VkPhysicalDevice(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkPhysicalDevice' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkPhysicalDevice.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkPhysicalDevice"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkPhysicalDevice.byteLength = 0x8;
/** VkDevice **/
function VkDevice(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkDevice' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkDevice.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkDevice"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkDevice.byteLength = 0x8;
/** VkQueue **/
function VkQueue(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkQueue' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkQueue.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkQueue"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkQueue.byteLength = 0x8;
/** VkCommandBuffer **/
function VkCommandBuffer(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkCommandBuffer' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkCommandBuffer.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkCommandBuffer"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkCommandBuffer.byteLength = 0x8;
/** VkDeviceMemory **/
function VkDeviceMemory(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkDeviceMemory' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkDeviceMemory.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkDeviceMemory"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkDeviceMemory.byteLength = 0x8;
/** VkCommandPool **/
function VkCommandPool(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkCommandPool' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkCommandPool.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkCommandPool"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkCommandPool.byteLength = 0x8;
/** VkBuffer **/
function VkBuffer(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkBuffer' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkBuffer.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkBuffer"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkBuffer.byteLength = 0x8;
/** VkBufferView **/
function VkBufferView(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkBufferView' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkBufferView.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkBufferView"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkBufferView.byteLength = 0x8;
/** VkImage **/
function VkImage(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkImage' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkImage.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkImage"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkImage.byteLength = 0x8;
/** VkImageView **/
function VkImageView(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkImageView' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkImageView.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkImageView"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkImageView.byteLength = 0x8;
/** VkShaderModule **/
function VkShaderModule(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkShaderModule' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkShaderModule.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkShaderModule"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkShaderModule.byteLength = 0x8;
/** VkPipeline **/
function VkPipeline(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkPipeline' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkPipeline.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkPipeline"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkPipeline.byteLength = 0x8;
/** VkPipelineLayout **/
function VkPipelineLayout(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkPipelineLayout' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkPipelineLayout.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkPipelineLayout"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkPipelineLayout.byteLength = 0x8;
/** VkSampler **/
function VkSampler(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkSampler' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkSampler.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkSampler"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkSampler.byteLength = 0x8;
/** VkDescriptorSet **/
function VkDescriptorSet(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkDescriptorSet' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkDescriptorSet.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkDescriptorSet"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkDescriptorSet.byteLength = 0x8;
/** VkDescriptorSetLayout **/
function VkDescriptorSetLayout(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkDescriptorSetLayout' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkDescriptorSetLayout.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkDescriptorSetLayout"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkDescriptorSetLayout.byteLength = 0x8;
/** VkDescriptorPool **/
function VkDescriptorPool(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkDescriptorPool' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkDescriptorPool.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkDescriptorPool"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkDescriptorPool.byteLength = 0x8;
/** VkFence **/
function VkFence(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkFence' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkFence.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkFence"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkFence.byteLength = 0x8;
/** VkSemaphore **/
function VkSemaphore(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkSemaphore' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkSemaphore.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkSemaphore"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkSemaphore.byteLength = 0x8;
/** VkEvent **/
function VkEvent(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkEvent' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkEvent.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkEvent"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkEvent.byteLength = 0x8;
/** VkQueryPool **/
function VkQueryPool(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkQueryPool' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkQueryPool.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkQueryPool"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkQueryPool.byteLength = 0x8;
/** VkFramebuffer **/
function VkFramebuffer(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkFramebuffer' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkFramebuffer.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkFramebuffer"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkFramebuffer.byteLength = 0x8;
/** VkRenderPass **/
function VkRenderPass(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkRenderPass' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkRenderPass.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkRenderPass"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkRenderPass.byteLength = 0x8;
/** VkPipelineCache **/
function VkPipelineCache(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkPipelineCache' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkPipelineCache.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkPipelineCache"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkPipelineCache.byteLength = 0x8;
/** VkObjectTableNVX **/
function VkObjectTableNVX(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkObjectTableNVX' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkObjectTableNVX.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkObjectTableNVX"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkObjectTableNVX.byteLength = 0x8;
/** VkIndirectCommandsLayoutNVX **/
function VkIndirectCommandsLayoutNVX(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkIndirectCommandsLayoutNVX' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkIndirectCommandsLayoutNVX.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkIndirectCommandsLayoutNVX"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkIndirectCommandsLayoutNVX.byteLength = 0x8;
/** VkDescriptorUpdateTemplate **/
function VkDescriptorUpdateTemplate(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkDescriptorUpdateTemplate' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkDescriptorUpdateTemplate.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkDescriptorUpdateTemplate"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkDescriptorUpdateTemplate.byteLength = 0x8;
/** VkSamplerYcbcrConversion **/
function VkSamplerYcbcrConversion(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkSamplerYcbcrConversion' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkSamplerYcbcrConversion.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkSamplerYcbcrConversion"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkSamplerYcbcrConversion.byteLength = 0x8;
/** VkValidationCacheEXT **/
function VkValidationCacheEXT(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkValidationCacheEXT' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkValidationCacheEXT.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkValidationCacheEXT"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkValidationCacheEXT.byteLength = 0x8;
/** VkAccelerationStructureNV **/
function VkAccelerationStructureNV(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkAccelerationStructureNV' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkAccelerationStructureNV.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkAccelerationStructureNV"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkAccelerationStructureNV.byteLength = 0x8;
/** VkPerformanceConfigurationINTEL **/
function VkPerformanceConfigurationINTEL(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkPerformanceConfigurationINTEL' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkPerformanceConfigurationINTEL.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkPerformanceConfigurationINTEL"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkPerformanceConfigurationINTEL.byteLength = 0x8;
/** VkDisplayKHR **/
function VkDisplayKHR(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkDisplayKHR' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkDisplayKHR.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkDisplayKHR"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkDisplayKHR.byteLength = 0x8;
/** VkDisplayModeKHR **/
function VkDisplayModeKHR(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkDisplayModeKHR' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkDisplayModeKHR.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkDisplayModeKHR"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkDisplayModeKHR.byteLength = 0x8;
/** VkSurfaceKHR **/
function VkSurfaceKHR(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkSurfaceKHR' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkSurfaceKHR.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkSurfaceKHR"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkSurfaceKHR.byteLength = 0x8;
/** VkSwapchainKHR **/
function VkSwapchainKHR(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkSwapchainKHR' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkSwapchainKHR.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkSwapchainKHR"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkSwapchainKHR.byteLength = 0x8;
/** VkDebugReportCallbackEXT **/
function VkDebugReportCallbackEXT(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkDebugReportCallbackEXT' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkDebugReportCallbackEXT.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkDebugReportCallbackEXT"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkDebugReportCallbackEXT.byteLength = 0x8;
/** VkDebugUtilsMessengerEXT **/
function VkDebugUtilsMessengerEXT(opts) {
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.memoryOffset = 0x0;
if (opts !== void 0) {
if (opts.$memoryBuffer === void 0) {
throw new Error("'VkDebugUtilsMessengerEXT' doesn't take any arguments");
}
else {
if (opts.$memoryOffset !== void 0) {
let addr = getAddressFromArrayBuffer(opts.$memoryBuffer);
this.memoryBuffer = getArrayBufferFromAddress(addr + BigInt(opts.$memoryOffset), BI8);
this.memoryOffset = opts.$memoryOffset;
} else {
this.memoryBuffer = opts.$memoryBuffer;
}
}
}
else {
this.memoryBuffer = new ArrayBuffer(0x8);
}
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
};
VkDebugUtilsMessengerEXT.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
//console.log(`Reflect: "VkDebugUtilsMessengerEXT"`, this.memoryAddress, memoryAddress);
dstView.set(srcView, 0x0);
};
VkDebugUtilsMessengerEXT.byteLength = 0x8;
/** VkBaseOutStructure **/
function VkBaseOutStructure(opts, byteOffset) {
if (new.target !== VkBaseOutStructure) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkBaseOutStructure, STRUCT_CACHE_VkBaseOutStructure);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkBaseOutStructure, STRUCT_CACHE_VkBaseOutStructure);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkBaseOutStructure'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x10);
} else {
this.memoryBuffer = new ArrayBuffer(0x10);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x10);
}
this._pNext = null;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
}
};
Object.defineProperties(VkBaseOutStructure.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBaseOutStructure.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkBaseOutStructure.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
if (this._pNext === null && this.memoryView.getBigInt64(0x8, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x8, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkBaseOutStructure.byteLength));
this._pNext = new VkBaseOutStructure({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x8, this._pNext.memoryAddress, true);
return this.pNext;
} else {
return this._pNext;
}
},
set(value) {
if (value !== null && value.constructor === VkBaseOutStructure) {
value.flush();
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkBaseOutStructure.pNext': Expected 'VkBaseOutStructure' but got '" + typeToString(value) + "'");
}
}
},
});
VkBaseOutStructure.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x10);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x10"], 0x0);
this._pNext = null;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
}
};
VkBaseOutStructure.prototype.flush = function flush() {
return true;
};
VkBaseOutStructure.prototype.reflect = function reflect(memoryAddress) {
};
VkBaseOutStructure.createCopyFrom = function createCopyFrom(original) {
let copy = new VkBaseOutStructure();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
return copy;
};
VkBaseOutStructure.byteLength = 0x10;
VkBaseOutStructure.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
};
/** VkBaseInStructure **/
function VkBaseInStructure(opts, byteOffset) {
if (new.target !== VkBaseInStructure) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkBaseInStructure, STRUCT_CACHE_VkBaseInStructure);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkBaseInStructure, STRUCT_CACHE_VkBaseInStructure);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkBaseInStructure'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x10);
} else {
this.memoryBuffer = new ArrayBuffer(0x10);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x10);
}
this._pNext = null;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
}
};
Object.defineProperties(VkBaseInStructure.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBaseInStructure.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkBaseInStructure.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
if (this._pNext === null && this.memoryView.getBigInt64(0x8, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x8, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkBaseInStructure.byteLength));
this._pNext = new VkBaseInStructure({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x8, this._pNext.memoryAddress, true);
return this.pNext;
} else {
return this._pNext;
}
},
set(value) {
if (value !== null && value.constructor === VkBaseInStructure) {
value.flush();
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkBaseInStructure.pNext': Expected 'VkBaseInStructure' but got '" + typeToString(value) + "'");
}
}
},
});
VkBaseInStructure.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x10);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x10"], 0x0);
this._pNext = null;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
}
};
VkBaseInStructure.prototype.flush = function flush() {
return true;
};
VkBaseInStructure.prototype.reflect = function reflect(memoryAddress) {
};
VkBaseInStructure.createCopyFrom = function createCopyFrom(original) {
let copy = new VkBaseInStructure();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
return copy;
};
VkBaseInStructure.byteLength = 0x10;
VkBaseInStructure.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
};
/** VkOffset2D **/
function VkOffset2D(opts, byteOffset) {
if (new.target !== VkOffset2D) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkOffset2D, STRUCT_CACHE_VkOffset2D);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkOffset2D, STRUCT_CACHE_VkOffset2D);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkOffset2D'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x8);
} else {
this.memoryBuffer = new ArrayBuffer(0x8);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
}
if (typeof opts === "object") {
if (opts.x !== void 0) this.x = opts.x;
if (opts.y !== void 0) this.y = opts.y;
}
};
Object.defineProperties(VkOffset2D.prototype, {
"x": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkOffset2D.x");
this.memoryView.setInt32(0x0, value, true);
}
},
"y": {
get() {
return this.memoryView.getInt32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkOffset2D.y");
this.memoryView.setInt32(0x4, value, true);
}
},
});
VkOffset2D.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x8);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x8"], 0x0);
if (typeof opts === "object") {
if (opts.x !== void 0) this.x = opts.x;
if (opts.y !== void 0) this.y = opts.y;
}
};
VkOffset2D.prototype.flush = function flush() {
return true;
};
VkOffset2D.prototype.reflect = function reflect(memoryAddress) {
};
VkOffset2D.createCopyFrom = function createCopyFrom(original) {
let copy = new VkOffset2D();
copy.x = original.x;
copy.y = original.y;
return copy;
};
VkOffset2D.byteLength = 0x8;
VkOffset2D.memoryLayout = {
x: {
byteOffset: 0x0,
byteLength: 0x4
},
y: {
byteOffset: 0x4,
byteLength: 0x4
},
};
/** VkOffset3D **/
function VkOffset3D(opts, byteOffset) {
if (new.target !== VkOffset3D) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkOffset3D, STRUCT_CACHE_VkOffset3D);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkOffset3D, STRUCT_CACHE_VkOffset3D);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkOffset3D'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0xC);
} else {
this.memoryBuffer = new ArrayBuffer(0xC);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0xC);
}
if (typeof opts === "object") {
if (opts.x !== void 0) this.x = opts.x;
if (opts.y !== void 0) this.y = opts.y;
if (opts.z !== void 0) this.z = opts.z;
}
};
Object.defineProperties(VkOffset3D.prototype, {
"x": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkOffset3D.x");
this.memoryView.setInt32(0x0, value, true);
}
},
"y": {
get() {
return this.memoryView.getInt32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkOffset3D.y");
this.memoryView.setInt32(0x4, value, true);
}
},
"z": {
get() {
return this.memoryView.getInt32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkOffset3D.z");
this.memoryView.setInt32(0x8, value, true);
}
},
});
VkOffset3D.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0xC);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0xC"], 0x0);
if (typeof opts === "object") {
if (opts.x !== void 0) this.x = opts.x;
if (opts.y !== void 0) this.y = opts.y;
if (opts.z !== void 0) this.z = opts.z;
}
};
VkOffset3D.prototype.flush = function flush() {
return true;
};
VkOffset3D.prototype.reflect = function reflect(memoryAddress) {
};
VkOffset3D.createCopyFrom = function createCopyFrom(original) {
let copy = new VkOffset3D();
copy.x = original.x;
copy.y = original.y;
copy.z = original.z;
return copy;
};
VkOffset3D.byteLength = 0xC;
VkOffset3D.memoryLayout = {
x: {
byteOffset: 0x0,
byteLength: 0x4
},
y: {
byteOffset: 0x4,
byteLength: 0x4
},
z: {
byteOffset: 0x8,
byteLength: 0x4
},
};
/** VkExtent2D **/
function VkExtent2D(opts, byteOffset) {
if (new.target !== VkExtent2D) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkExtent2D, STRUCT_CACHE_VkExtent2D);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkExtent2D, STRUCT_CACHE_VkExtent2D);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkExtent2D'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x8);
} else {
this.memoryBuffer = new ArrayBuffer(0x8);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
}
if (typeof opts === "object") {
if (opts.width !== void 0) this.width = opts.width;
if (opts.height !== void 0) this.height = opts.height;
}
};
Object.defineProperties(VkExtent2D.prototype, {
"width": {
get() {
return this.memoryView.getUint32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkExtent2D.width");
this.memoryView.setUint32(0x0, value, true);
}
},
"height": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkExtent2D.height");
this.memoryView.setUint32(0x4, value, true);
}
},
});
VkExtent2D.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x8);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x8"], 0x0);
if (typeof opts === "object") {
if (opts.width !== void 0) this.width = opts.width;
if (opts.height !== void 0) this.height = opts.height;
}
};
VkExtent2D.prototype.flush = function flush() {
return true;
};
VkExtent2D.prototype.reflect = function reflect(memoryAddress) {
};
VkExtent2D.createCopyFrom = function createCopyFrom(original) {
let copy = new VkExtent2D();
copy.width = original.width;
copy.height = original.height;
return copy;
};
VkExtent2D.byteLength = 0x8;
VkExtent2D.memoryLayout = {
width: {
byteOffset: 0x0,
byteLength: 0x4
},
height: {
byteOffset: 0x4,
byteLength: 0x4
},
};
/** VkExtent3D **/
function VkExtent3D(opts, byteOffset) {
if (new.target !== VkExtent3D) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkExtent3D, STRUCT_CACHE_VkExtent3D);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkExtent3D, STRUCT_CACHE_VkExtent3D);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkExtent3D'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0xC);
} else {
this.memoryBuffer = new ArrayBuffer(0xC);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0xC);
}
if (typeof opts === "object") {
if (opts.width !== void 0) this.width = opts.width;
if (opts.height !== void 0) this.height = opts.height;
if (opts.depth !== void 0) this.depth = opts.depth;
}
};
Object.defineProperties(VkExtent3D.prototype, {
"width": {
get() {
return this.memoryView.getUint32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkExtent3D.width");
this.memoryView.setUint32(0x0, value, true);
}
},
"height": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkExtent3D.height");
this.memoryView.setUint32(0x4, value, true);
}
},
"depth": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkExtent3D.depth");
this.memoryView.setUint32(0x8, value, true);
}
},
});
VkExtent3D.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0xC);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0xC"], 0x0);
if (typeof opts === "object") {
if (opts.width !== void 0) this.width = opts.width;
if (opts.height !== void 0) this.height = opts.height;
if (opts.depth !== void 0) this.depth = opts.depth;
}
};
VkExtent3D.prototype.flush = function flush() {
return true;
};
VkExtent3D.prototype.reflect = function reflect(memoryAddress) {
};
VkExtent3D.createCopyFrom = function createCopyFrom(original) {
let copy = new VkExtent3D();
copy.width = original.width;
copy.height = original.height;
copy.depth = original.depth;
return copy;
};
VkExtent3D.byteLength = 0xC;
VkExtent3D.memoryLayout = {
width: {
byteOffset: 0x0,
byteLength: 0x4
},
height: {
byteOffset: 0x4,
byteLength: 0x4
},
depth: {
byteOffset: 0x8,
byteLength: 0x4
},
};
/** VkViewport **/
function VkViewport(opts, byteOffset) {
if (new.target !== VkViewport) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkViewport, STRUCT_CACHE_VkViewport);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkViewport, STRUCT_CACHE_VkViewport);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkViewport'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
if (typeof opts === "object") {
if (opts.x !== void 0) this.x = opts.x;
if (opts.y !== void 0) this.y = opts.y;
if (opts.width !== void 0) this.width = opts.width;
if (opts.height !== void 0) this.height = opts.height;
if (opts.minDepth !== void 0) this.minDepth = opts.minDepth;
if (opts.maxDepth !== void 0) this.maxDepth = opts.maxDepth;
}
};
Object.defineProperties(VkViewport.prototype, {
"x": {
get() {
return this.memoryView.getFloat32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkViewport.x");
this.memoryView.setFloat32(0x0, value, true);
}
},
"y": {
get() {
return this.memoryView.getFloat32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkViewport.y");
this.memoryView.setFloat32(0x4, value, true);
}
},
"width": {
get() {
return this.memoryView.getFloat32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkViewport.width");
this.memoryView.setFloat32(0x8, value, true);
}
},
"height": {
get() {
return this.memoryView.getFloat32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkViewport.height");
this.memoryView.setFloat32(0xC, value, true);
}
},
"minDepth": {
get() {
return this.memoryView.getFloat32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkViewport.minDepth");
this.memoryView.setFloat32(0x10, value, true);
}
},
"maxDepth": {
get() {
return this.memoryView.getFloat32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkViewport.maxDepth");
this.memoryView.setFloat32(0x14, value, true);
}
},
});
VkViewport.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
if (typeof opts === "object") {
if (opts.x !== void 0) this.x = opts.x;
if (opts.y !== void 0) this.y = opts.y;
if (opts.width !== void 0) this.width = opts.width;
if (opts.height !== void 0) this.height = opts.height;
if (opts.minDepth !== void 0) this.minDepth = opts.minDepth;
if (opts.maxDepth !== void 0) this.maxDepth = opts.maxDepth;
}
};
VkViewport.prototype.flush = function flush() {
return true;
};
VkViewport.prototype.reflect = function reflect(memoryAddress) {
};
VkViewport.createCopyFrom = function createCopyFrom(original) {
let copy = new VkViewport();
copy.x = original.x;
copy.y = original.y;
copy.width = original.width;
copy.height = original.height;
copy.minDepth = original.minDepth;
copy.maxDepth = original.maxDepth;
return copy;
};
VkViewport.byteLength = 0x18;
VkViewport.memoryLayout = {
x: {
byteOffset: 0x0,
byteLength: 0x4
},
y: {
byteOffset: 0x4,
byteLength: 0x4
},
width: {
byteOffset: 0x8,
byteLength: 0x4
},
height: {
byteOffset: 0xC,
byteLength: 0x4
},
minDepth: {
byteOffset: 0x10,
byteLength: 0x4
},
maxDepth: {
byteOffset: 0x14,
byteLength: 0x4
},
};
/** VkRect2D **/
function VkRect2D(opts, byteOffset) {
if (new.target !== VkRect2D) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkRect2D, STRUCT_CACHE_VkRect2D);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkRect2D, STRUCT_CACHE_VkRect2D);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkRect2D'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x10);
} else {
this.memoryBuffer = new ArrayBuffer(0x10);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x10);
}
this._offset = new VkOffset2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
this._extent = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x8 });
if (typeof opts === "object") {
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.extent !== void 0) this.extent = opts.extent;
}
};
Object.defineProperties(VkRect2D.prototype, {
"offset": {
get() {
return this._offset;
},
set(value) {
if (value !== null && value.constructor === VkOffset2D) {
value.flush();
this._offset = value;
} else if (value === null) {
this._offset = null;
} else {
throw new TypeError("Invalid type for 'VkRect2D.offset': Expected 'VkOffset2D' but got '" + typeToString(value) + "'");
}
}
},
"extent": {
get() {
return this._extent;
},
set(value) {
if (value !== null && value.constructor === VkExtent2D) {
value.flush();
this._extent = value;
} else if (value === null) {
this._extent = null;
} else {
throw new TypeError("Invalid type for 'VkRect2D.extent': Expected 'VkExtent2D' but got '" + typeToString(value) + "'");
}
}
},
});
VkRect2D.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x10);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x10"], 0x0);
if (this._offset !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._offset.memoryBuffer) this._offset = new VkOffset2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
else this._offset.reset();
}
if (this._extent !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._extent.memoryBuffer) this._extent = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x8 });
else this._extent.reset();
}
if (typeof opts === "object") {
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.extent !== void 0) this.extent = opts.extent;
}
};
VkRect2D.prototype.flush = function flush() {
if (this._offset !== null) {
let offset = this._offset;
offset.flush();
if (this.memoryBuffer !== offset.memoryBuffer) {
let srcView = new Uint8Array(offset.memoryBuffer, offset.$memoryOffset, 0x8);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x0);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkRect2D.offset' isn't used as shared-memory");
}
}
if (this._extent !== null) {
let extent = this._extent;
extent.flush();
if (this.memoryBuffer !== extent.memoryBuffer) {
let srcView = new Uint8Array(extent.memoryBuffer, extent.$memoryOffset, 0x8);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x8);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkRect2D.extent' isn't used as shared-memory");
}
}
return true;
};
VkRect2D.prototype.reflect = function reflect(memoryAddress) {
};
VkRect2D.createCopyFrom = function createCopyFrom(original) {
let copy = new VkRect2D();
if (original.offset !== null) {
copy.offset = original.offset.constructor.createCopyFrom(original.offset);
}
if (original.extent !== null) {
copy.extent = original.extent.constructor.createCopyFrom(original.extent);
}
return copy;
};
VkRect2D.byteLength = 0x10;
VkRect2D.memoryLayout = {
offset: {
byteOffset: 0x0,
byteLength: 0x8
},
extent: {
byteOffset: 0x8,
byteLength: 0x8
},
};
/** VkClearRect **/
function VkClearRect(opts, byteOffset) {
if (new.target !== VkClearRect) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkClearRect, STRUCT_CACHE_VkClearRect);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkClearRect, STRUCT_CACHE_VkClearRect);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkClearRect'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._rect = new VkRect2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
if (typeof opts === "object") {
if (opts.rect !== void 0) this.rect = opts.rect;
if (opts.baseArrayLayer !== void 0) this.baseArrayLayer = opts.baseArrayLayer;
if (opts.layerCount !== void 0) this.layerCount = opts.layerCount;
}
};
Object.defineProperties(VkClearRect.prototype, {
"rect": {
get() {
return this._rect;
},
set(value) {
if (value !== null && value.constructor === VkRect2D) {
value.flush();
this._rect = value;
} else if (value === null) {
this._rect = null;
} else {
throw new TypeError("Invalid type for 'VkClearRect.rect': Expected 'VkRect2D' but got '" + typeToString(value) + "'");
}
}
},
"baseArrayLayer": {
get() {
return this.memoryView.getUint32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkClearRect.baseArrayLayer");
this.memoryView.setUint32(0x10, value, true);
}
},
"layerCount": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkClearRect.layerCount");
this.memoryView.setUint32(0x14, value, true);
}
},
});
VkClearRect.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
if (this._rect !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._rect.memoryBuffer) this._rect = new VkRect2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
else this._rect.reset();
}
if (typeof opts === "object") {
if (opts.rect !== void 0) this.rect = opts.rect;
if (opts.baseArrayLayer !== void 0) this.baseArrayLayer = opts.baseArrayLayer;
if (opts.layerCount !== void 0) this.layerCount = opts.layerCount;
}
};
VkClearRect.prototype.flush = function flush() {
if (this._rect !== null) {
let rect = this._rect;
rect.flush();
if (this.memoryBuffer !== rect.memoryBuffer) {
let srcView = new Uint8Array(rect.memoryBuffer, rect.$memoryOffset, 0x10);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x0);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkClearRect.rect' isn't used as shared-memory");
}
}
return true;
};
VkClearRect.prototype.reflect = function reflect(memoryAddress) {
};
VkClearRect.createCopyFrom = function createCopyFrom(original) {
let copy = new VkClearRect();
if (original.rect !== null) {
copy.rect = original.rect.constructor.createCopyFrom(original.rect);
}
copy.baseArrayLayer = original.baseArrayLayer;
copy.layerCount = original.layerCount;
return copy;
};
VkClearRect.byteLength = 0x18;
VkClearRect.memoryLayout = {
rect: {
byteOffset: 0x0,
byteLength: 0x10
},
baseArrayLayer: {
byteOffset: 0x10,
byteLength: 0x4
},
layerCount: {
byteOffset: 0x14,
byteLength: 0x4
},
};
/** VkComponentMapping **/
function VkComponentMapping(opts, byteOffset) {
if (new.target !== VkComponentMapping) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkComponentMapping, STRUCT_CACHE_VkComponentMapping);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkComponentMapping, STRUCT_CACHE_VkComponentMapping);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkComponentMapping'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x10);
} else {
this.memoryBuffer = new ArrayBuffer(0x10);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x10);
}
if (typeof opts === "object") {
if (opts.r !== void 0) this.r = opts.r;
if (opts.g !== void 0) this.g = opts.g;
if (opts.b !== void 0) this.b = opts.b;
if (opts.a !== void 0) this.a = opts.a;
}
};
Object.defineProperties(VkComponentMapping.prototype, {
"r": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkComponentMapping.r");
if (!$VAL_R_VkComponentSwizzle(value)) {
throw new RangeError("Invalid value for 'VkComponentMapping.r': '" + value + "' is not a value of 'VkComponentSwizzle'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"g": {
get() {
return this.memoryView.getInt32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkComponentMapping.g");
if (!$VAL_R_VkComponentSwizzle(value)) {
throw new RangeError("Invalid value for 'VkComponentMapping.g': '" + value + "' is not a value of 'VkComponentSwizzle'");
}
this.memoryView.setInt32(0x4, value, true);
}
},
"b": {
get() {
return this.memoryView.getInt32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkComponentMapping.b");
if (!$VAL_R_VkComponentSwizzle(value)) {
throw new RangeError("Invalid value for 'VkComponentMapping.b': '" + value + "' is not a value of 'VkComponentSwizzle'");
}
this.memoryView.setInt32(0x8, value, true);
}
},
"a": {
get() {
return this.memoryView.getInt32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkComponentMapping.a");
if (!$VAL_R_VkComponentSwizzle(value)) {
throw new RangeError("Invalid value for 'VkComponentMapping.a': '" + value + "' is not a value of 'VkComponentSwizzle'");
}
this.memoryView.setInt32(0xC, value, true);
}
},
});
VkComponentMapping.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x10);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x10"], 0x0);
if (typeof opts === "object") {
if (opts.r !== void 0) this.r = opts.r;
if (opts.g !== void 0) this.g = opts.g;
if (opts.b !== void 0) this.b = opts.b;
if (opts.a !== void 0) this.a = opts.a;
}
};
VkComponentMapping.prototype.flush = function flush() {
return true;
};
VkComponentMapping.prototype.reflect = function reflect(memoryAddress) {
};
VkComponentMapping.createCopyFrom = function createCopyFrom(original) {
let copy = new VkComponentMapping();
copy.r = original.r;
copy.g = original.g;
copy.b = original.b;
copy.a = original.a;
return copy;
};
VkComponentMapping.byteLength = 0x10;
VkComponentMapping.memoryLayout = {
r: {
byteOffset: 0x0,
byteLength: 0x4
},
g: {
byteOffset: 0x4,
byteLength: 0x4
},
b: {
byteOffset: 0x8,
byteLength: 0x4
},
a: {
byteOffset: 0xC,
byteLength: 0x4
},
};
/** VkPhysicalDeviceProperties **/
function VkPhysicalDeviceProperties(opts, byteOffset) {
if (new.target !== VkPhysicalDeviceProperties) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPhysicalDeviceProperties, STRUCT_CACHE_VkPhysicalDeviceProperties);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPhysicalDeviceProperties, STRUCT_CACHE_VkPhysicalDeviceProperties);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPhysicalDeviceProperties'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x338);
} else {
this.memoryBuffer = new ArrayBuffer(0x338);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x338);
}
this._pipelineCacheUUID = [...Array(16)].fill(0x0);
this._limits = new VkPhysicalDeviceLimits({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x128 });
this._sparseProperties = new VkPhysicalDeviceSparseProperties({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x320 });
if (typeof opts === "object") {
}
};
Object.defineProperties(VkPhysicalDeviceProperties.prototype, {
"apiVersion": {
get() {
return this.memoryView.getUint32(0x0, true);
},
},
"driverVersion": {
get() {
return this.memoryView.getUint32(0x4, true);
},
},
"vendorID": {
get() {
return this.memoryView.getUint32(0x8, true);
},
},
"deviceID": {
get() {
return this.memoryView.getUint32(0xC, true);
},
},
"deviceType": {
get() {
return this.memoryView.getInt32(0x10, true);
},
},
"deviceName": {
get() {
return decodeNullTerminatedUTF8String(
new Uint8Array(this.memoryBuffer).subarray(this.$memoryOffset + 0x14, 0x128)
) || null;
},
},
"pipelineCacheUUID": {
get() {
return [
this.memoryView.getUint8(0x114, true),
this.memoryView.getUint8(0x115, true),
this.memoryView.getUint8(0x116, true),
this.memoryView.getUint8(0x117, true),
this.memoryView.getUint8(0x118, true),
this.memoryView.getUint8(0x119, true),
this.memoryView.getUint8(0x11A, true),
this.memoryView.getUint8(0x11B, true),
this.memoryView.getUint8(0x11C, true),
this.memoryView.getUint8(0x11D, true),
this.memoryView.getUint8(0x11E, true),
this.memoryView.getUint8(0x11F, true),
this.memoryView.getUint8(0x120, true),
this.memoryView.getUint8(0x121, true),
this.memoryView.getUint8(0x122, true),
this.memoryView.getUint8(0x123, true)
];
},
},
"limits": {
get() {
return this._limits;
},
},
"sparseProperties": {
get() {
return this._sparseProperties;
},
},
});
VkPhysicalDeviceProperties.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x338);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x338"], 0x0);
if (this._pipelineCacheUUID !== null) this._pipelineCacheUUID.fill(0x0);
else this._pipelineCacheUUID = [...Array(16)].fill(0x0);
if (this._limits !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._limits.memoryBuffer) this._limits = new VkPhysicalDeviceLimits({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x128 });
else this._limits.reset();
}
if (this._sparseProperties !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._sparseProperties.memoryBuffer) this._sparseProperties = new VkPhysicalDeviceSparseProperties({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x320 });
else this._sparseProperties.reset();
}
if (typeof opts === "object") {
}
};
VkPhysicalDeviceProperties.prototype.flush = function flush() {
return true;
};
VkPhysicalDeviceProperties.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x338));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x338), 0x0);};
VkPhysicalDeviceProperties.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPhysicalDeviceProperties();
copy.apiVersion = original.apiVersion;
copy.driverVersion = original.driverVersion;
copy.vendorID = original.vendorID;
copy.deviceID = original.deviceID;
copy.deviceType = original.deviceType;
copy.deviceName = original.deviceName;
if (original.pipelineCacheUUID !== null) {
copy.pipelineCacheUUID = [...Array(original.pipelineCacheUUID.length)].map((v, i) => {
return original.pipelineCacheUUID[i];
});
}
if (original.limits !== null) {
copy.limits = original.limits.constructor.createCopyFrom(original.limits);
}
if (original.sparseProperties !== null) {
copy.sparseProperties = original.sparseProperties.constructor.createCopyFrom(original.sparseProperties);
}
return copy;
};
VkPhysicalDeviceProperties.byteLength = 0x338;
VkPhysicalDeviceProperties.memoryLayout = {
apiVersion: {
byteOffset: 0x0,
byteLength: 0x4
},
driverVersion: {
byteOffset: 0x4,
byteLength: 0x4
},
vendorID: {
byteOffset: 0x8,
byteLength: 0x4
},
deviceID: {
byteOffset: 0xC,
byteLength: 0x4
},
deviceType: {
byteOffset: 0x10,
byteLength: 0x4
},
deviceName: {
byteOffset: 0x14,
byteLength: 0x100
},
pipelineCacheUUID: {
byteOffset: 0x114,
byteLength: 0x10
},
limits: {
byteOffset: 0x128,
byteLength: 0x1F8
},
sparseProperties: {
byteOffset: 0x320,
byteLength: 0x14
},
};
/** VkExtensionProperties **/
function VkExtensionProperties(opts, byteOffset) {
if (new.target !== VkExtensionProperties) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkExtensionProperties, STRUCT_CACHE_VkExtensionProperties);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkExtensionProperties, STRUCT_CACHE_VkExtensionProperties);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkExtensionProperties'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x104);
} else {
this.memoryBuffer = new ArrayBuffer(0x104);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x104);
}
if (typeof opts === "object") {
}
};
Object.defineProperties(VkExtensionProperties.prototype, {
"extensionName": {
get() {
return decodeNullTerminatedUTF8String(
new Uint8Array(this.memoryBuffer).subarray(this.$memoryOffset + 0x0, 0x100)
) || null;
},
},
"specVersion": {
get() {
return this.memoryView.getUint32(0x100, true);
},
},
});
VkExtensionProperties.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x104);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x104"], 0x0);
if (typeof opts === "object") {
}
};
VkExtensionProperties.prototype.flush = function flush() {
return true;
};
VkExtensionProperties.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x104));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x104), 0x0);};
VkExtensionProperties.createCopyFrom = function createCopyFrom(original) {
let copy = new VkExtensionProperties();
copy.extensionName = original.extensionName;
copy.specVersion = original.specVersion;
return copy;
};
VkExtensionProperties.byteLength = 0x104;
VkExtensionProperties.memoryLayout = {
extensionName: {
byteOffset: 0x0,
byteLength: 0x100
},
specVersion: {
byteOffset: 0x100,
byteLength: 0x4
},
};
/** VkLayerProperties **/
function VkLayerProperties(opts, byteOffset) {
if (new.target !== VkLayerProperties) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkLayerProperties, STRUCT_CACHE_VkLayerProperties);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkLayerProperties, STRUCT_CACHE_VkLayerProperties);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkLayerProperties'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x208);
} else {
this.memoryBuffer = new ArrayBuffer(0x208);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x208);
}
if (typeof opts === "object") {
}
};
Object.defineProperties(VkLayerProperties.prototype, {
"layerName": {
get() {
return decodeNullTerminatedUTF8String(
new Uint8Array(this.memoryBuffer).subarray(this.$memoryOffset + 0x0, 0x100)
) || null;
},
},
"specVersion": {
get() {
return this.memoryView.getUint32(0x100, true);
},
},
"implementationVersion": {
get() {
return this.memoryView.getUint32(0x104, true);
},
},
"description": {
get() {
return decodeNullTerminatedUTF8String(
new Uint8Array(this.memoryBuffer).subarray(this.$memoryOffset + 0x108, 0x310)
) || null;
},
},
});
VkLayerProperties.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x208);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x208"], 0x0);
if (typeof opts === "object") {
}
};
VkLayerProperties.prototype.flush = function flush() {
return true;
};
VkLayerProperties.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x208));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x208), 0x0);};
VkLayerProperties.createCopyFrom = function createCopyFrom(original) {
let copy = new VkLayerProperties();
copy.layerName = original.layerName;
copy.specVersion = original.specVersion;
copy.implementationVersion = original.implementationVersion;
copy.description = original.description;
return copy;
};
VkLayerProperties.byteLength = 0x208;
VkLayerProperties.memoryLayout = {
layerName: {
byteOffset: 0x0,
byteLength: 0x100
},
specVersion: {
byteOffset: 0x100,
byteLength: 0x4
},
implementationVersion: {
byteOffset: 0x104,
byteLength: 0x4
},
description: {
byteOffset: 0x108,
byteLength: 0x100
},
};
/** VkApplicationInfo **/
function VkApplicationInfo(opts, byteOffset) {
if (new.target !== VkApplicationInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkApplicationInfo, STRUCT_CACHE_VkApplicationInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkApplicationInfo, STRUCT_CACHE_VkApplicationInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkApplicationInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x30);
} else {
this.memoryBuffer = new ArrayBuffer(0x30);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x30);
}
this._pNext = null;
this._pApplicationName = null;
this._pEngineName = null;
this.sType = 0x0;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.pApplicationName !== void 0) this.pApplicationName = opts.pApplicationName;
if (opts.applicationVersion !== void 0) this.applicationVersion = opts.applicationVersion;
if (opts.pEngineName !== void 0) this.pEngineName = opts.pEngineName;
if (opts.engineVersion !== void 0) this.engineVersion = opts.engineVersion;
if (opts.apiVersion !== void 0) this.apiVersion = opts.apiVersion;
}
};
Object.defineProperties(VkApplicationInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkApplicationInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkApplicationInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkApplicationInfo.pNext' isn't allowed to be filled");
}
},
"pApplicationName": {
get() {
if (this._pApplicationName !== null) {
let str = textDecoder.decode(this._pApplicationName);
return str.substr(0, str.length - 1);
} else {
// native memory contains a string which we didn't reflect yet
if (this.memoryView.getBigInt64(0x10, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x10, true);
let length = findNullTerminatedUTF8StringLength(addr);
let buffer = getArrayBufferFromAddress(addr, BigInt(length));
this._pApplicationName = buffer;
return this.pApplicationName;
}
return null;
}
},
set(value) {
if (value !== null && value.constructor === String) {
this._pApplicationName = textEncoder.encode(value + NULLT).buffer;
this.memoryView.setBigInt64(0x10, getAddressFromArrayBuffer(this._pApplicationName), true);
} else if (value === null) {
this._pApplicationName = null;
this.memoryView.setBigInt64(0x10, BI0, true);
} else {
ASSERT_IS_STRING(value, "VkApplicationInfo.pApplicationName");
}
}
},
"applicationVersion": {
get() {
return this.memoryView.getUint32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkApplicationInfo.applicationVersion");
this.memoryView.setUint32(0x18, value, true);
}
},
"pEngineName": {
get() {
if (this._pEngineName !== null) {
let str = textDecoder.decode(this._pEngineName);
return str.substr(0, str.length - 1);
} else {
// native memory contains a string which we didn't reflect yet
if (this.memoryView.getBigInt64(0x20, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x20, true);
let length = findNullTerminatedUTF8StringLength(addr);
let buffer = getArrayBufferFromAddress(addr, BigInt(length));
this._pEngineName = buffer;
return this.pEngineName;
}
return null;
}
},
set(value) {
if (value !== null && value.constructor === String) {
this._pEngineName = textEncoder.encode(value + NULLT).buffer;
this.memoryView.setBigInt64(0x20, getAddressFromArrayBuffer(this._pEngineName), true);
} else if (value === null) {
this._pEngineName = null;
this.memoryView.setBigInt64(0x20, BI0, true);
} else {
ASSERT_IS_STRING(value, "VkApplicationInfo.pEngineName");
}
}
},
"engineVersion": {
get() {
return this.memoryView.getUint32(0x28, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkApplicationInfo.engineVersion");
this.memoryView.setUint32(0x28, value, true);
}
},
"apiVersion": {
get() {
return this.memoryView.getUint32(0x2C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkApplicationInfo.apiVersion");
this.memoryView.setUint32(0x2C, value, true);
}
},
});
VkApplicationInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x30);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x30"], 0x0);
this._pNext = null;
this._pApplicationName = null;
this._pEngineName = null;
this.sType = 0x0;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.pApplicationName !== void 0) this.pApplicationName = opts.pApplicationName;
if (opts.applicationVersion !== void 0) this.applicationVersion = opts.applicationVersion;
if (opts.pEngineName !== void 0) this.pEngineName = opts.pEngineName;
if (opts.engineVersion !== void 0) this.engineVersion = opts.engineVersion;
if (opts.apiVersion !== void 0) this.apiVersion = opts.apiVersion;
}
};
VkApplicationInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkApplicationInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkApplicationInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkApplicationInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.pApplicationName = original.pApplicationName;
copy.applicationVersion = original.applicationVersion;
copy.pEngineName = original.pEngineName;
copy.engineVersion = original.engineVersion;
copy.apiVersion = original.apiVersion;
return copy;
};
VkApplicationInfo.byteLength = 0x30;
VkApplicationInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
pApplicationName: {
byteOffset: 0x10,
byteLength: 0x8
},
applicationVersion: {
byteOffset: 0x18,
byteLength: 0x4
},
pEngineName: {
byteOffset: 0x20,
byteLength: 0x8
},
engineVersion: {
byteOffset: 0x28,
byteLength: 0x4
},
apiVersion: {
byteOffset: 0x2C,
byteLength: 0x4
},
};
/** VkAllocationCallbacks **/
function VkAllocationCallbacks(opts, byteOffset) {
if (new.target !== VkAllocationCallbacks) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkAllocationCallbacks, STRUCT_CACHE_VkAllocationCallbacks);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkAllocationCallbacks, STRUCT_CACHE_VkAllocationCallbacks);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkAllocationCallbacks'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x30);
} else {
this.memoryBuffer = new ArrayBuffer(0x30);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x30);
}
this._pUserData = null;
this._pfnAllocation = null;this._pfnAllocationCallbackProxy = null;
this._pfnReallocation = null;this._pfnReallocationCallbackProxy = null;
this._pfnFree = null;this._pfnFreeCallbackProxy = null;
this._pfnInternalAllocation = null;this._pfnInternalAllocationCallbackProxy = null;
this._pfnInternalFree = null;this._pfnInternalFreeCallbackProxy = null;
if (typeof opts === "object") {
if (opts.pUserData !== void 0) this.pUserData = opts.pUserData;
if (opts.pfnAllocation !== void 0) this.pfnAllocation = opts.pfnAllocation;
if (opts.pfnReallocation !== void 0) this.pfnReallocation = opts.pfnReallocation;
if (opts.pfnFree !== void 0) this.pfnFree = opts.pfnFree;
if (opts.pfnInternalAllocation !== void 0) this.pfnInternalAllocation = opts.pfnInternalAllocation;
if (opts.pfnInternalFree !== void 0) this.pfnInternalFree = opts.pfnInternalFree;
}
};
Object.defineProperties(VkAllocationCallbacks.prototype, {
"pUserData": {
get() {
return this._pUserData;
},
set(value) {
if (value !== null && value.constructor === ArrayBuffer) {
this._pUserData = value;
this.memoryView.setBigInt64(0x0, getAddressFromArrayBuffer(value), true);
} else if (value === null) {
this._pUserData = null;
this.memoryView.setBigInt64(0x0, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkAllocationCallbacks.pUserData': Expected 'ArrayBuffer' but got '" + typeToString(value) + "'");
}
}
},
"pfnAllocation": {
get() {
return this._pfnAllocation;
},
set(value) {
if (value !== null && value.constructor === Function) {
let MITM = function() {
for (let ii = 0; ii < arguments.length; ++ii) {
let arg = arguments[ii];
if (arg instanceof Object && arg.constructor.createCopyFrom instanceof Function) {
let copy = arg.constructor.createCopyFrom(arg);
arguments[ii] = copy;
}
};
return value.apply(this, arguments);
}.bind(this);
this._pfnAllocation = value;
this._pfnAllocationCallbackProxy = new nvk.$CallbackProxy(MITM, module.exports);
this.memoryView.setBigInt64(0x8, nvk.$vulkanCallbackFunctionPointers["vkAllocationFunction"], true);
this.memoryView.setBigInt64(0x0, this._pfnAllocationCallbackProxy.getAddress(), true);
} else if (value === null) {
this._pfnAllocation = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkAllocationCallbacks.pfnAllocation': Expected 'Function' but got '" + typeToString(value) + "'");
}
}
},
"pfnReallocation": {
get() {
return this._pfnReallocation;
},
set(value) {
if (value !== null && value.constructor === Function) {
let MITM = function() {
for (let ii = 0; ii < arguments.length; ++ii) {
let arg = arguments[ii];
if (arg instanceof Object && arg.constructor.createCopyFrom instanceof Function) {
let copy = arg.constructor.createCopyFrom(arg);
arguments[ii] = copy;
}
};
return value.apply(this, arguments);
}.bind(this);
this._pfnReallocation = value;
this._pfnReallocationCallbackProxy = new nvk.$CallbackProxy(MITM, module.exports);
this.memoryView.setBigInt64(0x10, nvk.$vulkanCallbackFunctionPointers["vkReallocationFunction"], true);
this.memoryView.setBigInt64(0x0, this._pfnReallocationCallbackProxy.getAddress(), true);
} else if (value === null) {
this._pfnReallocation = null;
this.memoryView.setBigInt64(0x10, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkAllocationCallbacks.pfnReallocation': Expected 'Function' but got '" + typeToString(value) + "'");
}
}
},
"pfnFree": {
get() {
return this._pfnFree;
},
set(value) {
if (value !== null && value.constructor === Function) {
let MITM = function() {
for (let ii = 0; ii < arguments.length; ++ii) {
let arg = arguments[ii];
if (arg instanceof Object && arg.constructor.createCopyFrom instanceof Function) {
let copy = arg.constructor.createCopyFrom(arg);
arguments[ii] = copy;
}
};
return value.apply(this, arguments);
}.bind(this);
this._pfnFree = value;
this._pfnFreeCallbackProxy = new nvk.$CallbackProxy(MITM, module.exports);
this.memoryView.setBigInt64(0x18, nvk.$vulkanCallbackFunctionPointers["vkFreeFunction"], true);
this.memoryView.setBigInt64(0x0, this._pfnFreeCallbackProxy.getAddress(), true);
} else if (value === null) {
this._pfnFree = null;
this.memoryView.setBigInt64(0x18, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkAllocationCallbacks.pfnFree': Expected 'Function' but got '" + typeToString(value) + "'");
}
}
},
"pfnInternalAllocation": {
get() {
return this._pfnInternalAllocation;
},
set(value) {
if (value !== null && value.constructor === Function) {
let MITM = function() {
for (let ii = 0; ii < arguments.length; ++ii) {
let arg = arguments[ii];
if (arg instanceof Object && arg.constructor.createCopyFrom instanceof Function) {
let copy = arg.constructor.createCopyFrom(arg);
arguments[ii] = copy;
}
};
return value.apply(this, arguments);
}.bind(this);
this._pfnInternalAllocation = value;
this._pfnInternalAllocationCallbackProxy = new nvk.$CallbackProxy(MITM, module.exports);
this.memoryView.setBigInt64(0x20, nvk.$vulkanCallbackFunctionPointers["vkInternalAllocationNotification"], true);
this.memoryView.setBigInt64(0x0, this._pfnInternalAllocationCallbackProxy.getAddress(), true);
} else if (value === null) {
this._pfnInternalAllocation = null;
this.memoryView.setBigInt64(0x20, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkAllocationCallbacks.pfnInternalAllocation': Expected 'Function' but got '" + typeToString(value) + "'");
}
}
},
"pfnInternalFree": {
get() {
return this._pfnInternalFree;
},
set(value) {
if (value !== null && value.constructor === Function) {
let MITM = function() {
for (let ii = 0; ii < arguments.length; ++ii) {
let arg = arguments[ii];
if (arg instanceof Object && arg.constructor.createCopyFrom instanceof Function) {
let copy = arg.constructor.createCopyFrom(arg);
arguments[ii] = copy;
}
};
return value.apply(this, arguments);
}.bind(this);
this._pfnInternalFree = value;
this._pfnInternalFreeCallbackProxy = new nvk.$CallbackProxy(MITM, module.exports);
this.memoryView.setBigInt64(0x28, nvk.$vulkanCallbackFunctionPointers["vkInternalFreeNotification"], true);
this.memoryView.setBigInt64(0x0, this._pfnInternalFreeCallbackProxy.getAddress(), true);
} else if (value === null) {
this._pfnInternalFree = null;
this.memoryView.setBigInt64(0x28, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkAllocationCallbacks.pfnInternalFree': Expected 'Function' but got '" + typeToString(value) + "'");
}
}
},
});
VkAllocationCallbacks.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x30);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x30"], 0x0);
this._pUserData = null;
this._pfnAllocation = null;
this._pfnReallocation = null;
this._pfnFree = null;
this._pfnInternalAllocation = null;
this._pfnInternalFree = null;
if (typeof opts === "object") {
if (opts.pUserData !== void 0) this.pUserData = opts.pUserData;
if (opts.pfnAllocation !== void 0) this.pfnAllocation = opts.pfnAllocation;
if (opts.pfnReallocation !== void 0) this.pfnReallocation = opts.pfnReallocation;
if (opts.pfnFree !== void 0) this.pfnFree = opts.pfnFree;
if (opts.pfnInternalAllocation !== void 0) this.pfnInternalAllocation = opts.pfnInternalAllocation;
if (opts.pfnInternalFree !== void 0) this.pfnInternalFree = opts.pfnInternalFree;
}
};
VkAllocationCallbacks.prototype.flush = function flush() {
return true;
};
VkAllocationCallbacks.prototype.reflect = function reflect(memoryAddress) {
};
VkAllocationCallbacks.createCopyFrom = function createCopyFrom(original) {
let copy = new VkAllocationCallbacks();
if (original.pUserData !== null) {
let buf = new ArrayBuffer(original.pUserData.byteLength);
new Uint8Array(buf).set(new Uint8Array(original.pUserData), 0x0);
copy.pUserData = buf;
}
copy.pfnAllocation = original.pfnAllocation;
copy.pfnReallocation = original.pfnReallocation;
copy.pfnFree = original.pfnFree;
copy.pfnInternalAllocation = original.pfnInternalAllocation;
copy.pfnInternalFree = original.pfnInternalFree;
return copy;
};
VkAllocationCallbacks.byteLength = 0x30;
VkAllocationCallbacks.memoryLayout = {
pUserData: {
byteOffset: 0x0,
byteLength: 0x8
},
pfnAllocation: {
byteOffset: 0x8,
byteLength: 0x8
},
pfnReallocation: {
byteOffset: 0x10,
byteLength: 0x8
},
pfnFree: {
byteOffset: 0x18,
byteLength: 0x8
},
pfnInternalAllocation: {
byteOffset: 0x20,
byteLength: 0x8
},
pfnInternalFree: {
byteOffset: 0x28,
byteLength: 0x8
},
};
/** VkDeviceQueueCreateInfo **/
function VkDeviceQueueCreateInfo(opts, byteOffset) {
if (new.target !== VkDeviceQueueCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDeviceQueueCreateInfo, STRUCT_CACHE_VkDeviceQueueCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDeviceQueueCreateInfo, STRUCT_CACHE_VkDeviceQueueCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDeviceQueueCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x28);
} else {
this.memoryBuffer = new ArrayBuffer(0x28);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x28);
}
this._pNext = null;
this._pQueuePriorities = null;
this.sType = 0x2;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.queueFamilyIndex !== void 0) this.queueFamilyIndex = opts.queueFamilyIndex;
if (opts.queueCount !== void 0) this.queueCount = opts.queueCount;
if (opts.pQueuePriorities !== void 0) this.pQueuePriorities = opts.pQueuePriorities;
}
};
Object.defineProperties(VkDeviceQueueCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDeviceQueueCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkDeviceQueueCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkDeviceQueueCreateInfo.pNext'");
switch (sType) {
case 0x3B9D71B0:
break;
default:
throw new TypeError("Invalid type for 'VkDeviceQueueCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkDeviceQueueCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDeviceQueueCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"queueFamilyIndex": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDeviceQueueCreateInfo.queueFamilyIndex");
this.memoryView.setUint32(0x14, value, true);
}
},
"queueCount": {
get() {
return this.memoryView.getUint32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDeviceQueueCreateInfo.queueCount");
this.memoryView.setUint32(0x18, value, true);
}
},
"pQueuePriorities": {
get() {
return this._pQueuePriorities;
},
set(value) {
if (value !== null && value.constructor === Float32Array) {
this._pQueuePriorities = value;
this.memoryView.setBigInt64(0x20, getAddressFromArrayBuffer(value.buffer), true);
} else if (value === null) {
this._pQueuePriorities = null;
this.memoryView.setBigInt64(0x20, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkDeviceQueueCreateInfo.pQueuePriorities': Expected 'Float32Array' but got '" + typeToString(value) + "'");
}
}
},
});
VkDeviceQueueCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x28);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x28"], 0x0);
this._pNext = null;
this._pQueuePriorities = null;
this.sType = 0x2;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.queueFamilyIndex !== void 0) this.queueFamilyIndex = opts.queueFamilyIndex;
if (opts.queueCount !== void 0) this.queueCount = opts.queueCount;
if (opts.pQueuePriorities !== void 0) this.pQueuePriorities = opts.pQueuePriorities;
}
};
VkDeviceQueueCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkDeviceQueueCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkDeviceQueueCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDeviceQueueCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.queueFamilyIndex = original.queueFamilyIndex;
copy.queueCount = original.queueCount;
if (original.pQueuePriorities !== null) {
copy.pQueuePriorities = new Float32Array(original.pQueuePriorities);
}
return copy;
};
VkDeviceQueueCreateInfo.byteLength = 0x28;
VkDeviceQueueCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
queueFamilyIndex: {
byteOffset: 0x14,
byteLength: 0x4
},
queueCount: {
byteOffset: 0x18,
byteLength: 0x4
},
pQueuePriorities: {
byteOffset: 0x20,
byteLength: 0x8
},
};
/** VkDeviceCreateInfo **/
function VkDeviceCreateInfo(opts, byteOffset) {
if (new.target !== VkDeviceCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDeviceCreateInfo, STRUCT_CACHE_VkDeviceCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDeviceCreateInfo, STRUCT_CACHE_VkDeviceCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDeviceCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x48);
} else {
this.memoryBuffer = new ArrayBuffer(0x48);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x48);
}
this._pNext = null;
this._pQueueCreateInfos = null;
this._pQueueCreateInfosNative = null;
this._ppEnabledLayerNames = null;
this._ppEnabledLayerNamesNative = null;
this._ppEnabledExtensionNames = null;
this._ppEnabledExtensionNamesNative = null;
this._pEnabledFeatures = null;
this.sType = 0x3;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.queueCreateInfoCount !== void 0) this.queueCreateInfoCount = opts.queueCreateInfoCount;
if (opts.pQueueCreateInfos !== void 0) this.pQueueCreateInfos = opts.pQueueCreateInfos;
if (opts.enabledLayerCount !== void 0) this.enabledLayerCount = opts.enabledLayerCount;
if (opts.ppEnabledLayerNames !== void 0) this.ppEnabledLayerNames = opts.ppEnabledLayerNames;
if (opts.enabledExtensionCount !== void 0) this.enabledExtensionCount = opts.enabledExtensionCount;
if (opts.ppEnabledExtensionNames !== void 0) this.ppEnabledExtensionNames = opts.ppEnabledExtensionNames;
if (opts.pEnabledFeatures !== void 0) this.pEnabledFeatures = opts.pEnabledFeatures;
}
};
Object.defineProperties(VkDeviceCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDeviceCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkDeviceCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkDeviceCreateInfo.pNext'");
switch (sType) {
case 0x3B9BB078:
case 0x3B9C9EC0:
case 0x3B9B9909:
case 0x3B9BDB71:
case 0x3B9C0E38:
case 0x3B9D7598:
case 0x3B9D2B64:
case 0x3B9D0069:
case 0x3B9D0C20:
case 0x3B9CE510:
case 0x3B9BC018:
case 0x3B9C0A50:
case 0x3B9EC588:
case 0x3B9D3EE9:
case 0x3B9DF298:
case 0x3B9D7D68:
case 0x3B9C0669:
case 0x3B9E0238:
case 0x3B9D8920:
case 0x3B9DB032:
case 0x3B9BCFB9:
case 0x3B9B3760:
case 0x3B9D5270:
case 0x3B9DEACA:
case 0x3B9B8D50:
case 0x3B9DDB28:
case 0x3B9DE2F8:
case 0x3B9DE6E0:
case 0x3B9E7380:
case 0x3B9D4AA1:
case 0x3B9DDF10:
case 0x3B9DAC48:
case 0x3B9E1D90:
case 0x3B9E2948:
case 0x3B9EA648:
case 0x3B9C5870:
case 0x3B9E6BB0:
case 0x3B9E8320:
case 0x3B9C6FE0:
case 0x3B9BCBD0:
case 0x3B9E96A8:
case 0x3B9EA260:
case 0x3B9E9A90:
case 0x3B9DFA68:
case 0x3B9D8D08:
case 0x3B9ED528:
case 0x3B9D2390:
case 0x3B9E9E78:
case 0x3B9EE4C8:
case 0x3B9F0020:
case 0x3B9F13A8:
case 0x3B9E38EA:
case 0x3B9EBDB8:
case 0x3B9E4888:
break;
default:
throw new TypeError("Invalid type for 'VkDeviceCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkDeviceCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDeviceCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"queueCreateInfoCount": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDeviceCreateInfo.queueCreateInfoCount");
this.memoryView.setUint32(0x14, value, true);
}
},
"pQueueCreateInfos": {
get() {
if (this._pQueueCreateInfos === null && this.memoryView.getBigInt64(0x18, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x18, true);
let array = decodeNativeArrayOfObjects(addr, this.queueCreateInfoCount, VkDeviceQueueCreateInfo);
this._pQueueCreateInfos = array;
return this.pQueueCreateInfos;
} else {
return this._pQueueCreateInfos;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pQueueCreateInfos = value;
} else if (value === null) {
this._pQueueCreateInfos = null;
} else {
throw new TypeError("Invalid type for 'VkDeviceCreateInfo.pQueueCreateInfos': Expected 'Array VkDeviceQueueCreateInfo' but got '" + typeToString(value) + "'");
}
}
},
"enabledLayerCount": {
get() {
return this.memoryView.getUint32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDeviceCreateInfo.enabledLayerCount");
this.memoryView.setUint32(0x20, value, true);
}
},
"ppEnabledLayerNames": {
get() {
return this._ppEnabledLayerNames;
},
set(value) {
if (value !== null && value.constructor === Array) {
this._ppEnabledLayerNames = value;
} else if (value === null) {
this._ppEnabledLayerNames = null;
} else {
throw new TypeError("Invalid type for 'VkDeviceCreateInfo.ppEnabledLayerNames': Expected 'Array char' but got '" + typeToString(value) + "'");
}
}
},
"enabledExtensionCount": {
get() {
return this.memoryView.getUint32(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDeviceCreateInfo.enabledExtensionCount");
this.memoryView.setUint32(0x30, value, true);
}
},
"ppEnabledExtensionNames": {
get() {
return this._ppEnabledExtensionNames;
},
set(value) {
if (value !== null && value.constructor === Array) {
this._ppEnabledExtensionNames = value;
} else if (value === null) {
this._ppEnabledExtensionNames = null;
} else {
throw new TypeError("Invalid type for 'VkDeviceCreateInfo.ppEnabledExtensionNames': Expected 'Array char' but got '" + typeToString(value) + "'");
}
}
},
"pEnabledFeatures": {
get() {
if (this._pEnabledFeatures === null && this.memoryView.getBigInt64(0x40, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x40, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkPhysicalDeviceFeatures.byteLength));
this._pEnabledFeatures = new VkPhysicalDeviceFeatures({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x40, this._pEnabledFeatures.memoryAddress, true);
return this.pEnabledFeatures;
} else {
return this._pEnabledFeatures;
}
},
set(value) {
if (value !== null && value.constructor === VkPhysicalDeviceFeatures) {
value.flush();
this._pEnabledFeatures = value;
this.memoryView.setBigInt64(0x40, value.memoryAddress, true);
} else if (value === null) {
this._pEnabledFeatures = null;
this.memoryView.setBigInt64(0x40, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkDeviceCreateInfo.pEnabledFeatures': Expected 'VkPhysicalDeviceFeatures' but got '" + typeToString(value) + "'");
}
}
},
});
VkDeviceCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x48);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x48"], 0x0);
this._pNext = null;
this._pQueueCreateInfos = null;
this._pQueueCreateInfosNative = null;
this._ppEnabledLayerNames = null;
this._ppEnabledLayerNamesNative = null;
this._ppEnabledExtensionNames = null;
this._ppEnabledExtensionNamesNative = null;
this._pEnabledFeatures = null;
this.sType = 0x3;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.queueCreateInfoCount !== void 0) this.queueCreateInfoCount = opts.queueCreateInfoCount;
if (opts.pQueueCreateInfos !== void 0) this.pQueueCreateInfos = opts.pQueueCreateInfos;
if (opts.enabledLayerCount !== void 0) this.enabledLayerCount = opts.enabledLayerCount;
if (opts.ppEnabledLayerNames !== void 0) this.ppEnabledLayerNames = opts.ppEnabledLayerNames;
if (opts.enabledExtensionCount !== void 0) this.enabledExtensionCount = opts.enabledExtensionCount;
if (opts.ppEnabledExtensionNames !== void 0) this.ppEnabledExtensionNames = opts.ppEnabledExtensionNames;
if (opts.pEnabledFeatures !== void 0) this.pEnabledFeatures = opts.pEnabledFeatures;
}
};
VkDeviceCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pQueueCreateInfos !== null) {
let array = this._pQueueCreateInfos;
if (array.length !== this.queueCreateInfoCount) {
throw new RangeError("Invalid array length, expected length of 'queueCreateInfoCount' for 'VkDeviceCreateInfo.pQueueCreateInfos'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkDeviceQueueCreateInfo)) {
throw new TypeError("Invalid type for 'VkDeviceCreateInfo.pQueueCreateInfos[" + ii + "]': Expected 'VkDeviceQueueCreateInfo' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pQueueCreateInfosNative = nativeArray;
this.memoryView.setBigInt64(0x18, nativeArray.address, true);
} else {
this._pQueueCreateInfosNative = null;
this.memoryView.setBigInt64(0x18, BI0, true);
}
}
if (this._ppEnabledLayerNames !== null) {
let array = this._ppEnabledLayerNames;
// validate length
if (array.length !== this.enabledLayerCount) {
throw new RangeError("Invalid array length, expected length of 'enabledLayerCount' for 'VkDeviceCreateInfo.ppEnabledLayerNames'");
return false;
}
// validate type
for (let ii = 0; ii < array.length; ++ii) {
if (typeof (array[ii]) !== "string") {
throw new TypeError("Invalid type for 'VkDeviceCreateInfo.ppEnabledLayerNames[" + ii + "]': Expected 'String' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
let nativeArray = new NativeStringArray(this._ppEnabledLayerNames);
this._ppEnabledLayerNamesNative = nativeArray;
this.memoryView.setBigInt64(0x28, nativeArray.address, true);
} else {
this.memoryView.setBigInt64(0x28, BI0, true);
}
if (this._ppEnabledExtensionNames !== null) {
let array = this._ppEnabledExtensionNames;
// validate length
if (array.length !== this.enabledExtensionCount) {
throw new RangeError("Invalid array length, expected length of 'enabledExtensionCount' for 'VkDeviceCreateInfo.ppEnabledExtensionNames'");
return false;
}
// validate type
for (let ii = 0; ii < array.length; ++ii) {
if (typeof (array[ii]) !== "string") {
throw new TypeError("Invalid type for 'VkDeviceCreateInfo.ppEnabledExtensionNames[" + ii + "]': Expected 'String' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
let nativeArray = new NativeStringArray(this._ppEnabledExtensionNames);
this._ppEnabledExtensionNamesNative = nativeArray;
this.memoryView.setBigInt64(0x38, nativeArray.address, true);
} else {
this.memoryView.setBigInt64(0x38, BI0, true);
}
return true;
};
VkDeviceCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkDeviceCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDeviceCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.queueCreateInfoCount = original.queueCreateInfoCount;
if (original.pQueueCreateInfos !== null) {
copy.pQueueCreateInfos = [...Array(original.pQueueCreateInfos.length)].map((v, i) => {
return original.pQueueCreateInfos[i].constructor.createCopyFrom(original.pQueueCreateInfos[i]);
});
}
copy.enabledLayerCount = original.enabledLayerCount;
if (original.ppEnabledLayerNames !== null) {
copy.ppEnabledLayerNames = [...Array(original.ppEnabledLayerNames.length)].map((v, i) => {
return original.ppEnabledLayerNames[i];
});
}
copy.enabledExtensionCount = original.enabledExtensionCount;
if (original.ppEnabledExtensionNames !== null) {
copy.ppEnabledExtensionNames = [...Array(original.ppEnabledExtensionNames.length)].map((v, i) => {
return original.ppEnabledExtensionNames[i];
});
}
if (original.pEnabledFeatures !== null) {
copy.pEnabledFeatures = original.pEnabledFeatures.constructor.createCopyFrom(original.pEnabledFeatures);
}
return copy;
};
VkDeviceCreateInfo.byteLength = 0x48;
VkDeviceCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
queueCreateInfoCount: {
byteOffset: 0x14,
byteLength: 0x4
},
pQueueCreateInfos: {
byteOffset: 0x18,
byteLength: 0x8
},
enabledLayerCount: {
byteOffset: 0x20,
byteLength: 0x4
},
ppEnabledLayerNames: {
byteOffset: 0x28,
byteLength: 0x8
},
enabledExtensionCount: {
byteOffset: 0x30,
byteLength: 0x4
},
ppEnabledExtensionNames: {
byteOffset: 0x38,
byteLength: 0x8
},
pEnabledFeatures: {
byteOffset: 0x40,
byteLength: 0x8
},
};
/** VkInstanceCreateInfo **/
function VkInstanceCreateInfo(opts, byteOffset) {
if (new.target !== VkInstanceCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkInstanceCreateInfo, STRUCT_CACHE_VkInstanceCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkInstanceCreateInfo, STRUCT_CACHE_VkInstanceCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkInstanceCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x40);
} else {
this.memoryBuffer = new ArrayBuffer(0x40);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x40);
}
this._pNext = null;
this._pApplicationInfo = null;
this._ppEnabledLayerNames = null;
this._ppEnabledLayerNamesNative = null;
this._ppEnabledExtensionNames = null;
this._ppEnabledExtensionNamesNative = null;
this.sType = 0x1;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.pApplicationInfo !== void 0) this.pApplicationInfo = opts.pApplicationInfo;
if (opts.enabledLayerCount !== void 0) this.enabledLayerCount = opts.enabledLayerCount;
if (opts.ppEnabledLayerNames !== void 0) this.ppEnabledLayerNames = opts.ppEnabledLayerNames;
if (opts.enabledExtensionCount !== void 0) this.enabledExtensionCount = opts.enabledExtensionCount;
if (opts.ppEnabledExtensionNames !== void 0) this.ppEnabledExtensionNames = opts.ppEnabledExtensionNames;
}
};
Object.defineProperties(VkInstanceCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkInstanceCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkInstanceCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkInstanceCreateInfo.pNext'");
switch (sType) {
case 0x3B9AF4F8:
case 0x3B9BB848:
case 0x3B9E8ED8:
case 0x3B9CBE04:
break;
default:
throw new TypeError("Invalid type for 'VkInstanceCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkInstanceCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkInstanceCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"pApplicationInfo": {
get() {
if (this._pApplicationInfo === null && this.memoryView.getBigInt64(0x18, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x18, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkApplicationInfo.byteLength));
this._pApplicationInfo = new VkApplicationInfo({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x18, this._pApplicationInfo.memoryAddress, true);
return this.pApplicationInfo;
} else {
return this._pApplicationInfo;
}
},
set(value) {
if (value !== null && value.constructor === VkApplicationInfo) {
value.flush();
this._pApplicationInfo = value;
this.memoryView.setBigInt64(0x18, value.memoryAddress, true);
} else if (value === null) {
this._pApplicationInfo = null;
this.memoryView.setBigInt64(0x18, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkInstanceCreateInfo.pApplicationInfo': Expected 'VkApplicationInfo' but got '" + typeToString(value) + "'");
}
}
},
"enabledLayerCount": {
get() {
return this.memoryView.getUint32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkInstanceCreateInfo.enabledLayerCount");
this.memoryView.setUint32(0x20, value, true);
}
},
"ppEnabledLayerNames": {
get() {
return this._ppEnabledLayerNames;
},
set(value) {
if (value !== null && value.constructor === Array) {
this._ppEnabledLayerNames = value;
} else if (value === null) {
this._ppEnabledLayerNames = null;
} else {
throw new TypeError("Invalid type for 'VkInstanceCreateInfo.ppEnabledLayerNames': Expected 'Array char' but got '" + typeToString(value) + "'");
}
}
},
"enabledExtensionCount": {
get() {
return this.memoryView.getUint32(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkInstanceCreateInfo.enabledExtensionCount");
this.memoryView.setUint32(0x30, value, true);
}
},
"ppEnabledExtensionNames": {
get() {
return this._ppEnabledExtensionNames;
},
set(value) {
if (value !== null && value.constructor === Array) {
this._ppEnabledExtensionNames = value;
} else if (value === null) {
this._ppEnabledExtensionNames = null;
} else {
throw new TypeError("Invalid type for 'VkInstanceCreateInfo.ppEnabledExtensionNames': Expected 'Array char' but got '" + typeToString(value) + "'");
}
}
},
});
VkInstanceCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x40);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x40"], 0x0);
this._pNext = null;
this._pApplicationInfo = null;
this._ppEnabledLayerNames = null;
this._ppEnabledLayerNamesNative = null;
this._ppEnabledExtensionNames = null;
this._ppEnabledExtensionNamesNative = null;
this.sType = 0x1;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.pApplicationInfo !== void 0) this.pApplicationInfo = opts.pApplicationInfo;
if (opts.enabledLayerCount !== void 0) this.enabledLayerCount = opts.enabledLayerCount;
if (opts.ppEnabledLayerNames !== void 0) this.ppEnabledLayerNames = opts.ppEnabledLayerNames;
if (opts.enabledExtensionCount !== void 0) this.enabledExtensionCount = opts.enabledExtensionCount;
if (opts.ppEnabledExtensionNames !== void 0) this.ppEnabledExtensionNames = opts.ppEnabledExtensionNames;
}
};
VkInstanceCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._ppEnabledLayerNames !== null) {
let array = this._ppEnabledLayerNames;
// validate length
if (array.length !== this.enabledLayerCount) {
throw new RangeError("Invalid array length, expected length of 'enabledLayerCount' for 'VkInstanceCreateInfo.ppEnabledLayerNames'");
return false;
}
// validate type
for (let ii = 0; ii < array.length; ++ii) {
if (typeof (array[ii]) !== "string") {
throw new TypeError("Invalid type for 'VkInstanceCreateInfo.ppEnabledLayerNames[" + ii + "]': Expected 'String' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
let nativeArray = new NativeStringArray(this._ppEnabledLayerNames);
this._ppEnabledLayerNamesNative = nativeArray;
this.memoryView.setBigInt64(0x28, nativeArray.address, true);
} else {
this.memoryView.setBigInt64(0x28, BI0, true);
}
if (this._ppEnabledExtensionNames !== null) {
let array = this._ppEnabledExtensionNames;
// validate length
if (array.length !== this.enabledExtensionCount) {
throw new RangeError("Invalid array length, expected length of 'enabledExtensionCount' for 'VkInstanceCreateInfo.ppEnabledExtensionNames'");
return false;
}
// validate type
for (let ii = 0; ii < array.length; ++ii) {
if (typeof (array[ii]) !== "string") {
throw new TypeError("Invalid type for 'VkInstanceCreateInfo.ppEnabledExtensionNames[" + ii + "]': Expected 'String' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
let nativeArray = new NativeStringArray(this._ppEnabledExtensionNames);
this._ppEnabledExtensionNamesNative = nativeArray;
this.memoryView.setBigInt64(0x38, nativeArray.address, true);
} else {
this.memoryView.setBigInt64(0x38, BI0, true);
}
return true;
};
VkInstanceCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkInstanceCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkInstanceCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
if (original.pApplicationInfo !== null) {
copy.pApplicationInfo = original.pApplicationInfo.constructor.createCopyFrom(original.pApplicationInfo);
}
copy.enabledLayerCount = original.enabledLayerCount;
if (original.ppEnabledLayerNames !== null) {
copy.ppEnabledLayerNames = [...Array(original.ppEnabledLayerNames.length)].map((v, i) => {
return original.ppEnabledLayerNames[i];
});
}
copy.enabledExtensionCount = original.enabledExtensionCount;
if (original.ppEnabledExtensionNames !== null) {
copy.ppEnabledExtensionNames = [...Array(original.ppEnabledExtensionNames.length)].map((v, i) => {
return original.ppEnabledExtensionNames[i];
});
}
return copy;
};
VkInstanceCreateInfo.byteLength = 0x40;
VkInstanceCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
pApplicationInfo: {
byteOffset: 0x18,
byteLength: 0x8
},
enabledLayerCount: {
byteOffset: 0x20,
byteLength: 0x4
},
ppEnabledLayerNames: {
byteOffset: 0x28,
byteLength: 0x8
},
enabledExtensionCount: {
byteOffset: 0x30,
byteLength: 0x4
},
ppEnabledExtensionNames: {
byteOffset: 0x38,
byteLength: 0x8
},
};
/** VkQueueFamilyProperties **/
function VkQueueFamilyProperties(opts, byteOffset) {
if (new.target !== VkQueueFamilyProperties) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkQueueFamilyProperties, STRUCT_CACHE_VkQueueFamilyProperties);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkQueueFamilyProperties, STRUCT_CACHE_VkQueueFamilyProperties);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkQueueFamilyProperties'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._minImageTransferGranularity = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0xC });
if (typeof opts === "object") {
}
};
Object.defineProperties(VkQueueFamilyProperties.prototype, {
"queueFlags": {
get() {
return this.memoryView.getInt32(0x0, true);
},
},
"queueCount": {
get() {
return this.memoryView.getUint32(0x4, true);
},
},
"timestampValidBits": {
get() {
return this.memoryView.getUint32(0x8, true);
},
},
"minImageTransferGranularity": {
get() {
return this._minImageTransferGranularity;
},
},
});
VkQueueFamilyProperties.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
if (this._minImageTransferGranularity !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._minImageTransferGranularity.memoryBuffer) this._minImageTransferGranularity = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0xC });
else this._minImageTransferGranularity.reset();
}
if (typeof opts === "object") {
}
};
VkQueueFamilyProperties.prototype.flush = function flush() {
return true;
};
VkQueueFamilyProperties.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x18));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x18), 0x0);};
VkQueueFamilyProperties.createCopyFrom = function createCopyFrom(original) {
let copy = new VkQueueFamilyProperties();
copy.queueFlags = original.queueFlags;
copy.queueCount = original.queueCount;
copy.timestampValidBits = original.timestampValidBits;
if (original.minImageTransferGranularity !== null) {
copy.minImageTransferGranularity = original.minImageTransferGranularity.constructor.createCopyFrom(original.minImageTransferGranularity);
}
return copy;
};
VkQueueFamilyProperties.byteLength = 0x18;
VkQueueFamilyProperties.memoryLayout = {
queueFlags: {
byteOffset: 0x0,
byteLength: 0x4
},
queueCount: {
byteOffset: 0x4,
byteLength: 0x4
},
timestampValidBits: {
byteOffset: 0x8,
byteLength: 0x4
},
minImageTransferGranularity: {
byteOffset: 0xC,
byteLength: 0xC
},
};
/** VkPhysicalDeviceMemoryProperties **/
function VkPhysicalDeviceMemoryProperties(opts, byteOffset) {
if (new.target !== VkPhysicalDeviceMemoryProperties) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPhysicalDeviceMemoryProperties, STRUCT_CACHE_VkPhysicalDeviceMemoryProperties);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPhysicalDeviceMemoryProperties, STRUCT_CACHE_VkPhysicalDeviceMemoryProperties);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPhysicalDeviceMemoryProperties'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x208);
} else {
this.memoryBuffer = new ArrayBuffer(0x208);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x208);
}
this._memoryTypes = [...Array(32)].map((v, i) => new VkMemoryType({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x4 + (i * 0x8) }));
this._memoryHeaps = [...Array(16)].map((v, i) => new VkMemoryHeap({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x108 + (i * 0x10) }));
if (typeof opts === "object") {
}
};
Object.defineProperties(VkPhysicalDeviceMemoryProperties.prototype, {
"memoryTypeCount": {
get() {
return this.memoryView.getUint32(0x0, true);
},
},
"memoryTypes": {
get() {
return this._memoryTypes;
},
},
"memoryHeapCount": {
get() {
return this.memoryView.getUint32(0x104, true);
},
},
"memoryHeaps": {
get() {
return this._memoryHeaps;
},
},
});
VkPhysicalDeviceMemoryProperties.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x208);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x208"], 0x0);
if (this._memoryTypes !== null) {
let array = this._memoryTypes;
for (let ii = 0; ii < array.length; ++ii) {
array[ii].reset();
};
}
if (this._memoryHeaps !== null) {
let array = this._memoryHeaps;
for (let ii = 0; ii < array.length; ++ii) {
array[ii].reset();
};
}
if (typeof opts === "object") {
}
};
VkPhysicalDeviceMemoryProperties.prototype.flush = function flush() {
return true;
};
VkPhysicalDeviceMemoryProperties.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x208));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x208), 0x0);};
VkPhysicalDeviceMemoryProperties.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPhysicalDeviceMemoryProperties();
copy.memoryTypeCount = original.memoryTypeCount;
if (original.memoryTypes !== null) {
copy.memoryTypes = [...Array(original.memoryTypes.length)].map((v, i) => {
return original.memoryTypes[i].constructor.createCopyFrom(original.memoryTypes[i]);
});
}
copy.memoryHeapCount = original.memoryHeapCount;
if (original.memoryHeaps !== null) {
copy.memoryHeaps = [...Array(original.memoryHeaps.length)].map((v, i) => {
return original.memoryHeaps[i].constructor.createCopyFrom(original.memoryHeaps[i]);
});
}
return copy;
};
VkPhysicalDeviceMemoryProperties.byteLength = 0x208;
VkPhysicalDeviceMemoryProperties.memoryLayout = {
memoryTypeCount: {
byteOffset: 0x0,
byteLength: 0x4
},
memoryTypes: {
byteOffset: 0x4,
byteLength: 0x100
},
memoryHeapCount: {
byteOffset: 0x104,
byteLength: 0x4
},
memoryHeaps: {
byteOffset: 0x108,
byteLength: 0x100
},
};
/** VkMemoryAllocateInfo **/
function VkMemoryAllocateInfo(opts, byteOffset) {
if (new.target !== VkMemoryAllocateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkMemoryAllocateInfo, STRUCT_CACHE_VkMemoryAllocateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkMemoryAllocateInfo, STRUCT_CACHE_VkMemoryAllocateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkMemoryAllocateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x20);
} else {
this.memoryBuffer = new ArrayBuffer(0x20);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x20);
}
this._pNext = null;
this.sType = 0x5;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.allocationSize !== void 0) this.allocationSize = opts.allocationSize;
if (opts.memoryTypeIndex !== void 0) this.memoryTypeIndex = opts.memoryTypeIndex;
}
};
Object.defineProperties(VkMemoryAllocateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkMemoryAllocateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkMemoryAllocateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkMemoryAllocateInfo.pNext'");
switch (sType) {
case 0x3B9B2F92:
case 0x3B9BA4C1:
case 0x3B9BA8A8:
case 0x3B9BA8A9:
case 0x3B9BE342:
case 0x3B9BE728:
case 0x3B9BEB10:
case 0x3B9BB460:
case 0x3B9CBA19:
case 0x3B9D8150:
case 0x3B9CC1EB:
case 0x3B9E6BB1:
break;
default:
throw new TypeError("Invalid type for 'VkMemoryAllocateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkMemoryAllocateInfo.pNext'");
}
}
},
"allocationSize": {
get() {
return this.memoryView.getBigUint64(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkMemoryAllocateInfo.allocationSize")
this.memoryView.setBigUint64(0x10, BigInt(value), true);
}
},
"memoryTypeIndex": {
get() {
return this.memoryView.getUint32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkMemoryAllocateInfo.memoryTypeIndex");
this.memoryView.setUint32(0x18, value, true);
}
},
});
VkMemoryAllocateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x20);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x20"], 0x0);
this._pNext = null;
this.sType = 0x5;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.allocationSize !== void 0) this.allocationSize = opts.allocationSize;
if (opts.memoryTypeIndex !== void 0) this.memoryTypeIndex = opts.memoryTypeIndex;
}
};
VkMemoryAllocateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkMemoryAllocateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkMemoryAllocateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkMemoryAllocateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.allocationSize = original.allocationSize;
copy.memoryTypeIndex = original.memoryTypeIndex;
return copy;
};
VkMemoryAllocateInfo.byteLength = 0x20;
VkMemoryAllocateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
allocationSize: {
byteOffset: 0x10,
byteLength: 0x8
},
memoryTypeIndex: {
byteOffset: 0x18,
byteLength: 0x4
},
};
/** VkMemoryRequirements **/
function VkMemoryRequirements(opts, byteOffset) {
if (new.target !== VkMemoryRequirements) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkMemoryRequirements, STRUCT_CACHE_VkMemoryRequirements);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkMemoryRequirements, STRUCT_CACHE_VkMemoryRequirements);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkMemoryRequirements'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
if (typeof opts === "object") {
}
};
Object.defineProperties(VkMemoryRequirements.prototype, {
"size": {
get() {
return this.memoryView.getBigUint64(0x0, true);
},
},
"alignment": {
get() {
return this.memoryView.getBigUint64(0x8, true);
},
},
"memoryTypeBits": {
get() {
return this.memoryView.getUint32(0x10, true);
},
},
});
VkMemoryRequirements.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
if (typeof opts === "object") {
}
};
VkMemoryRequirements.prototype.flush = function flush() {
return true;
};
VkMemoryRequirements.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x18));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x18), 0x0);};
VkMemoryRequirements.createCopyFrom = function createCopyFrom(original) {
let copy = new VkMemoryRequirements();
copy.size = original.size;
copy.alignment = original.alignment;
copy.memoryTypeBits = original.memoryTypeBits;
return copy;
};
VkMemoryRequirements.byteLength = 0x18;
VkMemoryRequirements.memoryLayout = {
size: {
byteOffset: 0x0,
byteLength: 0x8
},
alignment: {
byteOffset: 0x8,
byteLength: 0x8
},
memoryTypeBits: {
byteOffset: 0x10,
byteLength: 0x4
},
};
/** VkSparseImageFormatProperties **/
function VkSparseImageFormatProperties(opts, byteOffset) {
if (new.target !== VkSparseImageFormatProperties) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSparseImageFormatProperties, STRUCT_CACHE_VkSparseImageFormatProperties);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSparseImageFormatProperties, STRUCT_CACHE_VkSparseImageFormatProperties);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSparseImageFormatProperties'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x14);
} else {
this.memoryBuffer = new ArrayBuffer(0x14);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x14);
}
this._imageGranularity = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x4 });
if (typeof opts === "object") {
}
};
Object.defineProperties(VkSparseImageFormatProperties.prototype, {
"aspectMask": {
get() {
return this.memoryView.getInt32(0x0, true);
},
},
"imageGranularity": {
get() {
return this._imageGranularity;
},
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
},
});
VkSparseImageFormatProperties.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x14);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x14"], 0x0);
if (this._imageGranularity !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._imageGranularity.memoryBuffer) this._imageGranularity = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x4 });
else this._imageGranularity.reset();
}
if (typeof opts === "object") {
}
};
VkSparseImageFormatProperties.prototype.flush = function flush() {
return true;
};
VkSparseImageFormatProperties.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x14));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x14), 0x0);};
VkSparseImageFormatProperties.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSparseImageFormatProperties();
copy.aspectMask = original.aspectMask;
if (original.imageGranularity !== null) {
copy.imageGranularity = original.imageGranularity.constructor.createCopyFrom(original.imageGranularity);
}
copy.flags = original.flags;
return copy;
};
VkSparseImageFormatProperties.byteLength = 0x14;
VkSparseImageFormatProperties.memoryLayout = {
aspectMask: {
byteOffset: 0x0,
byteLength: 0x4
},
imageGranularity: {
byteOffset: 0x4,
byteLength: 0xC
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
};
/** VkSparseImageMemoryRequirements **/
function VkSparseImageMemoryRequirements(opts, byteOffset) {
if (new.target !== VkSparseImageMemoryRequirements) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSparseImageMemoryRequirements, STRUCT_CACHE_VkSparseImageMemoryRequirements);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSparseImageMemoryRequirements, STRUCT_CACHE_VkSparseImageMemoryRequirements);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSparseImageMemoryRequirements'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x30);
} else {
this.memoryBuffer = new ArrayBuffer(0x30);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x30);
}
this._formatProperties = new VkSparseImageFormatProperties({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
if (typeof opts === "object") {
}
};
Object.defineProperties(VkSparseImageMemoryRequirements.prototype, {
"formatProperties": {
get() {
return this._formatProperties;
},
},
"imageMipTailFirstLod": {
get() {
return this.memoryView.getUint32(0x14, true);
},
},
"imageMipTailSize": {
get() {
return this.memoryView.getBigUint64(0x18, true);
},
},
"imageMipTailOffset": {
get() {
return this.memoryView.getBigUint64(0x20, true);
},
},
"imageMipTailStride": {
get() {
return this.memoryView.getBigUint64(0x28, true);
},
},
});
VkSparseImageMemoryRequirements.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x30);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x30"], 0x0);
if (this._formatProperties !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._formatProperties.memoryBuffer) this._formatProperties = new VkSparseImageFormatProperties({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
else this._formatProperties.reset();
}
if (typeof opts === "object") {
}
};
VkSparseImageMemoryRequirements.prototype.flush = function flush() {
return true;
};
VkSparseImageMemoryRequirements.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x30));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x30), 0x0);};
VkSparseImageMemoryRequirements.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSparseImageMemoryRequirements();
if (original.formatProperties !== null) {
copy.formatProperties = original.formatProperties.constructor.createCopyFrom(original.formatProperties);
}
copy.imageMipTailFirstLod = original.imageMipTailFirstLod;
copy.imageMipTailSize = original.imageMipTailSize;
copy.imageMipTailOffset = original.imageMipTailOffset;
copy.imageMipTailStride = original.imageMipTailStride;
return copy;
};
VkSparseImageMemoryRequirements.byteLength = 0x30;
VkSparseImageMemoryRequirements.memoryLayout = {
formatProperties: {
byteOffset: 0x0,
byteLength: 0x14
},
imageMipTailFirstLod: {
byteOffset: 0x14,
byteLength: 0x4
},
imageMipTailSize: {
byteOffset: 0x18,
byteLength: 0x8
},
imageMipTailOffset: {
byteOffset: 0x20,
byteLength: 0x8
},
imageMipTailStride: {
byteOffset: 0x28,
byteLength: 0x8
},
};
/** VkMemoryType **/
function VkMemoryType(opts, byteOffset) {
if (new.target !== VkMemoryType) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkMemoryType, STRUCT_CACHE_VkMemoryType);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkMemoryType, STRUCT_CACHE_VkMemoryType);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkMemoryType'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x8);
} else {
this.memoryBuffer = new ArrayBuffer(0x8);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
}
if (typeof opts === "object") {
}
};
Object.defineProperties(VkMemoryType.prototype, {
"propertyFlags": {
get() {
return this.memoryView.getInt32(0x0, true);
},
},
"heapIndex": {
get() {
return this.memoryView.getUint32(0x4, true);
},
},
});
VkMemoryType.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x8);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x8"], 0x0);
if (typeof opts === "object") {
}
};
VkMemoryType.prototype.flush = function flush() {
return true;
};
VkMemoryType.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x8), 0x0);};
VkMemoryType.createCopyFrom = function createCopyFrom(original) {
let copy = new VkMemoryType();
copy.propertyFlags = original.propertyFlags;
copy.heapIndex = original.heapIndex;
return copy;
};
VkMemoryType.byteLength = 0x8;
VkMemoryType.memoryLayout = {
propertyFlags: {
byteOffset: 0x0,
byteLength: 0x4
},
heapIndex: {
byteOffset: 0x4,
byteLength: 0x4
},
};
/** VkMemoryHeap **/
function VkMemoryHeap(opts, byteOffset) {
if (new.target !== VkMemoryHeap) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkMemoryHeap, STRUCT_CACHE_VkMemoryHeap);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkMemoryHeap, STRUCT_CACHE_VkMemoryHeap);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkMemoryHeap'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x10);
} else {
this.memoryBuffer = new ArrayBuffer(0x10);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x10);
}
if (typeof opts === "object") {
}
};
Object.defineProperties(VkMemoryHeap.prototype, {
"size": {
get() {
return this.memoryView.getBigUint64(0x0, true);
},
},
"flags": {
get() {
return this.memoryView.getInt32(0x8, true);
},
},
});
VkMemoryHeap.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x10);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x10"], 0x0);
if (typeof opts === "object") {
}
};
VkMemoryHeap.prototype.flush = function flush() {
return true;
};
VkMemoryHeap.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x10));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x10), 0x0);};
VkMemoryHeap.createCopyFrom = function createCopyFrom(original) {
let copy = new VkMemoryHeap();
copy.size = original.size;
copy.flags = original.flags;
return copy;
};
VkMemoryHeap.byteLength = 0x10;
VkMemoryHeap.memoryLayout = {
size: {
byteOffset: 0x0,
byteLength: 0x8
},
flags: {
byteOffset: 0x8,
byteLength: 0x4
},
};
/** VkMappedMemoryRange **/
function VkMappedMemoryRange(opts, byteOffset) {
if (new.target !== VkMappedMemoryRange) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkMappedMemoryRange, STRUCT_CACHE_VkMappedMemoryRange);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkMappedMemoryRange, STRUCT_CACHE_VkMappedMemoryRange);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkMappedMemoryRange'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x28);
} else {
this.memoryBuffer = new ArrayBuffer(0x28);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x28);
}
this._pNext = null;
this._memory = null;
this.sType = 0x6;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.memory !== void 0) this.memory = opts.memory;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.size !== void 0) this.size = opts.size;
}
};
Object.defineProperties(VkMappedMemoryRange.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkMappedMemoryRange.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkMappedMemoryRange.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkMappedMemoryRange.pNext' isn't allowed to be filled");
}
},
"memory": {
get() {
return this._memory;
},
set(value) {
if (value !== null && value.constructor === VkDeviceMemory) {
this._memory = value;
this.memoryView.setBigInt64(0x10, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._memory = null;
this.memoryView.setBigInt64(0x10, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkMappedMemoryRange.memory': Expected 'VkDeviceMemory' but got '" + typeToString(value) + "'");
}
}
},
"offset": {
get() {
return this.memoryView.getBigUint64(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkMappedMemoryRange.offset")
this.memoryView.setBigUint64(0x18, BigInt(value), true);
}
},
"size": {
get() {
return this.memoryView.getBigUint64(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkMappedMemoryRange.size")
this.memoryView.setBigUint64(0x20, BigInt(value), true);
}
},
});
VkMappedMemoryRange.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x28);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x28"], 0x0);
this._pNext = null;
this._memory = null;
this.sType = 0x6;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.memory !== void 0) this.memory = opts.memory;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.size !== void 0) this.size = opts.size;
}
};
VkMappedMemoryRange.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkMappedMemoryRange.prototype.reflect = function reflect(memoryAddress) {
};
VkMappedMemoryRange.createCopyFrom = function createCopyFrom(original) {
let copy = new VkMappedMemoryRange();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
if (original.memory !== null) {
copy.memory = original.memory.constructor.createCopyFrom(original.memory);
}
copy.offset = original.offset;
copy.size = original.size;
return copy;
};
VkMappedMemoryRange.byteLength = 0x28;
VkMappedMemoryRange.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
memory: {
byteOffset: 0x10,
byteLength: 0x8
},
offset: {
byteOffset: 0x18,
byteLength: 0x8
},
size: {
byteOffset: 0x20,
byteLength: 0x8
},
};
/** VkFormatProperties **/
function VkFormatProperties(opts, byteOffset) {
if (new.target !== VkFormatProperties) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkFormatProperties, STRUCT_CACHE_VkFormatProperties);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkFormatProperties, STRUCT_CACHE_VkFormatProperties);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkFormatProperties'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0xC);
} else {
this.memoryBuffer = new ArrayBuffer(0xC);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0xC);
}
if (typeof opts === "object") {
}
};
Object.defineProperties(VkFormatProperties.prototype, {
"linearTilingFeatures": {
get() {
return this.memoryView.getInt32(0x0, true);
},
},
"optimalTilingFeatures": {
get() {
return this.memoryView.getInt32(0x4, true);
},
},
"bufferFeatures": {
get() {
return this.memoryView.getInt32(0x8, true);
},
},
});
VkFormatProperties.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0xC);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0xC"], 0x0);
if (typeof opts === "object") {
}
};
VkFormatProperties.prototype.flush = function flush() {
return true;
};
VkFormatProperties.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0xC));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0xC), 0x0);};
VkFormatProperties.createCopyFrom = function createCopyFrom(original) {
let copy = new VkFormatProperties();
copy.linearTilingFeatures = original.linearTilingFeatures;
copy.optimalTilingFeatures = original.optimalTilingFeatures;
copy.bufferFeatures = original.bufferFeatures;
return copy;
};
VkFormatProperties.byteLength = 0xC;
VkFormatProperties.memoryLayout = {
linearTilingFeatures: {
byteOffset: 0x0,
byteLength: 0x4
},
optimalTilingFeatures: {
byteOffset: 0x4,
byteLength: 0x4
},
bufferFeatures: {
byteOffset: 0x8,
byteLength: 0x4
},
};
/** VkImageFormatProperties **/
function VkImageFormatProperties(opts, byteOffset) {
if (new.target !== VkImageFormatProperties) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkImageFormatProperties, STRUCT_CACHE_VkImageFormatProperties);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkImageFormatProperties, STRUCT_CACHE_VkImageFormatProperties);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkImageFormatProperties'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x20);
} else {
this.memoryBuffer = new ArrayBuffer(0x20);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x20);
}
this._maxExtent = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
if (typeof opts === "object") {
}
};
Object.defineProperties(VkImageFormatProperties.prototype, {
"maxExtent": {
get() {
return this._maxExtent;
},
},
"maxMipLevels": {
get() {
return this.memoryView.getUint32(0xC, true);
},
},
"maxArrayLayers": {
get() {
return this.memoryView.getUint32(0x10, true);
},
},
"sampleCounts": {
get() {
return this.memoryView.getInt32(0x14, true);
},
},
"maxResourceSize": {
get() {
return this.memoryView.getBigUint64(0x18, true);
},
},
});
VkImageFormatProperties.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x20);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x20"], 0x0);
if (this._maxExtent !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._maxExtent.memoryBuffer) this._maxExtent = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
else this._maxExtent.reset();
}
if (typeof opts === "object") {
}
};
VkImageFormatProperties.prototype.flush = function flush() {
return true;
};
VkImageFormatProperties.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x20));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x20), 0x0);};
VkImageFormatProperties.createCopyFrom = function createCopyFrom(original) {
let copy = new VkImageFormatProperties();
if (original.maxExtent !== null) {
copy.maxExtent = original.maxExtent.constructor.createCopyFrom(original.maxExtent);
}
copy.maxMipLevels = original.maxMipLevels;
copy.maxArrayLayers = original.maxArrayLayers;
copy.sampleCounts = original.sampleCounts;
copy.maxResourceSize = original.maxResourceSize;
return copy;
};
VkImageFormatProperties.byteLength = 0x20;
VkImageFormatProperties.memoryLayout = {
maxExtent: {
byteOffset: 0x0,
byteLength: 0xC
},
maxMipLevels: {
byteOffset: 0xC,
byteLength: 0x4
},
maxArrayLayers: {
byteOffset: 0x10,
byteLength: 0x4
},
sampleCounts: {
byteOffset: 0x14,
byteLength: 0x4
},
maxResourceSize: {
byteOffset: 0x18,
byteLength: 0x8
},
};
/** VkDescriptorBufferInfo **/
function VkDescriptorBufferInfo(opts, byteOffset) {
if (new.target !== VkDescriptorBufferInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDescriptorBufferInfo, STRUCT_CACHE_VkDescriptorBufferInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDescriptorBufferInfo, STRUCT_CACHE_VkDescriptorBufferInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDescriptorBufferInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._buffer = null;
if (typeof opts === "object") {
if (opts.buffer !== void 0) this.buffer = opts.buffer;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.range !== void 0) this.range = opts.range;
}
};
Object.defineProperties(VkDescriptorBufferInfo.prototype, {
"buffer": {
get() {
return this._buffer;
},
set(value) {
if (value !== null && value.constructor === VkBuffer) {
this._buffer = value;
this.memoryView.setBigInt64(0x0, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._buffer = null;
this.memoryView.setBigInt64(0x0, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkDescriptorBufferInfo.buffer': Expected 'VkBuffer' but got '" + typeToString(value) + "'");
}
}
},
"offset": {
get() {
return this.memoryView.getBigUint64(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkDescriptorBufferInfo.offset")
this.memoryView.setBigUint64(0x8, BigInt(value), true);
}
},
"range": {
get() {
return this.memoryView.getBigUint64(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkDescriptorBufferInfo.range")
this.memoryView.setBigUint64(0x10, BigInt(value), true);
}
},
});
VkDescriptorBufferInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._buffer = null;
if (typeof opts === "object") {
if (opts.buffer !== void 0) this.buffer = opts.buffer;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.range !== void 0) this.range = opts.range;
}
};
VkDescriptorBufferInfo.prototype.flush = function flush() {
return true;
};
VkDescriptorBufferInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkDescriptorBufferInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDescriptorBufferInfo();
if (original.buffer !== null) {
copy.buffer = original.buffer.constructor.createCopyFrom(original.buffer);
}
copy.offset = original.offset;
copy.range = original.range;
return copy;
};
VkDescriptorBufferInfo.byteLength = 0x18;
VkDescriptorBufferInfo.memoryLayout = {
buffer: {
byteOffset: 0x0,
byteLength: 0x8
},
offset: {
byteOffset: 0x8,
byteLength: 0x8
},
range: {
byteOffset: 0x10,
byteLength: 0x8
},
};
/** VkDescriptorImageInfo **/
function VkDescriptorImageInfo(opts, byteOffset) {
if (new.target !== VkDescriptorImageInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDescriptorImageInfo, STRUCT_CACHE_VkDescriptorImageInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDescriptorImageInfo, STRUCT_CACHE_VkDescriptorImageInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDescriptorImageInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._sampler = null;
this._imageView = null;
if (typeof opts === "object") {
if (opts.sampler !== void 0) this.sampler = opts.sampler;
if (opts.imageView !== void 0) this.imageView = opts.imageView;
if (opts.imageLayout !== void 0) this.imageLayout = opts.imageLayout;
}
};
Object.defineProperties(VkDescriptorImageInfo.prototype, {
"sampler": {
get() {
return this._sampler;
},
set(value) {
if (value !== null && value.constructor === VkSampler) {
this._sampler = value;
this.memoryView.setBigInt64(0x0, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._sampler = null;
this.memoryView.setBigInt64(0x0, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkDescriptorImageInfo.sampler': Expected 'VkSampler' but got '" + typeToString(value) + "'");
}
}
},
"imageView": {
get() {
return this._imageView;
},
set(value) {
if (value !== null && value.constructor === VkImageView) {
this._imageView = value;
this.memoryView.setBigInt64(0x8, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._imageView = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkDescriptorImageInfo.imageView': Expected 'VkImageView' but got '" + typeToString(value) + "'");
}
}
},
"imageLayout": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorImageInfo.imageLayout");
if (!$VAL_R_VkImageLayout(value)) {
throw new RangeError("Invalid value for 'VkDescriptorImageInfo.imageLayout': '" + value + "' is not a value of 'VkImageLayout'");
}
this.memoryView.setInt32(0x10, value, true);
}
},
});
VkDescriptorImageInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._sampler = null;
this._imageView = null;
if (typeof opts === "object") {
if (opts.sampler !== void 0) this.sampler = opts.sampler;
if (opts.imageView !== void 0) this.imageView = opts.imageView;
if (opts.imageLayout !== void 0) this.imageLayout = opts.imageLayout;
}
};
VkDescriptorImageInfo.prototype.flush = function flush() {
return true;
};
VkDescriptorImageInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkDescriptorImageInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDescriptorImageInfo();
if (original.sampler !== null) {
copy.sampler = original.sampler.constructor.createCopyFrom(original.sampler);
}
if (original.imageView !== null) {
copy.imageView = original.imageView.constructor.createCopyFrom(original.imageView);
}
copy.imageLayout = original.imageLayout;
return copy;
};
VkDescriptorImageInfo.byteLength = 0x18;
VkDescriptorImageInfo.memoryLayout = {
sampler: {
byteOffset: 0x0,
byteLength: 0x8
},
imageView: {
byteOffset: 0x8,
byteLength: 0x8
},
imageLayout: {
byteOffset: 0x10,
byteLength: 0x4
},
};
/** VkWriteDescriptorSet **/
function VkWriteDescriptorSet(opts, byteOffset) {
if (new.target !== VkWriteDescriptorSet) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkWriteDescriptorSet, STRUCT_CACHE_VkWriteDescriptorSet);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkWriteDescriptorSet, STRUCT_CACHE_VkWriteDescriptorSet);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkWriteDescriptorSet'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x40);
} else {
this.memoryBuffer = new ArrayBuffer(0x40);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x40);
}
this._pNext = null;
this._dstSet = null;
this._pImageInfo = null;
this._pImageInfoNative = null;
this._pBufferInfo = null;
this._pBufferInfoNative = null;
this._pTexelBufferView = null;
this._pTexelBufferViewNative = null;
this.sType = 0x23;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.dstSet !== void 0) this.dstSet = opts.dstSet;
if (opts.dstBinding !== void 0) this.dstBinding = opts.dstBinding;
if (opts.dstArrayElement !== void 0) this.dstArrayElement = opts.dstArrayElement;
if (opts.descriptorCount !== void 0) this.descriptorCount = opts.descriptorCount;
if (opts.descriptorType !== void 0) this.descriptorType = opts.descriptorType;
if (opts.pImageInfo !== void 0) this.pImageInfo = opts.pImageInfo;
if (opts.pBufferInfo !== void 0) this.pBufferInfo = opts.pBufferInfo;
if (opts.pTexelBufferView !== void 0) this.pTexelBufferView = opts.pTexelBufferView;
}
};
Object.defineProperties(VkWriteDescriptorSet.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkWriteDescriptorSet.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkWriteDescriptorSet.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkWriteDescriptorSet.pNext'");
switch (sType) {
case 0x3B9CE512:
case 0x3B9D4E8F:
break;
default:
throw new TypeError("Invalid type for 'VkWriteDescriptorSet.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkWriteDescriptorSet.pNext'");
}
}
},
"dstSet": {
get() {
return this._dstSet;
},
set(value) {
if (value !== null && value.constructor === VkDescriptorSet) {
this._dstSet = value;
this.memoryView.setBigInt64(0x10, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._dstSet = null;
this.memoryView.setBigInt64(0x10, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkWriteDescriptorSet.dstSet': Expected 'VkDescriptorSet' but got '" + typeToString(value) + "'");
}
}
},
"dstBinding": {
get() {
return this.memoryView.getUint32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkWriteDescriptorSet.dstBinding");
this.memoryView.setUint32(0x18, value, true);
}
},
"dstArrayElement": {
get() {
return this.memoryView.getUint32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkWriteDescriptorSet.dstArrayElement");
this.memoryView.setUint32(0x1C, value, true);
}
},
"descriptorCount": {
get() {
return this.memoryView.getUint32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkWriteDescriptorSet.descriptorCount");
this.memoryView.setUint32(0x20, value, true);
}
},
"descriptorType": {
get() {
return this.memoryView.getInt32(0x24, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkWriteDescriptorSet.descriptorType");
if (!$VAL_R_VkDescriptorType(value)) {
throw new RangeError("Invalid value for 'VkWriteDescriptorSet.descriptorType': '" + value + "' is not a value of 'VkDescriptorType'");
}
this.memoryView.setInt32(0x24, value, true);
}
},
"pImageInfo": {
get() {
if (this._pImageInfo === null && this.memoryView.getBigInt64(0x28, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x28, true);
let array = decodeNativeArrayOfObjects(addr, this.descriptorCount, VkDescriptorImageInfo);
this._pImageInfo = array;
return this.pImageInfo;
} else {
return this._pImageInfo;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pImageInfo = value;
} else if (value === null) {
this._pImageInfo = null;
} else {
throw new TypeError("Invalid type for 'VkWriteDescriptorSet.pImageInfo': Expected 'Array VkDescriptorImageInfo' but got '" + typeToString(value) + "'");
}
}
},
"pBufferInfo": {
get() {
if (this._pBufferInfo === null && this.memoryView.getBigInt64(0x30, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x30, true);
let array = decodeNativeArrayOfObjects(addr, this.descriptorCount, VkDescriptorBufferInfo);
this._pBufferInfo = array;
return this.pBufferInfo;
} else {
return this._pBufferInfo;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pBufferInfo = value;
} else if (value === null) {
this._pBufferInfo = null;
} else {
throw new TypeError("Invalid type for 'VkWriteDescriptorSet.pBufferInfo': Expected 'Array VkDescriptorBufferInfo' but got '" + typeToString(value) + "'");
}
}
},
"pTexelBufferView": {
get() {
if (this._pTexelBufferView === null && this.memoryView.getBigInt64(0x38, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x38, true);
let array = decodeNativeArrayOfObjects(addr, this.descriptorCount, VkBufferView);
this._pTexelBufferView = array;
return this.pTexelBufferView;
} else {
return this._pTexelBufferView;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pTexelBufferView = value;
} else if (value === null) {
this._pTexelBufferView = null;
} else {
throw new TypeError("Invalid type for 'VkWriteDescriptorSet.pTexelBufferView': Expected 'Array VkBufferView' but got '" + typeToString(value) + "'");
}
}
},
});
VkWriteDescriptorSet.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x40);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x40"], 0x0);
this._pNext = null;
this._dstSet = null;
this._pImageInfo = null;
this._pImageInfoNative = null;
this._pBufferInfo = null;
this._pBufferInfoNative = null;
this._pTexelBufferView = null;
this._pTexelBufferViewNative = null;
this.sType = 0x23;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.dstSet !== void 0) this.dstSet = opts.dstSet;
if (opts.dstBinding !== void 0) this.dstBinding = opts.dstBinding;
if (opts.dstArrayElement !== void 0) this.dstArrayElement = opts.dstArrayElement;
if (opts.descriptorCount !== void 0) this.descriptorCount = opts.descriptorCount;
if (opts.descriptorType !== void 0) this.descriptorType = opts.descriptorType;
if (opts.pImageInfo !== void 0) this.pImageInfo = opts.pImageInfo;
if (opts.pBufferInfo !== void 0) this.pBufferInfo = opts.pBufferInfo;
if (opts.pTexelBufferView !== void 0) this.pTexelBufferView = opts.pTexelBufferView;
}
};
VkWriteDescriptorSet.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pImageInfo !== null) {
let array = this._pImageInfo;
if (array.length !== this.descriptorCount) {
throw new RangeError("Invalid array length, expected length of 'descriptorCount' for 'VkWriteDescriptorSet.pImageInfo'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkDescriptorImageInfo)) {
throw new TypeError("Invalid type for 'VkWriteDescriptorSet.pImageInfo[" + ii + "]': Expected 'VkDescriptorImageInfo' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pImageInfoNative = nativeArray;
this.memoryView.setBigInt64(0x28, nativeArray.address, true);
} else {
this._pImageInfoNative = null;
this.memoryView.setBigInt64(0x28, BI0, true);
}
}
if (this._pBufferInfo !== null) {
let array = this._pBufferInfo;
if (array.length !== this.descriptorCount) {
throw new RangeError("Invalid array length, expected length of 'descriptorCount' for 'VkWriteDescriptorSet.pBufferInfo'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkDescriptorBufferInfo)) {
throw new TypeError("Invalid type for 'VkWriteDescriptorSet.pBufferInfo[" + ii + "]': Expected 'VkDescriptorBufferInfo' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pBufferInfoNative = nativeArray;
this.memoryView.setBigInt64(0x30, nativeArray.address, true);
} else {
this._pBufferInfoNative = null;
this.memoryView.setBigInt64(0x30, BI0, true);
}
}
if (this._pTexelBufferView !== null) {
let array = this._pTexelBufferView;
if (array.length !== this.descriptorCount) {
throw new RangeError("Invalid array length, expected length of 'descriptorCount' for 'VkWriteDescriptorSet.pTexelBufferView'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkBufferView)) {
throw new TypeError("Invalid type for 'VkWriteDescriptorSet.pTexelBufferView[" + ii + "]': Expected 'VkBufferView' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pTexelBufferViewNative = nativeArray;
this.memoryView.setBigInt64(0x38, nativeArray.address, true);
} else {
this._pTexelBufferViewNative = null;
this.memoryView.setBigInt64(0x38, BI0, true);
}
}
return true;
};
VkWriteDescriptorSet.prototype.reflect = function reflect(memoryAddress) {
};
VkWriteDescriptorSet.createCopyFrom = function createCopyFrom(original) {
let copy = new VkWriteDescriptorSet();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
if (original.dstSet !== null) {
copy.dstSet = original.dstSet.constructor.createCopyFrom(original.dstSet);
}
copy.dstBinding = original.dstBinding;
copy.dstArrayElement = original.dstArrayElement;
copy.descriptorCount = original.descriptorCount;
copy.descriptorType = original.descriptorType;
if (original.pImageInfo !== null) {
copy.pImageInfo = [...Array(original.pImageInfo.length)].map((v, i) => {
return original.pImageInfo[i].constructor.createCopyFrom(original.pImageInfo[i]);
});
}
if (original.pBufferInfo !== null) {
copy.pBufferInfo = [...Array(original.pBufferInfo.length)].map((v, i) => {
return original.pBufferInfo[i].constructor.createCopyFrom(original.pBufferInfo[i]);
});
}
if (original.pTexelBufferView !== null) {
copy.pTexelBufferView = [...Array(original.pTexelBufferView.length)].map((v, i) => {
return original.pTexelBufferView[i].constructor.createCopyFrom(original.pTexelBufferView[i]);
});
}
return copy;
};
VkWriteDescriptorSet.byteLength = 0x40;
VkWriteDescriptorSet.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
dstSet: {
byteOffset: 0x10,
byteLength: 0x8
},
dstBinding: {
byteOffset: 0x18,
byteLength: 0x4
},
dstArrayElement: {
byteOffset: 0x1C,
byteLength: 0x4
},
descriptorCount: {
byteOffset: 0x20,
byteLength: 0x4
},
descriptorType: {
byteOffset: 0x24,
byteLength: 0x4
},
pImageInfo: {
byteOffset: 0x28,
byteLength: 0x8
},
pBufferInfo: {
byteOffset: 0x30,
byteLength: 0x8
},
pTexelBufferView: {
byteOffset: 0x38,
byteLength: 0x8
},
};
/** VkCopyDescriptorSet **/
function VkCopyDescriptorSet(opts, byteOffset) {
if (new.target !== VkCopyDescriptorSet) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkCopyDescriptorSet, STRUCT_CACHE_VkCopyDescriptorSet);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkCopyDescriptorSet, STRUCT_CACHE_VkCopyDescriptorSet);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkCopyDescriptorSet'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x38);
} else {
this.memoryBuffer = new ArrayBuffer(0x38);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x38);
}
this._pNext = null;
this._srcSet = null;
this._dstSet = null;
this.sType = 0x24;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.srcSet !== void 0) this.srcSet = opts.srcSet;
if (opts.srcBinding !== void 0) this.srcBinding = opts.srcBinding;
if (opts.srcArrayElement !== void 0) this.srcArrayElement = opts.srcArrayElement;
if (opts.dstSet !== void 0) this.dstSet = opts.dstSet;
if (opts.dstBinding !== void 0) this.dstBinding = opts.dstBinding;
if (opts.dstArrayElement !== void 0) this.dstArrayElement = opts.dstArrayElement;
if (opts.descriptorCount !== void 0) this.descriptorCount = opts.descriptorCount;
}
};
Object.defineProperties(VkCopyDescriptorSet.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCopyDescriptorSet.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkCopyDescriptorSet.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkCopyDescriptorSet.pNext' isn't allowed to be filled");
}
},
"srcSet": {
get() {
return this._srcSet;
},
set(value) {
if (value !== null && value.constructor === VkDescriptorSet) {
this._srcSet = value;
this.memoryView.setBigInt64(0x10, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._srcSet = null;
this.memoryView.setBigInt64(0x10, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkCopyDescriptorSet.srcSet': Expected 'VkDescriptorSet' but got '" + typeToString(value) + "'");
}
}
},
"srcBinding": {
get() {
return this.memoryView.getUint32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCopyDescriptorSet.srcBinding");
this.memoryView.setUint32(0x18, value, true);
}
},
"srcArrayElement": {
get() {
return this.memoryView.getUint32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCopyDescriptorSet.srcArrayElement");
this.memoryView.setUint32(0x1C, value, true);
}
},
"dstSet": {
get() {
return this._dstSet;
},
set(value) {
if (value !== null && value.constructor === VkDescriptorSet) {
this._dstSet = value;
this.memoryView.setBigInt64(0x20, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._dstSet = null;
this.memoryView.setBigInt64(0x20, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkCopyDescriptorSet.dstSet': Expected 'VkDescriptorSet' but got '" + typeToString(value) + "'");
}
}
},
"dstBinding": {
get() {
return this.memoryView.getUint32(0x28, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCopyDescriptorSet.dstBinding");
this.memoryView.setUint32(0x28, value, true);
}
},
"dstArrayElement": {
get() {
return this.memoryView.getUint32(0x2C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCopyDescriptorSet.dstArrayElement");
this.memoryView.setUint32(0x2C, value, true);
}
},
"descriptorCount": {
get() {
return this.memoryView.getUint32(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCopyDescriptorSet.descriptorCount");
this.memoryView.setUint32(0x30, value, true);
}
},
});
VkCopyDescriptorSet.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x38);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x38"], 0x0);
this._pNext = null;
this._srcSet = null;
this._dstSet = null;
this.sType = 0x24;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.srcSet !== void 0) this.srcSet = opts.srcSet;
if (opts.srcBinding !== void 0) this.srcBinding = opts.srcBinding;
if (opts.srcArrayElement !== void 0) this.srcArrayElement = opts.srcArrayElement;
if (opts.dstSet !== void 0) this.dstSet = opts.dstSet;
if (opts.dstBinding !== void 0) this.dstBinding = opts.dstBinding;
if (opts.dstArrayElement !== void 0) this.dstArrayElement = opts.dstArrayElement;
if (opts.descriptorCount !== void 0) this.descriptorCount = opts.descriptorCount;
}
};
VkCopyDescriptorSet.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkCopyDescriptorSet.prototype.reflect = function reflect(memoryAddress) {
};
VkCopyDescriptorSet.createCopyFrom = function createCopyFrom(original) {
let copy = new VkCopyDescriptorSet();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
if (original.srcSet !== null) {
copy.srcSet = original.srcSet.constructor.createCopyFrom(original.srcSet);
}
copy.srcBinding = original.srcBinding;
copy.srcArrayElement = original.srcArrayElement;
if (original.dstSet !== null) {
copy.dstSet = original.dstSet.constructor.createCopyFrom(original.dstSet);
}
copy.dstBinding = original.dstBinding;
copy.dstArrayElement = original.dstArrayElement;
copy.descriptorCount = original.descriptorCount;
return copy;
};
VkCopyDescriptorSet.byteLength = 0x38;
VkCopyDescriptorSet.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
srcSet: {
byteOffset: 0x10,
byteLength: 0x8
},
srcBinding: {
byteOffset: 0x18,
byteLength: 0x4
},
srcArrayElement: {
byteOffset: 0x1C,
byteLength: 0x4
},
dstSet: {
byteOffset: 0x20,
byteLength: 0x8
},
dstBinding: {
byteOffset: 0x28,
byteLength: 0x4
},
dstArrayElement: {
byteOffset: 0x2C,
byteLength: 0x4
},
descriptorCount: {
byteOffset: 0x30,
byteLength: 0x4
},
};
/** VkBufferCreateInfo **/
function VkBufferCreateInfo(opts, byteOffset) {
if (new.target !== VkBufferCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkBufferCreateInfo, STRUCT_CACHE_VkBufferCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkBufferCreateInfo, STRUCT_CACHE_VkBufferCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkBufferCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x38);
} else {
this.memoryBuffer = new ArrayBuffer(0x38);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x38);
}
this._pNext = null;
this._pQueueFamilyIndices = null;
this.sType = 0xC;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.size !== void 0) this.size = opts.size;
if (opts.usage !== void 0) this.usage = opts.usage;
if (opts.sharingMode !== void 0) this.sharingMode = opts.sharingMode;
if (opts.queueFamilyIndexCount !== void 0) this.queueFamilyIndexCount = opts.queueFamilyIndexCount;
if (opts.pQueueFamilyIndices !== void 0) this.pQueueFamilyIndices = opts.pQueueFamilyIndices;
}
};
Object.defineProperties(VkBufferCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkBufferCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkBufferCreateInfo.pNext'");
switch (sType) {
case 0x3B9B2F91:
case 0x3B9BDF5B:
case 0x3B9BE340:
case 0x3B9E8322:
break;
default:
throw new TypeError("Invalid type for 'VkBufferCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkBufferCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"size": {
get() {
return this.memoryView.getBigUint64(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkBufferCreateInfo.size")
this.memoryView.setBigUint64(0x18, BigInt(value), true);
}
},
"usage": {
get() {
return this.memoryView.getInt32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferCreateInfo.usage");
this.memoryView.setInt32(0x20, value, true);
}
},
"sharingMode": {
get() {
return this.memoryView.getInt32(0x24, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferCreateInfo.sharingMode");
if (!$VAL_R_VkSharingMode(value)) {
throw new RangeError("Invalid value for 'VkBufferCreateInfo.sharingMode': '" + value + "' is not a value of 'VkSharingMode'");
}
this.memoryView.setInt32(0x24, value, true);
}
},
"queueFamilyIndexCount": {
get() {
return this.memoryView.getUint32(0x28, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferCreateInfo.queueFamilyIndexCount");
this.memoryView.setUint32(0x28, value, true);
}
},
"pQueueFamilyIndices": {
get() {
return this._pQueueFamilyIndices;
},
set(value) {
if (value !== null && value.constructor === Uint32Array) {
this._pQueueFamilyIndices = value;
this.memoryView.setBigInt64(0x30, getAddressFromArrayBuffer(value.buffer), true);
} else if (value === null) {
this._pQueueFamilyIndices = null;
this.memoryView.setBigInt64(0x30, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkBufferCreateInfo.pQueueFamilyIndices': Expected 'Uint32Array' but got '" + typeToString(value) + "'");
}
}
},
});
VkBufferCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x38);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x38"], 0x0);
this._pNext = null;
this._pQueueFamilyIndices = null;
this.sType = 0xC;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.size !== void 0) this.size = opts.size;
if (opts.usage !== void 0) this.usage = opts.usage;
if (opts.sharingMode !== void 0) this.sharingMode = opts.sharingMode;
if (opts.queueFamilyIndexCount !== void 0) this.queueFamilyIndexCount = opts.queueFamilyIndexCount;
if (opts.pQueueFamilyIndices !== void 0) this.pQueueFamilyIndices = opts.pQueueFamilyIndices;
}
};
VkBufferCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkBufferCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkBufferCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkBufferCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.size = original.size;
copy.usage = original.usage;
copy.sharingMode = original.sharingMode;
copy.queueFamilyIndexCount = original.queueFamilyIndexCount;
if (original.pQueueFamilyIndices !== null) {
copy.pQueueFamilyIndices = new Uint32Array(original.pQueueFamilyIndices);
}
return copy;
};
VkBufferCreateInfo.byteLength = 0x38;
VkBufferCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
size: {
byteOffset: 0x18,
byteLength: 0x8
},
usage: {
byteOffset: 0x20,
byteLength: 0x4
},
sharingMode: {
byteOffset: 0x24,
byteLength: 0x4
},
queueFamilyIndexCount: {
byteOffset: 0x28,
byteLength: 0x4
},
pQueueFamilyIndices: {
byteOffset: 0x30,
byteLength: 0x8
},
};
/** VkBufferViewCreateInfo **/
function VkBufferViewCreateInfo(opts, byteOffset) {
if (new.target !== VkBufferViewCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkBufferViewCreateInfo, STRUCT_CACHE_VkBufferViewCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkBufferViewCreateInfo, STRUCT_CACHE_VkBufferViewCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkBufferViewCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x38);
} else {
this.memoryBuffer = new ArrayBuffer(0x38);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x38);
}
this._pNext = null;
this._buffer = null;
this.sType = 0xD;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.buffer !== void 0) this.buffer = opts.buffer;
if (opts.format !== void 0) this.format = opts.format;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.range !== void 0) this.range = opts.range;
}
};
Object.defineProperties(VkBufferViewCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferViewCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkBufferViewCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkBufferViewCreateInfo.pNext' isn't allowed to be filled");
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferViewCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"buffer": {
get() {
return this._buffer;
},
set(value) {
if (value !== null && value.constructor === VkBuffer) {
this._buffer = value;
this.memoryView.setBigInt64(0x18, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._buffer = null;
this.memoryView.setBigInt64(0x18, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkBufferViewCreateInfo.buffer': Expected 'VkBuffer' but got '" + typeToString(value) + "'");
}
}
},
"format": {
get() {
return this.memoryView.getInt32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferViewCreateInfo.format");
if (!$VAL_R_VkFormat(value)) {
throw new RangeError("Invalid value for 'VkBufferViewCreateInfo.format': '" + value + "' is not a value of 'VkFormat'");
}
this.memoryView.setInt32(0x20, value, true);
}
},
"offset": {
get() {
return this.memoryView.getBigUint64(0x28, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkBufferViewCreateInfo.offset")
this.memoryView.setBigUint64(0x28, BigInt(value), true);
}
},
"range": {
get() {
return this.memoryView.getBigUint64(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkBufferViewCreateInfo.range")
this.memoryView.setBigUint64(0x30, BigInt(value), true);
}
},
});
VkBufferViewCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x38);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x38"], 0x0);
this._pNext = null;
this._buffer = null;
this.sType = 0xD;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.buffer !== void 0) this.buffer = opts.buffer;
if (opts.format !== void 0) this.format = opts.format;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.range !== void 0) this.range = opts.range;
}
};
VkBufferViewCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkBufferViewCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkBufferViewCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkBufferViewCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
if (original.buffer !== null) {
copy.buffer = original.buffer.constructor.createCopyFrom(original.buffer);
}
copy.format = original.format;
copy.offset = original.offset;
copy.range = original.range;
return copy;
};
VkBufferViewCreateInfo.byteLength = 0x38;
VkBufferViewCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
buffer: {
byteOffset: 0x18,
byteLength: 0x8
},
format: {
byteOffset: 0x20,
byteLength: 0x4
},
offset: {
byteOffset: 0x28,
byteLength: 0x8
},
range: {
byteOffset: 0x30,
byteLength: 0x8
},
};
/** VkImageSubresource **/
function VkImageSubresource(opts, byteOffset) {
if (new.target !== VkImageSubresource) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkImageSubresource, STRUCT_CACHE_VkImageSubresource);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkImageSubresource, STRUCT_CACHE_VkImageSubresource);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkImageSubresource'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0xC);
} else {
this.memoryBuffer = new ArrayBuffer(0xC);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0xC);
}
if (typeof opts === "object") {
if (opts.aspectMask !== void 0) this.aspectMask = opts.aspectMask;
if (opts.mipLevel !== void 0) this.mipLevel = opts.mipLevel;
if (opts.arrayLayer !== void 0) this.arrayLayer = opts.arrayLayer;
}
};
Object.defineProperties(VkImageSubresource.prototype, {
"aspectMask": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageSubresource.aspectMask");
this.memoryView.setInt32(0x0, value, true);
}
},
"mipLevel": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageSubresource.mipLevel");
this.memoryView.setUint32(0x4, value, true);
}
},
"arrayLayer": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageSubresource.arrayLayer");
this.memoryView.setUint32(0x8, value, true);
}
},
});
VkImageSubresource.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0xC);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0xC"], 0x0);
if (typeof opts === "object") {
if (opts.aspectMask !== void 0) this.aspectMask = opts.aspectMask;
if (opts.mipLevel !== void 0) this.mipLevel = opts.mipLevel;
if (opts.arrayLayer !== void 0) this.arrayLayer = opts.arrayLayer;
}
};
VkImageSubresource.prototype.flush = function flush() {
return true;
};
VkImageSubresource.prototype.reflect = function reflect(memoryAddress) {
};
VkImageSubresource.createCopyFrom = function createCopyFrom(original) {
let copy = new VkImageSubresource();
copy.aspectMask = original.aspectMask;
copy.mipLevel = original.mipLevel;
copy.arrayLayer = original.arrayLayer;
return copy;
};
VkImageSubresource.byteLength = 0xC;
VkImageSubresource.memoryLayout = {
aspectMask: {
byteOffset: 0x0,
byteLength: 0x4
},
mipLevel: {
byteOffset: 0x4,
byteLength: 0x4
},
arrayLayer: {
byteOffset: 0x8,
byteLength: 0x4
},
};
/** VkImageSubresourceLayers **/
function VkImageSubresourceLayers(opts, byteOffset) {
if (new.target !== VkImageSubresourceLayers) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkImageSubresourceLayers, STRUCT_CACHE_VkImageSubresourceLayers);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkImageSubresourceLayers, STRUCT_CACHE_VkImageSubresourceLayers);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkImageSubresourceLayers'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x10);
} else {
this.memoryBuffer = new ArrayBuffer(0x10);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x10);
}
if (typeof opts === "object") {
if (opts.aspectMask !== void 0) this.aspectMask = opts.aspectMask;
if (opts.mipLevel !== void 0) this.mipLevel = opts.mipLevel;
if (opts.baseArrayLayer !== void 0) this.baseArrayLayer = opts.baseArrayLayer;
if (opts.layerCount !== void 0) this.layerCount = opts.layerCount;
}
};
Object.defineProperties(VkImageSubresourceLayers.prototype, {
"aspectMask": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageSubresourceLayers.aspectMask");
this.memoryView.setInt32(0x0, value, true);
}
},
"mipLevel": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageSubresourceLayers.mipLevel");
this.memoryView.setUint32(0x4, value, true);
}
},
"baseArrayLayer": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageSubresourceLayers.baseArrayLayer");
this.memoryView.setUint32(0x8, value, true);
}
},
"layerCount": {
get() {
return this.memoryView.getUint32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageSubresourceLayers.layerCount");
this.memoryView.setUint32(0xC, value, true);
}
},
});
VkImageSubresourceLayers.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x10);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x10"], 0x0);
if (typeof opts === "object") {
if (opts.aspectMask !== void 0) this.aspectMask = opts.aspectMask;
if (opts.mipLevel !== void 0) this.mipLevel = opts.mipLevel;
if (opts.baseArrayLayer !== void 0) this.baseArrayLayer = opts.baseArrayLayer;
if (opts.layerCount !== void 0) this.layerCount = opts.layerCount;
}
};
VkImageSubresourceLayers.prototype.flush = function flush() {
return true;
};
VkImageSubresourceLayers.prototype.reflect = function reflect(memoryAddress) {
};
VkImageSubresourceLayers.createCopyFrom = function createCopyFrom(original) {
let copy = new VkImageSubresourceLayers();
copy.aspectMask = original.aspectMask;
copy.mipLevel = original.mipLevel;
copy.baseArrayLayer = original.baseArrayLayer;
copy.layerCount = original.layerCount;
return copy;
};
VkImageSubresourceLayers.byteLength = 0x10;
VkImageSubresourceLayers.memoryLayout = {
aspectMask: {
byteOffset: 0x0,
byteLength: 0x4
},
mipLevel: {
byteOffset: 0x4,
byteLength: 0x4
},
baseArrayLayer: {
byteOffset: 0x8,
byteLength: 0x4
},
layerCount: {
byteOffset: 0xC,
byteLength: 0x4
},
};
/** VkImageSubresourceRange **/
function VkImageSubresourceRange(opts, byteOffset) {
if (new.target !== VkImageSubresourceRange) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkImageSubresourceRange, STRUCT_CACHE_VkImageSubresourceRange);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkImageSubresourceRange, STRUCT_CACHE_VkImageSubresourceRange);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkImageSubresourceRange'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x14);
} else {
this.memoryBuffer = new ArrayBuffer(0x14);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x14);
}
if (typeof opts === "object") {
if (opts.aspectMask !== void 0) this.aspectMask = opts.aspectMask;
if (opts.baseMipLevel !== void 0) this.baseMipLevel = opts.baseMipLevel;
if (opts.levelCount !== void 0) this.levelCount = opts.levelCount;
if (opts.baseArrayLayer !== void 0) this.baseArrayLayer = opts.baseArrayLayer;
if (opts.layerCount !== void 0) this.layerCount = opts.layerCount;
}
};
Object.defineProperties(VkImageSubresourceRange.prototype, {
"aspectMask": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageSubresourceRange.aspectMask");
this.memoryView.setInt32(0x0, value, true);
}
},
"baseMipLevel": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageSubresourceRange.baseMipLevel");
this.memoryView.setUint32(0x4, value, true);
}
},
"levelCount": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageSubresourceRange.levelCount");
this.memoryView.setUint32(0x8, value, true);
}
},
"baseArrayLayer": {
get() {
return this.memoryView.getUint32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageSubresourceRange.baseArrayLayer");
this.memoryView.setUint32(0xC, value, true);
}
},
"layerCount": {
get() {
return this.memoryView.getUint32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageSubresourceRange.layerCount");
this.memoryView.setUint32(0x10, value, true);
}
},
});
VkImageSubresourceRange.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x14);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x14"], 0x0);
if (typeof opts === "object") {
if (opts.aspectMask !== void 0) this.aspectMask = opts.aspectMask;
if (opts.baseMipLevel !== void 0) this.baseMipLevel = opts.baseMipLevel;
if (opts.levelCount !== void 0) this.levelCount = opts.levelCount;
if (opts.baseArrayLayer !== void 0) this.baseArrayLayer = opts.baseArrayLayer;
if (opts.layerCount !== void 0) this.layerCount = opts.layerCount;
}
};
VkImageSubresourceRange.prototype.flush = function flush() {
return true;
};
VkImageSubresourceRange.prototype.reflect = function reflect(memoryAddress) {
};
VkImageSubresourceRange.createCopyFrom = function createCopyFrom(original) {
let copy = new VkImageSubresourceRange();
copy.aspectMask = original.aspectMask;
copy.baseMipLevel = original.baseMipLevel;
copy.levelCount = original.levelCount;
copy.baseArrayLayer = original.baseArrayLayer;
copy.layerCount = original.layerCount;
return copy;
};
VkImageSubresourceRange.byteLength = 0x14;
VkImageSubresourceRange.memoryLayout = {
aspectMask: {
byteOffset: 0x0,
byteLength: 0x4
},
baseMipLevel: {
byteOffset: 0x4,
byteLength: 0x4
},
levelCount: {
byteOffset: 0x8,
byteLength: 0x4
},
baseArrayLayer: {
byteOffset: 0xC,
byteLength: 0x4
},
layerCount: {
byteOffset: 0x10,
byteLength: 0x4
},
};
/** VkMemoryBarrier **/
function VkMemoryBarrier(opts, byteOffset) {
if (new.target !== VkMemoryBarrier) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkMemoryBarrier, STRUCT_CACHE_VkMemoryBarrier);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkMemoryBarrier, STRUCT_CACHE_VkMemoryBarrier);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkMemoryBarrier'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._pNext = null;
this.sType = 0x2E;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.srcAccessMask !== void 0) this.srcAccessMask = opts.srcAccessMask;
if (opts.dstAccessMask !== void 0) this.dstAccessMask = opts.dstAccessMask;
}
};
Object.defineProperties(VkMemoryBarrier.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkMemoryBarrier.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkMemoryBarrier.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkMemoryBarrier.pNext' isn't allowed to be filled");
}
},
"srcAccessMask": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkMemoryBarrier.srcAccessMask");
this.memoryView.setInt32(0x10, value, true);
}
},
"dstAccessMask": {
get() {
return this.memoryView.getInt32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkMemoryBarrier.dstAccessMask");
this.memoryView.setInt32(0x14, value, true);
}
},
});
VkMemoryBarrier.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._pNext = null;
this.sType = 0x2E;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.srcAccessMask !== void 0) this.srcAccessMask = opts.srcAccessMask;
if (opts.dstAccessMask !== void 0) this.dstAccessMask = opts.dstAccessMask;
}
};
VkMemoryBarrier.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkMemoryBarrier.prototype.reflect = function reflect(memoryAddress) {
};
VkMemoryBarrier.createCopyFrom = function createCopyFrom(original) {
let copy = new VkMemoryBarrier();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.srcAccessMask = original.srcAccessMask;
copy.dstAccessMask = original.dstAccessMask;
return copy;
};
VkMemoryBarrier.byteLength = 0x18;
VkMemoryBarrier.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
srcAccessMask: {
byteOffset: 0x10,
byteLength: 0x4
},
dstAccessMask: {
byteOffset: 0x14,
byteLength: 0x4
},
};
/** VkBufferMemoryBarrier **/
function VkBufferMemoryBarrier(opts, byteOffset) {
if (new.target !== VkBufferMemoryBarrier) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkBufferMemoryBarrier, STRUCT_CACHE_VkBufferMemoryBarrier);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkBufferMemoryBarrier, STRUCT_CACHE_VkBufferMemoryBarrier);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkBufferMemoryBarrier'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x38);
} else {
this.memoryBuffer = new ArrayBuffer(0x38);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x38);
}
this._pNext = null;
this._buffer = null;
this.sType = 0x2C;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.srcAccessMask !== void 0) this.srcAccessMask = opts.srcAccessMask;
if (opts.dstAccessMask !== void 0) this.dstAccessMask = opts.dstAccessMask;
if (opts.srcQueueFamilyIndex !== void 0) this.srcQueueFamilyIndex = opts.srcQueueFamilyIndex;
if (opts.dstQueueFamilyIndex !== void 0) this.dstQueueFamilyIndex = opts.dstQueueFamilyIndex;
if (opts.buffer !== void 0) this.buffer = opts.buffer;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.size !== void 0) this.size = opts.size;
}
};
Object.defineProperties(VkBufferMemoryBarrier.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferMemoryBarrier.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkBufferMemoryBarrier.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkBufferMemoryBarrier.pNext' isn't allowed to be filled");
}
},
"srcAccessMask": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferMemoryBarrier.srcAccessMask");
this.memoryView.setInt32(0x10, value, true);
}
},
"dstAccessMask": {
get() {
return this.memoryView.getInt32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferMemoryBarrier.dstAccessMask");
this.memoryView.setInt32(0x14, value, true);
}
},
"srcQueueFamilyIndex": {
get() {
return this.memoryView.getUint32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferMemoryBarrier.srcQueueFamilyIndex");
this.memoryView.setUint32(0x18, value, true);
}
},
"dstQueueFamilyIndex": {
get() {
return this.memoryView.getUint32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferMemoryBarrier.dstQueueFamilyIndex");
this.memoryView.setUint32(0x1C, value, true);
}
},
"buffer": {
get() {
return this._buffer;
},
set(value) {
if (value !== null && value.constructor === VkBuffer) {
this._buffer = value;
this.memoryView.setBigInt64(0x20, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._buffer = null;
this.memoryView.setBigInt64(0x20, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkBufferMemoryBarrier.buffer': Expected 'VkBuffer' but got '" + typeToString(value) + "'");
}
}
},
"offset": {
get() {
return this.memoryView.getBigUint64(0x28, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkBufferMemoryBarrier.offset")
this.memoryView.setBigUint64(0x28, BigInt(value), true);
}
},
"size": {
get() {
return this.memoryView.getBigUint64(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkBufferMemoryBarrier.size")
this.memoryView.setBigUint64(0x30, BigInt(value), true);
}
},
});
VkBufferMemoryBarrier.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x38);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x38"], 0x0);
this._pNext = null;
this._buffer = null;
this.sType = 0x2C;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.srcAccessMask !== void 0) this.srcAccessMask = opts.srcAccessMask;
if (opts.dstAccessMask !== void 0) this.dstAccessMask = opts.dstAccessMask;
if (opts.srcQueueFamilyIndex !== void 0) this.srcQueueFamilyIndex = opts.srcQueueFamilyIndex;
if (opts.dstQueueFamilyIndex !== void 0) this.dstQueueFamilyIndex = opts.dstQueueFamilyIndex;
if (opts.buffer !== void 0) this.buffer = opts.buffer;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.size !== void 0) this.size = opts.size;
}
};
VkBufferMemoryBarrier.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkBufferMemoryBarrier.prototype.reflect = function reflect(memoryAddress) {
};
VkBufferMemoryBarrier.createCopyFrom = function createCopyFrom(original) {
let copy = new VkBufferMemoryBarrier();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.srcAccessMask = original.srcAccessMask;
copy.dstAccessMask = original.dstAccessMask;
copy.srcQueueFamilyIndex = original.srcQueueFamilyIndex;
copy.dstQueueFamilyIndex = original.dstQueueFamilyIndex;
if (original.buffer !== null) {
copy.buffer = original.buffer.constructor.createCopyFrom(original.buffer);
}
copy.offset = original.offset;
copy.size = original.size;
return copy;
};
VkBufferMemoryBarrier.byteLength = 0x38;
VkBufferMemoryBarrier.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
srcAccessMask: {
byteOffset: 0x10,
byteLength: 0x4
},
dstAccessMask: {
byteOffset: 0x14,
byteLength: 0x4
},
srcQueueFamilyIndex: {
byteOffset: 0x18,
byteLength: 0x4
},
dstQueueFamilyIndex: {
byteOffset: 0x1C,
byteLength: 0x4
},
buffer: {
byteOffset: 0x20,
byteLength: 0x8
},
offset: {
byteOffset: 0x28,
byteLength: 0x8
},
size: {
byteOffset: 0x30,
byteLength: 0x8
},
};
/** VkImageMemoryBarrier **/
function VkImageMemoryBarrier(opts, byteOffset) {
if (new.target !== VkImageMemoryBarrier) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkImageMemoryBarrier, STRUCT_CACHE_VkImageMemoryBarrier);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkImageMemoryBarrier, STRUCT_CACHE_VkImageMemoryBarrier);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkImageMemoryBarrier'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x48);
} else {
this.memoryBuffer = new ArrayBuffer(0x48);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x48);
}
this._pNext = null;
this._image = null;
this._subresourceRange = new VkImageSubresourceRange({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x30 });
this.sType = 0x2D;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.srcAccessMask !== void 0) this.srcAccessMask = opts.srcAccessMask;
if (opts.dstAccessMask !== void 0) this.dstAccessMask = opts.dstAccessMask;
if (opts.oldLayout !== void 0) this.oldLayout = opts.oldLayout;
if (opts.newLayout !== void 0) this.newLayout = opts.newLayout;
if (opts.srcQueueFamilyIndex !== void 0) this.srcQueueFamilyIndex = opts.srcQueueFamilyIndex;
if (opts.dstQueueFamilyIndex !== void 0) this.dstQueueFamilyIndex = opts.dstQueueFamilyIndex;
if (opts.image !== void 0) this.image = opts.image;
if (opts.subresourceRange !== void 0) this.subresourceRange = opts.subresourceRange;
}
};
Object.defineProperties(VkImageMemoryBarrier.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageMemoryBarrier.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkImageMemoryBarrier.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkImageMemoryBarrier.pNext'");
switch (sType) {
case 0x3B9CF898:
break;
default:
throw new TypeError("Invalid type for 'VkImageMemoryBarrier.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkImageMemoryBarrier.pNext'");
}
}
},
"srcAccessMask": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageMemoryBarrier.srcAccessMask");
this.memoryView.setInt32(0x10, value, true);
}
},
"dstAccessMask": {
get() {
return this.memoryView.getInt32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageMemoryBarrier.dstAccessMask");
this.memoryView.setInt32(0x14, value, true);
}
},
"oldLayout": {
get() {
return this.memoryView.getInt32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageMemoryBarrier.oldLayout");
if (!$VAL_R_VkImageLayout(value)) {
throw new RangeError("Invalid value for 'VkImageMemoryBarrier.oldLayout': '" + value + "' is not a value of 'VkImageLayout'");
}
this.memoryView.setInt32(0x18, value, true);
}
},
"newLayout": {
get() {
return this.memoryView.getInt32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageMemoryBarrier.newLayout");
if (!$VAL_R_VkImageLayout(value)) {
throw new RangeError("Invalid value for 'VkImageMemoryBarrier.newLayout': '" + value + "' is not a value of 'VkImageLayout'");
}
this.memoryView.setInt32(0x1C, value, true);
}
},
"srcQueueFamilyIndex": {
get() {
return this.memoryView.getUint32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageMemoryBarrier.srcQueueFamilyIndex");
this.memoryView.setUint32(0x20, value, true);
}
},
"dstQueueFamilyIndex": {
get() {
return this.memoryView.getUint32(0x24, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageMemoryBarrier.dstQueueFamilyIndex");
this.memoryView.setUint32(0x24, value, true);
}
},
"image": {
get() {
return this._image;
},
set(value) {
if (value !== null && value.constructor === VkImage) {
this._image = value;
this.memoryView.setBigInt64(0x28, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._image = null;
this.memoryView.setBigInt64(0x28, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkImageMemoryBarrier.image': Expected 'VkImage' but got '" + typeToString(value) + "'");
}
}
},
"subresourceRange": {
get() {
return this._subresourceRange;
},
set(value) {
if (value !== null && value.constructor === VkImageSubresourceRange) {
value.flush();
this._subresourceRange = value;
} else if (value === null) {
this._subresourceRange = null;
} else {
throw new TypeError("Invalid type for 'VkImageMemoryBarrier.subresourceRange': Expected 'VkImageSubresourceRange' but got '" + typeToString(value) + "'");
}
}
},
});
VkImageMemoryBarrier.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x48);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x48"], 0x0);
this._pNext = null;
this._image = null;
if (this._subresourceRange !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._subresourceRange.memoryBuffer) this._subresourceRange = new VkImageSubresourceRange({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x30 });
else this._subresourceRange.reset();
}
this.sType = 0x2D;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.srcAccessMask !== void 0) this.srcAccessMask = opts.srcAccessMask;
if (opts.dstAccessMask !== void 0) this.dstAccessMask = opts.dstAccessMask;
if (opts.oldLayout !== void 0) this.oldLayout = opts.oldLayout;
if (opts.newLayout !== void 0) this.newLayout = opts.newLayout;
if (opts.srcQueueFamilyIndex !== void 0) this.srcQueueFamilyIndex = opts.srcQueueFamilyIndex;
if (opts.dstQueueFamilyIndex !== void 0) this.dstQueueFamilyIndex = opts.dstQueueFamilyIndex;
if (opts.image !== void 0) this.image = opts.image;
if (opts.subresourceRange !== void 0) this.subresourceRange = opts.subresourceRange;
}
};
VkImageMemoryBarrier.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._subresourceRange !== null) {
let subresourceRange = this._subresourceRange;
subresourceRange.flush();
if (this.memoryBuffer !== subresourceRange.memoryBuffer) {
let srcView = new Uint8Array(subresourceRange.memoryBuffer, subresourceRange.$memoryOffset, 0x14);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x30);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageMemoryBarrier.subresourceRange' isn't used as shared-memory");
}
}
return true;
};
VkImageMemoryBarrier.prototype.reflect = function reflect(memoryAddress) {
};
VkImageMemoryBarrier.createCopyFrom = function createCopyFrom(original) {
let copy = new VkImageMemoryBarrier();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.srcAccessMask = original.srcAccessMask;
copy.dstAccessMask = original.dstAccessMask;
copy.oldLayout = original.oldLayout;
copy.newLayout = original.newLayout;
copy.srcQueueFamilyIndex = original.srcQueueFamilyIndex;
copy.dstQueueFamilyIndex = original.dstQueueFamilyIndex;
if (original.image !== null) {
copy.image = original.image.constructor.createCopyFrom(original.image);
}
if (original.subresourceRange !== null) {
copy.subresourceRange = original.subresourceRange.constructor.createCopyFrom(original.subresourceRange);
}
return copy;
};
VkImageMemoryBarrier.byteLength = 0x48;
VkImageMemoryBarrier.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
srcAccessMask: {
byteOffset: 0x10,
byteLength: 0x4
},
dstAccessMask: {
byteOffset: 0x14,
byteLength: 0x4
},
oldLayout: {
byteOffset: 0x18,
byteLength: 0x4
},
newLayout: {
byteOffset: 0x1C,
byteLength: 0x4
},
srcQueueFamilyIndex: {
byteOffset: 0x20,
byteLength: 0x4
},
dstQueueFamilyIndex: {
byteOffset: 0x24,
byteLength: 0x4
},
image: {
byteOffset: 0x28,
byteLength: 0x8
},
subresourceRange: {
byteOffset: 0x30,
byteLength: 0x14
},
};
/** VkImageCreateInfo **/
function VkImageCreateInfo(opts, byteOffset) {
if (new.target !== VkImageCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkImageCreateInfo, STRUCT_CACHE_VkImageCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkImageCreateInfo, STRUCT_CACHE_VkImageCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkImageCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x58);
} else {
this.memoryBuffer = new ArrayBuffer(0x58);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x58);
}
this._pNext = null;
this._extent = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x1C });
this._pQueueFamilyIndices = null;
this.sType = 0xE;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.imageType !== void 0) this.imageType = opts.imageType;
if (opts.format !== void 0) this.format = opts.format;
if (opts.extent !== void 0) this.extent = opts.extent;
if (opts.mipLevels !== void 0) this.mipLevels = opts.mipLevels;
if (opts.arrayLayers !== void 0) this.arrayLayers = opts.arrayLayers;
if (opts.samples !== void 0) this.samples = opts.samples;
if (opts.tiling !== void 0) this.tiling = opts.tiling;
if (opts.usage !== void 0) this.usage = opts.usage;
if (opts.sharingMode !== void 0) this.sharingMode = opts.sharingMode;
if (opts.queueFamilyIndexCount !== void 0) this.queueFamilyIndexCount = opts.queueFamilyIndexCount;
if (opts.pQueueFamilyIndices !== void 0) this.pQueueFamilyIndices = opts.pQueueFamilyIndices;
if (opts.initialLayout !== void 0) this.initialLayout = opts.initialLayout;
}
};
Object.defineProperties(VkImageCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkImageCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkImageCreateInfo.pNext'");
switch (sType) {
case 0x3B9B2F90:
case 0x3B9BA4C0:
case 0x3B9BE341:
case 0x3B9BB468:
case 0x3B9D0838:
case 0x3B9CC1ED:
case 0x3B9D3333:
case 0x3B9D3334:
case 0x3B9E8AF0:
break;
default:
throw new TypeError("Invalid type for 'VkImageCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkImageCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"imageType": {
get() {
return this.memoryView.getInt32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageCreateInfo.imageType");
if (!$VAL_R_VkImageType(value)) {
throw new RangeError("Invalid value for 'VkImageCreateInfo.imageType': '" + value + "' is not a value of 'VkImageType'");
}
this.memoryView.setInt32(0x14, value, true);
}
},
"format": {
get() {
return this.memoryView.getInt32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageCreateInfo.format");
if (!$VAL_R_VkFormat(value)) {
throw new RangeError("Invalid value for 'VkImageCreateInfo.format': '" + value + "' is not a value of 'VkFormat'");
}
this.memoryView.setInt32(0x18, value, true);
}
},
"extent": {
get() {
return this._extent;
},
set(value) {
if (value !== null && value.constructor === VkExtent3D) {
value.flush();
this._extent = value;
} else if (value === null) {
this._extent = null;
} else {
throw new TypeError("Invalid type for 'VkImageCreateInfo.extent': Expected 'VkExtent3D' but got '" + typeToString(value) + "'");
}
}
},
"mipLevels": {
get() {
return this.memoryView.getUint32(0x28, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageCreateInfo.mipLevels");
this.memoryView.setUint32(0x28, value, true);
}
},
"arrayLayers": {
get() {
return this.memoryView.getUint32(0x2C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageCreateInfo.arrayLayers");
this.memoryView.setUint32(0x2C, value, true);
}
},
"samples": {
get() {
return this.memoryView.getInt32(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageCreateInfo.samples");
this.memoryView.setInt32(0x30, value, true);
}
},
"tiling": {
get() {
return this.memoryView.getInt32(0x34, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageCreateInfo.tiling");
if (!$VAL_R_VkImageTiling(value)) {
throw new RangeError("Invalid value for 'VkImageCreateInfo.tiling': '" + value + "' is not a value of 'VkImageTiling'");
}
this.memoryView.setInt32(0x34, value, true);
}
},
"usage": {
get() {
return this.memoryView.getInt32(0x38, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageCreateInfo.usage");
this.memoryView.setInt32(0x38, value, true);
}
},
"sharingMode": {
get() {
return this.memoryView.getInt32(0x3C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageCreateInfo.sharingMode");
if (!$VAL_R_VkSharingMode(value)) {
throw new RangeError("Invalid value for 'VkImageCreateInfo.sharingMode': '" + value + "' is not a value of 'VkSharingMode'");
}
this.memoryView.setInt32(0x3C, value, true);
}
},
"queueFamilyIndexCount": {
get() {
return this.memoryView.getUint32(0x40, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageCreateInfo.queueFamilyIndexCount");
this.memoryView.setUint32(0x40, value, true);
}
},
"pQueueFamilyIndices": {
get() {
return this._pQueueFamilyIndices;
},
set(value) {
if (value !== null && value.constructor === Uint32Array) {
this._pQueueFamilyIndices = value;
this.memoryView.setBigInt64(0x48, getAddressFromArrayBuffer(value.buffer), true);
} else if (value === null) {
this._pQueueFamilyIndices = null;
this.memoryView.setBigInt64(0x48, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkImageCreateInfo.pQueueFamilyIndices': Expected 'Uint32Array' but got '" + typeToString(value) + "'");
}
}
},
"initialLayout": {
get() {
return this.memoryView.getInt32(0x50, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageCreateInfo.initialLayout");
if (!$VAL_R_VkImageLayout(value)) {
throw new RangeError("Invalid value for 'VkImageCreateInfo.initialLayout': '" + value + "' is not a value of 'VkImageLayout'");
}
this.memoryView.setInt32(0x50, value, true);
}
},
});
VkImageCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x58);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x58"], 0x0);
this._pNext = null;
if (this._extent !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._extent.memoryBuffer) this._extent = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x1C });
else this._extent.reset();
}
this._pQueueFamilyIndices = null;
this.sType = 0xE;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.imageType !== void 0) this.imageType = opts.imageType;
if (opts.format !== void 0) this.format = opts.format;
if (opts.extent !== void 0) this.extent = opts.extent;
if (opts.mipLevels !== void 0) this.mipLevels = opts.mipLevels;
if (opts.arrayLayers !== void 0) this.arrayLayers = opts.arrayLayers;
if (opts.samples !== void 0) this.samples = opts.samples;
if (opts.tiling !== void 0) this.tiling = opts.tiling;
if (opts.usage !== void 0) this.usage = opts.usage;
if (opts.sharingMode !== void 0) this.sharingMode = opts.sharingMode;
if (opts.queueFamilyIndexCount !== void 0) this.queueFamilyIndexCount = opts.queueFamilyIndexCount;
if (opts.pQueueFamilyIndices !== void 0) this.pQueueFamilyIndices = opts.pQueueFamilyIndices;
if (opts.initialLayout !== void 0) this.initialLayout = opts.initialLayout;
}
};
VkImageCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._extent !== null) {
let extent = this._extent;
extent.flush();
if (this.memoryBuffer !== extent.memoryBuffer) {
let srcView = new Uint8Array(extent.memoryBuffer, extent.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x1C);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageCreateInfo.extent' isn't used as shared-memory");
}
}
return true;
};
VkImageCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkImageCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkImageCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.imageType = original.imageType;
copy.format = original.format;
if (original.extent !== null) {
copy.extent = original.extent.constructor.createCopyFrom(original.extent);
}
copy.mipLevels = original.mipLevels;
copy.arrayLayers = original.arrayLayers;
copy.samples = original.samples;
copy.tiling = original.tiling;
copy.usage = original.usage;
copy.sharingMode = original.sharingMode;
copy.queueFamilyIndexCount = original.queueFamilyIndexCount;
if (original.pQueueFamilyIndices !== null) {
copy.pQueueFamilyIndices = new Uint32Array(original.pQueueFamilyIndices);
}
copy.initialLayout = original.initialLayout;
return copy;
};
VkImageCreateInfo.byteLength = 0x58;
VkImageCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
imageType: {
byteOffset: 0x14,
byteLength: 0x4
},
format: {
byteOffset: 0x18,
byteLength: 0x4
},
extent: {
byteOffset: 0x1C,
byteLength: 0xC
},
mipLevels: {
byteOffset: 0x28,
byteLength: 0x4
},
arrayLayers: {
byteOffset: 0x2C,
byteLength: 0x4
},
samples: {
byteOffset: 0x30,
byteLength: 0x4
},
tiling: {
byteOffset: 0x34,
byteLength: 0x4
},
usage: {
byteOffset: 0x38,
byteLength: 0x4
},
sharingMode: {
byteOffset: 0x3C,
byteLength: 0x4
},
queueFamilyIndexCount: {
byteOffset: 0x40,
byteLength: 0x4
},
pQueueFamilyIndices: {
byteOffset: 0x48,
byteLength: 0x8
},
initialLayout: {
byteOffset: 0x50,
byteLength: 0x4
},
};
/** VkSubresourceLayout **/
function VkSubresourceLayout(opts, byteOffset) {
if (new.target !== VkSubresourceLayout) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSubresourceLayout, STRUCT_CACHE_VkSubresourceLayout);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSubresourceLayout, STRUCT_CACHE_VkSubresourceLayout);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSubresourceLayout'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x28);
} else {
this.memoryBuffer = new ArrayBuffer(0x28);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x28);
}
if (typeof opts === "object") {
}
};
Object.defineProperties(VkSubresourceLayout.prototype, {
"offset": {
get() {
return this.memoryView.getBigUint64(0x0, true);
},
},
"size": {
get() {
return this.memoryView.getBigUint64(0x8, true);
},
},
"rowPitch": {
get() {
return this.memoryView.getBigUint64(0x10, true);
},
},
"arrayPitch": {
get() {
return this.memoryView.getBigUint64(0x18, true);
},
},
"depthPitch": {
get() {
return this.memoryView.getBigUint64(0x20, true);
},
},
});
VkSubresourceLayout.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x28);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x28"], 0x0);
if (typeof opts === "object") {
}
};
VkSubresourceLayout.prototype.flush = function flush() {
return true;
};
VkSubresourceLayout.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x28));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x28), 0x0);};
VkSubresourceLayout.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSubresourceLayout();
copy.offset = original.offset;
copy.size = original.size;
copy.rowPitch = original.rowPitch;
copy.arrayPitch = original.arrayPitch;
copy.depthPitch = original.depthPitch;
return copy;
};
VkSubresourceLayout.byteLength = 0x28;
VkSubresourceLayout.memoryLayout = {
offset: {
byteOffset: 0x0,
byteLength: 0x8
},
size: {
byteOffset: 0x8,
byteLength: 0x8
},
rowPitch: {
byteOffset: 0x10,
byteLength: 0x8
},
arrayPitch: {
byteOffset: 0x18,
byteLength: 0x8
},
depthPitch: {
byteOffset: 0x20,
byteLength: 0x8
},
};
/** VkImageViewCreateInfo **/
function VkImageViewCreateInfo(opts, byteOffset) {
if (new.target !== VkImageViewCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkImageViewCreateInfo, STRUCT_CACHE_VkImageViewCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkImageViewCreateInfo, STRUCT_CACHE_VkImageViewCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkImageViewCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x50);
} else {
this.memoryBuffer = new ArrayBuffer(0x50);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x50);
}
this._pNext = null;
this._image = null;
this._components = new VkComponentMapping({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x28 });
this._subresourceRange = new VkImageSubresourceRange({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x38 });
this.sType = 0xF;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.image !== void 0) this.image = opts.image;
if (opts.viewType !== void 0) this.viewType = opts.viewType;
if (opts.format !== void 0) this.format = opts.format;
if (opts.components !== void 0) this.components = opts.components;
if (opts.subresourceRange !== void 0) this.subresourceRange = opts.subresourceRange;
}
};
Object.defineProperties(VkImageViewCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageViewCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkImageViewCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkImageViewCreateInfo.pNext'");
switch (sType) {
case 0x3B9C930A:
case 0x3B9D2B61:
case 0x3B9BCFB8:
break;
default:
throw new TypeError("Invalid type for 'VkImageViewCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkImageViewCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageViewCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"image": {
get() {
return this._image;
},
set(value) {
if (value !== null && value.constructor === VkImage) {
this._image = value;
this.memoryView.setBigInt64(0x18, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._image = null;
this.memoryView.setBigInt64(0x18, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkImageViewCreateInfo.image': Expected 'VkImage' but got '" + typeToString(value) + "'");
}
}
},
"viewType": {
get() {
return this.memoryView.getInt32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageViewCreateInfo.viewType");
if (!$VAL_R_VkImageViewType(value)) {
throw new RangeError("Invalid value for 'VkImageViewCreateInfo.viewType': '" + value + "' is not a value of 'VkImageViewType'");
}
this.memoryView.setInt32(0x20, value, true);
}
},
"format": {
get() {
return this.memoryView.getInt32(0x24, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkImageViewCreateInfo.format");
if (!$VAL_R_VkFormat(value)) {
throw new RangeError("Invalid value for 'VkImageViewCreateInfo.format': '" + value + "' is not a value of 'VkFormat'");
}
this.memoryView.setInt32(0x24, value, true);
}
},
"components": {
get() {
return this._components;
},
set(value) {
if (value !== null && value.constructor === VkComponentMapping) {
value.flush();
this._components = value;
} else if (value === null) {
this._components = null;
} else {
throw new TypeError("Invalid type for 'VkImageViewCreateInfo.components': Expected 'VkComponentMapping' but got '" + typeToString(value) + "'");
}
}
},
"subresourceRange": {
get() {
return this._subresourceRange;
},
set(value) {
if (value !== null && value.constructor === VkImageSubresourceRange) {
value.flush();
this._subresourceRange = value;
} else if (value === null) {
this._subresourceRange = null;
} else {
throw new TypeError("Invalid type for 'VkImageViewCreateInfo.subresourceRange': Expected 'VkImageSubresourceRange' but got '" + typeToString(value) + "'");
}
}
},
});
VkImageViewCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x50);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x50"], 0x0);
this._pNext = null;
this._image = null;
if (this._components !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._components.memoryBuffer) this._components = new VkComponentMapping({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x28 });
else this._components.reset();
}
if (this._subresourceRange !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._subresourceRange.memoryBuffer) this._subresourceRange = new VkImageSubresourceRange({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x38 });
else this._subresourceRange.reset();
}
this.sType = 0xF;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.image !== void 0) this.image = opts.image;
if (opts.viewType !== void 0) this.viewType = opts.viewType;
if (opts.format !== void 0) this.format = opts.format;
if (opts.components !== void 0) this.components = opts.components;
if (opts.subresourceRange !== void 0) this.subresourceRange = opts.subresourceRange;
}
};
VkImageViewCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._components !== null) {
let components = this._components;
components.flush();
if (this.memoryBuffer !== components.memoryBuffer) {
let srcView = new Uint8Array(components.memoryBuffer, components.$memoryOffset, 0x10);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x28);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageViewCreateInfo.components' isn't used as shared-memory");
}
}
if (this._subresourceRange !== null) {
let subresourceRange = this._subresourceRange;
subresourceRange.flush();
if (this.memoryBuffer !== subresourceRange.memoryBuffer) {
let srcView = new Uint8Array(subresourceRange.memoryBuffer, subresourceRange.$memoryOffset, 0x14);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x38);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageViewCreateInfo.subresourceRange' isn't used as shared-memory");
}
}
return true;
};
VkImageViewCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkImageViewCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkImageViewCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
if (original.image !== null) {
copy.image = original.image.constructor.createCopyFrom(original.image);
}
copy.viewType = original.viewType;
copy.format = original.format;
if (original.components !== null) {
copy.components = original.components.constructor.createCopyFrom(original.components);
}
if (original.subresourceRange !== null) {
copy.subresourceRange = original.subresourceRange.constructor.createCopyFrom(original.subresourceRange);
}
return copy;
};
VkImageViewCreateInfo.byteLength = 0x50;
VkImageViewCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
image: {
byteOffset: 0x18,
byteLength: 0x8
},
viewType: {
byteOffset: 0x20,
byteLength: 0x4
},
format: {
byteOffset: 0x24,
byteLength: 0x4
},
components: {
byteOffset: 0x28,
byteLength: 0x10
},
subresourceRange: {
byteOffset: 0x38,
byteLength: 0x14
},
};
/** VkBufferCopy **/
function VkBufferCopy(opts, byteOffset) {
if (new.target !== VkBufferCopy) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkBufferCopy, STRUCT_CACHE_VkBufferCopy);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkBufferCopy, STRUCT_CACHE_VkBufferCopy);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkBufferCopy'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
if (typeof opts === "object") {
if (opts.srcOffset !== void 0) this.srcOffset = opts.srcOffset;
if (opts.dstOffset !== void 0) this.dstOffset = opts.dstOffset;
if (opts.size !== void 0) this.size = opts.size;
}
};
Object.defineProperties(VkBufferCopy.prototype, {
"srcOffset": {
get() {
return this.memoryView.getBigUint64(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkBufferCopy.srcOffset")
this.memoryView.setBigUint64(0x0, BigInt(value), true);
}
},
"dstOffset": {
get() {
return this.memoryView.getBigUint64(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkBufferCopy.dstOffset")
this.memoryView.setBigUint64(0x8, BigInt(value), true);
}
},
"size": {
get() {
return this.memoryView.getBigUint64(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkBufferCopy.size")
this.memoryView.setBigUint64(0x10, BigInt(value), true);
}
},
});
VkBufferCopy.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
if (typeof opts === "object") {
if (opts.srcOffset !== void 0) this.srcOffset = opts.srcOffset;
if (opts.dstOffset !== void 0) this.dstOffset = opts.dstOffset;
if (opts.size !== void 0) this.size = opts.size;
}
};
VkBufferCopy.prototype.flush = function flush() {
return true;
};
VkBufferCopy.prototype.reflect = function reflect(memoryAddress) {
};
VkBufferCopy.createCopyFrom = function createCopyFrom(original) {
let copy = new VkBufferCopy();
copy.srcOffset = original.srcOffset;
copy.dstOffset = original.dstOffset;
copy.size = original.size;
return copy;
};
VkBufferCopy.byteLength = 0x18;
VkBufferCopy.memoryLayout = {
srcOffset: {
byteOffset: 0x0,
byteLength: 0x8
},
dstOffset: {
byteOffset: 0x8,
byteLength: 0x8
},
size: {
byteOffset: 0x10,
byteLength: 0x8
},
};
/** VkSparseMemoryBind **/
function VkSparseMemoryBind(opts, byteOffset) {
if (new.target !== VkSparseMemoryBind) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSparseMemoryBind, STRUCT_CACHE_VkSparseMemoryBind);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSparseMemoryBind, STRUCT_CACHE_VkSparseMemoryBind);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSparseMemoryBind'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x28);
} else {
this.memoryBuffer = new ArrayBuffer(0x28);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x28);
}
this._memory = null;
if (typeof opts === "object") {
if (opts.resourceOffset !== void 0) this.resourceOffset = opts.resourceOffset;
if (opts.size !== void 0) this.size = opts.size;
if (opts.memory !== void 0) this.memory = opts.memory;
if (opts.memoryOffset !== void 0) this.memoryOffset = opts.memoryOffset;
if (opts.flags !== void 0) this.flags = opts.flags;
}
};
Object.defineProperties(VkSparseMemoryBind.prototype, {
"resourceOffset": {
get() {
return this.memoryView.getBigUint64(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkSparseMemoryBind.resourceOffset")
this.memoryView.setBigUint64(0x0, BigInt(value), true);
}
},
"size": {
get() {
return this.memoryView.getBigUint64(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkSparseMemoryBind.size")
this.memoryView.setBigUint64(0x8, BigInt(value), true);
}
},
"memory": {
get() {
return this._memory;
},
set(value) {
if (value !== null && value.constructor === VkDeviceMemory) {
this._memory = value;
this.memoryView.setBigInt64(0x10, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._memory = null;
this.memoryView.setBigInt64(0x10, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkSparseMemoryBind.memory': Expected 'VkDeviceMemory' but got '" + typeToString(value) + "'");
}
}
},
"memoryOffset": {
get() {
return this.memoryView.getBigUint64(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkSparseMemoryBind.memoryOffset")
this.memoryView.setBigUint64(0x18, BigInt(value), true);
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSparseMemoryBind.flags");
this.memoryView.setInt32(0x20, value, true);
}
},
});
VkSparseMemoryBind.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x28);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x28"], 0x0);
this._memory = null;
if (typeof opts === "object") {
if (opts.resourceOffset !== void 0) this.resourceOffset = opts.resourceOffset;
if (opts.size !== void 0) this.size = opts.size;
if (opts.memory !== void 0) this.memory = opts.memory;
if (opts.memoryOffset !== void 0) this.memoryOffset = opts.memoryOffset;
if (opts.flags !== void 0) this.flags = opts.flags;
}
};
VkSparseMemoryBind.prototype.flush = function flush() {
return true;
};
VkSparseMemoryBind.prototype.reflect = function reflect(memoryAddress) {
};
VkSparseMemoryBind.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSparseMemoryBind();
copy.resourceOffset = original.resourceOffset;
copy.size = original.size;
if (original.memory !== null) {
copy.memory = original.memory.constructor.createCopyFrom(original.memory);
}
copy.memoryOffset = original.memoryOffset;
copy.flags = original.flags;
return copy;
};
VkSparseMemoryBind.byteLength = 0x28;
VkSparseMemoryBind.memoryLayout = {
resourceOffset: {
byteOffset: 0x0,
byteLength: 0x8
},
size: {
byteOffset: 0x8,
byteLength: 0x8
},
memory: {
byteOffset: 0x10,
byteLength: 0x8
},
memoryOffset: {
byteOffset: 0x18,
byteLength: 0x8
},
flags: {
byteOffset: 0x20,
byteLength: 0x4
},
};
/** VkSparseImageMemoryBind **/
function VkSparseImageMemoryBind(opts, byteOffset) {
if (new.target !== VkSparseImageMemoryBind) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSparseImageMemoryBind, STRUCT_CACHE_VkSparseImageMemoryBind);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSparseImageMemoryBind, STRUCT_CACHE_VkSparseImageMemoryBind);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSparseImageMemoryBind'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x40);
} else {
this.memoryBuffer = new ArrayBuffer(0x40);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x40);
}
this._subresource = new VkImageSubresource({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
this._offset = new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0xC });
this._extent = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x18 });
this._memory = null;
if (typeof opts === "object") {
if (opts.subresource !== void 0) this.subresource = opts.subresource;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.extent !== void 0) this.extent = opts.extent;
if (opts.memory !== void 0) this.memory = opts.memory;
if (opts.memoryOffset !== void 0) this.memoryOffset = opts.memoryOffset;
if (opts.flags !== void 0) this.flags = opts.flags;
}
};
Object.defineProperties(VkSparseImageMemoryBind.prototype, {
"subresource": {
get() {
return this._subresource;
},
set(value) {
if (value !== null && value.constructor === VkImageSubresource) {
value.flush();
this._subresource = value;
} else if (value === null) {
this._subresource = null;
} else {
throw new TypeError("Invalid type for 'VkSparseImageMemoryBind.subresource': Expected 'VkImageSubresource' but got '" + typeToString(value) + "'");
}
}
},
"offset": {
get() {
return this._offset;
},
set(value) {
if (value !== null && value.constructor === VkOffset3D) {
value.flush();
this._offset = value;
} else if (value === null) {
this._offset = null;
} else {
throw new TypeError("Invalid type for 'VkSparseImageMemoryBind.offset': Expected 'VkOffset3D' but got '" + typeToString(value) + "'");
}
}
},
"extent": {
get() {
return this._extent;
},
set(value) {
if (value !== null && value.constructor === VkExtent3D) {
value.flush();
this._extent = value;
} else if (value === null) {
this._extent = null;
} else {
throw new TypeError("Invalid type for 'VkSparseImageMemoryBind.extent': Expected 'VkExtent3D' but got '" + typeToString(value) + "'");
}
}
},
"memory": {
get() {
return this._memory;
},
set(value) {
if (value !== null && value.constructor === VkDeviceMemory) {
this._memory = value;
this.memoryView.setBigInt64(0x28, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._memory = null;
this.memoryView.setBigInt64(0x28, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkSparseImageMemoryBind.memory': Expected 'VkDeviceMemory' but got '" + typeToString(value) + "'");
}
}
},
"memoryOffset": {
get() {
return this.memoryView.getBigUint64(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkSparseImageMemoryBind.memoryOffset")
this.memoryView.setBigUint64(0x30, BigInt(value), true);
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x38, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSparseImageMemoryBind.flags");
this.memoryView.setInt32(0x38, value, true);
}
},
});
VkSparseImageMemoryBind.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x40);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x40"], 0x0);
if (this._subresource !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._subresource.memoryBuffer) this._subresource = new VkImageSubresource({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
else this._subresource.reset();
}
if (this._offset !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._offset.memoryBuffer) this._offset = new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0xC });
else this._offset.reset();
}
if (this._extent !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._extent.memoryBuffer) this._extent = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x18 });
else this._extent.reset();
}
this._memory = null;
if (typeof opts === "object") {
if (opts.subresource !== void 0) this.subresource = opts.subresource;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.extent !== void 0) this.extent = opts.extent;
if (opts.memory !== void 0) this.memory = opts.memory;
if (opts.memoryOffset !== void 0) this.memoryOffset = opts.memoryOffset;
if (opts.flags !== void 0) this.flags = opts.flags;
}
};
VkSparseImageMemoryBind.prototype.flush = function flush() {
if (this._subresource !== null) {
let subresource = this._subresource;
subresource.flush();
if (this.memoryBuffer !== subresource.memoryBuffer) {
let srcView = new Uint8Array(subresource.memoryBuffer, subresource.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x0);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkSparseImageMemoryBind.subresource' isn't used as shared-memory");
}
}
if (this._offset !== null) {
let offset = this._offset;
offset.flush();
if (this.memoryBuffer !== offset.memoryBuffer) {
let srcView = new Uint8Array(offset.memoryBuffer, offset.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0xC);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkSparseImageMemoryBind.offset' isn't used as shared-memory");
}
}
if (this._extent !== null) {
let extent = this._extent;
extent.flush();
if (this.memoryBuffer !== extent.memoryBuffer) {
let srcView = new Uint8Array(extent.memoryBuffer, extent.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x18);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkSparseImageMemoryBind.extent' isn't used as shared-memory");
}
}
return true;
};
VkSparseImageMemoryBind.prototype.reflect = function reflect(memoryAddress) {
};
VkSparseImageMemoryBind.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSparseImageMemoryBind();
if (original.subresource !== null) {
copy.subresource = original.subresource.constructor.createCopyFrom(original.subresource);
}
if (original.offset !== null) {
copy.offset = original.offset.constructor.createCopyFrom(original.offset);
}
if (original.extent !== null) {
copy.extent = original.extent.constructor.createCopyFrom(original.extent);
}
if (original.memory !== null) {
copy.memory = original.memory.constructor.createCopyFrom(original.memory);
}
copy.memoryOffset = original.memoryOffset;
copy.flags = original.flags;
return copy;
};
VkSparseImageMemoryBind.byteLength = 0x40;
VkSparseImageMemoryBind.memoryLayout = {
subresource: {
byteOffset: 0x0,
byteLength: 0xC
},
offset: {
byteOffset: 0xC,
byteLength: 0xC
},
extent: {
byteOffset: 0x18,
byteLength: 0xC
},
memory: {
byteOffset: 0x28,
byteLength: 0x8
},
memoryOffset: {
byteOffset: 0x30,
byteLength: 0x8
},
flags: {
byteOffset: 0x38,
byteLength: 0x4
},
};
/** VkSparseBufferMemoryBindInfo **/
function VkSparseBufferMemoryBindInfo(opts, byteOffset) {
if (new.target !== VkSparseBufferMemoryBindInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSparseBufferMemoryBindInfo, STRUCT_CACHE_VkSparseBufferMemoryBindInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSparseBufferMemoryBindInfo, STRUCT_CACHE_VkSparseBufferMemoryBindInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSparseBufferMemoryBindInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._buffer = null;
this._pBinds = null;
this._pBindsNative = null;
if (typeof opts === "object") {
if (opts.buffer !== void 0) this.buffer = opts.buffer;
if (opts.bindCount !== void 0) this.bindCount = opts.bindCount;
if (opts.pBinds !== void 0) this.pBinds = opts.pBinds;
}
};
Object.defineProperties(VkSparseBufferMemoryBindInfo.prototype, {
"buffer": {
get() {
return this._buffer;
},
set(value) {
if (value !== null && value.constructor === VkBuffer) {
this._buffer = value;
this.memoryView.setBigInt64(0x0, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._buffer = null;
this.memoryView.setBigInt64(0x0, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkSparseBufferMemoryBindInfo.buffer': Expected 'VkBuffer' but got '" + typeToString(value) + "'");
}
}
},
"bindCount": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSparseBufferMemoryBindInfo.bindCount");
this.memoryView.setUint32(0x8, value, true);
}
},
"pBinds": {
get() {
if (this._pBinds === null && this.memoryView.getBigInt64(0x10, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x10, true);
let array = decodeNativeArrayOfObjects(addr, this.bindCount, VkSparseMemoryBind);
this._pBinds = array;
return this.pBinds;
} else {
return this._pBinds;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pBinds = value;
} else if (value === null) {
this._pBinds = null;
} else {
throw new TypeError("Invalid type for 'VkSparseBufferMemoryBindInfo.pBinds': Expected 'Array VkSparseMemoryBind' but got '" + typeToString(value) + "'");
}
}
},
});
VkSparseBufferMemoryBindInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._buffer = null;
this._pBinds = null;
this._pBindsNative = null;
if (typeof opts === "object") {
if (opts.buffer !== void 0) this.buffer = opts.buffer;
if (opts.bindCount !== void 0) this.bindCount = opts.bindCount;
if (opts.pBinds !== void 0) this.pBinds = opts.pBinds;
}
};
VkSparseBufferMemoryBindInfo.prototype.flush = function flush() {
if (this._pBinds !== null) {
let array = this._pBinds;
if (array.length !== this.bindCount) {
throw new RangeError("Invalid array length, expected length of 'bindCount' for 'VkSparseBufferMemoryBindInfo.pBinds'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSparseMemoryBind)) {
throw new TypeError("Invalid type for 'VkSparseBufferMemoryBindInfo.pBinds[" + ii + "]': Expected 'VkSparseMemoryBind' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pBindsNative = nativeArray;
this.memoryView.setBigInt64(0x10, nativeArray.address, true);
} else {
this._pBindsNative = null;
this.memoryView.setBigInt64(0x10, BI0, true);
}
}
return true;
};
VkSparseBufferMemoryBindInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkSparseBufferMemoryBindInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSparseBufferMemoryBindInfo();
if (original.buffer !== null) {
copy.buffer = original.buffer.constructor.createCopyFrom(original.buffer);
}
copy.bindCount = original.bindCount;
if (original.pBinds !== null) {
copy.pBinds = [...Array(original.pBinds.length)].map((v, i) => {
return original.pBinds[i].constructor.createCopyFrom(original.pBinds[i]);
});
}
return copy;
};
VkSparseBufferMemoryBindInfo.byteLength = 0x18;
VkSparseBufferMemoryBindInfo.memoryLayout = {
buffer: {
byteOffset: 0x0,
byteLength: 0x8
},
bindCount: {
byteOffset: 0x8,
byteLength: 0x4
},
pBinds: {
byteOffset: 0x10,
byteLength: 0x8
},
};
/** VkSparseImageOpaqueMemoryBindInfo **/
function VkSparseImageOpaqueMemoryBindInfo(opts, byteOffset) {
if (new.target !== VkSparseImageOpaqueMemoryBindInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSparseImageOpaqueMemoryBindInfo, STRUCT_CACHE_VkSparseImageOpaqueMemoryBindInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSparseImageOpaqueMemoryBindInfo, STRUCT_CACHE_VkSparseImageOpaqueMemoryBindInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSparseImageOpaqueMemoryBindInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._image = null;
this._pBinds = null;
this._pBindsNative = null;
if (typeof opts === "object") {
if (opts.image !== void 0) this.image = opts.image;
if (opts.bindCount !== void 0) this.bindCount = opts.bindCount;
if (opts.pBinds !== void 0) this.pBinds = opts.pBinds;
}
};
Object.defineProperties(VkSparseImageOpaqueMemoryBindInfo.prototype, {
"image": {
get() {
return this._image;
},
set(value) {
if (value !== null && value.constructor === VkImage) {
this._image = value;
this.memoryView.setBigInt64(0x0, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._image = null;
this.memoryView.setBigInt64(0x0, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkSparseImageOpaqueMemoryBindInfo.image': Expected 'VkImage' but got '" + typeToString(value) + "'");
}
}
},
"bindCount": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSparseImageOpaqueMemoryBindInfo.bindCount");
this.memoryView.setUint32(0x8, value, true);
}
},
"pBinds": {
get() {
if (this._pBinds === null && this.memoryView.getBigInt64(0x10, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x10, true);
let array = decodeNativeArrayOfObjects(addr, this.bindCount, VkSparseMemoryBind);
this._pBinds = array;
return this.pBinds;
} else {
return this._pBinds;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pBinds = value;
} else if (value === null) {
this._pBinds = null;
} else {
throw new TypeError("Invalid type for 'VkSparseImageOpaqueMemoryBindInfo.pBinds': Expected 'Array VkSparseMemoryBind' but got '" + typeToString(value) + "'");
}
}
},
});
VkSparseImageOpaqueMemoryBindInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._image = null;
this._pBinds = null;
this._pBindsNative = null;
if (typeof opts === "object") {
if (opts.image !== void 0) this.image = opts.image;
if (opts.bindCount !== void 0) this.bindCount = opts.bindCount;
if (opts.pBinds !== void 0) this.pBinds = opts.pBinds;
}
};
VkSparseImageOpaqueMemoryBindInfo.prototype.flush = function flush() {
if (this._pBinds !== null) {
let array = this._pBinds;
if (array.length !== this.bindCount) {
throw new RangeError("Invalid array length, expected length of 'bindCount' for 'VkSparseImageOpaqueMemoryBindInfo.pBinds'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSparseMemoryBind)) {
throw new TypeError("Invalid type for 'VkSparseImageOpaqueMemoryBindInfo.pBinds[" + ii + "]': Expected 'VkSparseMemoryBind' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pBindsNative = nativeArray;
this.memoryView.setBigInt64(0x10, nativeArray.address, true);
} else {
this._pBindsNative = null;
this.memoryView.setBigInt64(0x10, BI0, true);
}
}
return true;
};
VkSparseImageOpaqueMemoryBindInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkSparseImageOpaqueMemoryBindInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSparseImageOpaqueMemoryBindInfo();
if (original.image !== null) {
copy.image = original.image.constructor.createCopyFrom(original.image);
}
copy.bindCount = original.bindCount;
if (original.pBinds !== null) {
copy.pBinds = [...Array(original.pBinds.length)].map((v, i) => {
return original.pBinds[i].constructor.createCopyFrom(original.pBinds[i]);
});
}
return copy;
};
VkSparseImageOpaqueMemoryBindInfo.byteLength = 0x18;
VkSparseImageOpaqueMemoryBindInfo.memoryLayout = {
image: {
byteOffset: 0x0,
byteLength: 0x8
},
bindCount: {
byteOffset: 0x8,
byteLength: 0x4
},
pBinds: {
byteOffset: 0x10,
byteLength: 0x8
},
};
/** VkSparseImageMemoryBindInfo **/
function VkSparseImageMemoryBindInfo(opts, byteOffset) {
if (new.target !== VkSparseImageMemoryBindInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSparseImageMemoryBindInfo, STRUCT_CACHE_VkSparseImageMemoryBindInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSparseImageMemoryBindInfo, STRUCT_CACHE_VkSparseImageMemoryBindInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSparseImageMemoryBindInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._image = null;
this._pBinds = null;
this._pBindsNative = null;
if (typeof opts === "object") {
if (opts.image !== void 0) this.image = opts.image;
if (opts.bindCount !== void 0) this.bindCount = opts.bindCount;
if (opts.pBinds !== void 0) this.pBinds = opts.pBinds;
}
};
Object.defineProperties(VkSparseImageMemoryBindInfo.prototype, {
"image": {
get() {
return this._image;
},
set(value) {
if (value !== null && value.constructor === VkImage) {
this._image = value;
this.memoryView.setBigInt64(0x0, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._image = null;
this.memoryView.setBigInt64(0x0, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkSparseImageMemoryBindInfo.image': Expected 'VkImage' but got '" + typeToString(value) + "'");
}
}
},
"bindCount": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSparseImageMemoryBindInfo.bindCount");
this.memoryView.setUint32(0x8, value, true);
}
},
"pBinds": {
get() {
if (this._pBinds === null && this.memoryView.getBigInt64(0x10, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x10, true);
let array = decodeNativeArrayOfObjects(addr, this.bindCount, VkSparseImageMemoryBind);
this._pBinds = array;
return this.pBinds;
} else {
return this._pBinds;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pBinds = value;
} else if (value === null) {
this._pBinds = null;
} else {
throw new TypeError("Invalid type for 'VkSparseImageMemoryBindInfo.pBinds': Expected 'Array VkSparseImageMemoryBind' but got '" + typeToString(value) + "'");
}
}
},
});
VkSparseImageMemoryBindInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._image = null;
this._pBinds = null;
this._pBindsNative = null;
if (typeof opts === "object") {
if (opts.image !== void 0) this.image = opts.image;
if (opts.bindCount !== void 0) this.bindCount = opts.bindCount;
if (opts.pBinds !== void 0) this.pBinds = opts.pBinds;
}
};
VkSparseImageMemoryBindInfo.prototype.flush = function flush() {
if (this._pBinds !== null) {
let array = this._pBinds;
if (array.length !== this.bindCount) {
throw new RangeError("Invalid array length, expected length of 'bindCount' for 'VkSparseImageMemoryBindInfo.pBinds'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSparseImageMemoryBind)) {
throw new TypeError("Invalid type for 'VkSparseImageMemoryBindInfo.pBinds[" + ii + "]': Expected 'VkSparseImageMemoryBind' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pBindsNative = nativeArray;
this.memoryView.setBigInt64(0x10, nativeArray.address, true);
} else {
this._pBindsNative = null;
this.memoryView.setBigInt64(0x10, BI0, true);
}
}
return true;
};
VkSparseImageMemoryBindInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkSparseImageMemoryBindInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSparseImageMemoryBindInfo();
if (original.image !== null) {
copy.image = original.image.constructor.createCopyFrom(original.image);
}
copy.bindCount = original.bindCount;
if (original.pBinds !== null) {
copy.pBinds = [...Array(original.pBinds.length)].map((v, i) => {
return original.pBinds[i].constructor.createCopyFrom(original.pBinds[i]);
});
}
return copy;
};
VkSparseImageMemoryBindInfo.byteLength = 0x18;
VkSparseImageMemoryBindInfo.memoryLayout = {
image: {
byteOffset: 0x0,
byteLength: 0x8
},
bindCount: {
byteOffset: 0x8,
byteLength: 0x4
},
pBinds: {
byteOffset: 0x10,
byteLength: 0x8
},
};
/** VkBindSparseInfo **/
function VkBindSparseInfo(opts, byteOffset) {
if (new.target !== VkBindSparseInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkBindSparseInfo, STRUCT_CACHE_VkBindSparseInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkBindSparseInfo, STRUCT_CACHE_VkBindSparseInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkBindSparseInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x60);
} else {
this.memoryBuffer = new ArrayBuffer(0x60);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x60);
}
this._pNext = null;
this._pWaitSemaphores = null;
this._pWaitSemaphoresNative = null;
this._pBufferBinds = null;
this._pBufferBindsNative = null;
this._pImageOpaqueBinds = null;
this._pImageOpaqueBindsNative = null;
this._pImageBinds = null;
this._pImageBindsNative = null;
this._pSignalSemaphores = null;
this._pSignalSemaphoresNative = null;
this.sType = 0x7;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.waitSemaphoreCount !== void 0) this.waitSemaphoreCount = opts.waitSemaphoreCount;
if (opts.pWaitSemaphores !== void 0) this.pWaitSemaphores = opts.pWaitSemaphores;
if (opts.bufferBindCount !== void 0) this.bufferBindCount = opts.bufferBindCount;
if (opts.pBufferBinds !== void 0) this.pBufferBinds = opts.pBufferBinds;
if (opts.imageOpaqueBindCount !== void 0) this.imageOpaqueBindCount = opts.imageOpaqueBindCount;
if (opts.pImageOpaqueBinds !== void 0) this.pImageOpaqueBinds = opts.pImageOpaqueBinds;
if (opts.imageBindCount !== void 0) this.imageBindCount = opts.imageBindCount;
if (opts.pImageBinds !== void 0) this.pImageBinds = opts.pImageBinds;
if (opts.signalSemaphoreCount !== void 0) this.signalSemaphoreCount = opts.signalSemaphoreCount;
if (opts.pSignalSemaphores !== void 0) this.pSignalSemaphores = opts.pSignalSemaphores;
}
};
Object.defineProperties(VkBindSparseInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBindSparseInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkBindSparseInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkBindSparseInfo.pNext'");
switch (sType) {
case 0x3B9BB466:
case 0x3B9DF29B:
break;
default:
throw new TypeError("Invalid type for 'VkBindSparseInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkBindSparseInfo.pNext'");
}
}
},
"waitSemaphoreCount": {
get() {
return this.memoryView.getUint32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBindSparseInfo.waitSemaphoreCount");
this.memoryView.setUint32(0x10, value, true);
}
},
"pWaitSemaphores": {
get() {
if (this._pWaitSemaphores === null && this.memoryView.getBigInt64(0x18, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x18, true);
let array = decodeNativeArrayOfObjects(addr, this.waitSemaphoreCount, VkSemaphore);
this._pWaitSemaphores = array;
return this.pWaitSemaphores;
} else {
return this._pWaitSemaphores;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pWaitSemaphores = value;
} else if (value === null) {
this._pWaitSemaphores = null;
} else {
throw new TypeError("Invalid type for 'VkBindSparseInfo.pWaitSemaphores': Expected 'Array VkSemaphore' but got '" + typeToString(value) + "'");
}
}
},
"bufferBindCount": {
get() {
return this.memoryView.getUint32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBindSparseInfo.bufferBindCount");
this.memoryView.setUint32(0x20, value, true);
}
},
"pBufferBinds": {
get() {
if (this._pBufferBinds === null && this.memoryView.getBigInt64(0x28, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x28, true);
let array = decodeNativeArrayOfObjects(addr, this.bufferBindCount, VkSparseBufferMemoryBindInfo);
this._pBufferBinds = array;
return this.pBufferBinds;
} else {
return this._pBufferBinds;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pBufferBinds = value;
} else if (value === null) {
this._pBufferBinds = null;
} else {
throw new TypeError("Invalid type for 'VkBindSparseInfo.pBufferBinds': Expected 'Array VkSparseBufferMemoryBindInfo' but got '" + typeToString(value) + "'");
}
}
},
"imageOpaqueBindCount": {
get() {
return this.memoryView.getUint32(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBindSparseInfo.imageOpaqueBindCount");
this.memoryView.setUint32(0x30, value, true);
}
},
"pImageOpaqueBinds": {
get() {
if (this._pImageOpaqueBinds === null && this.memoryView.getBigInt64(0x38, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x38, true);
let array = decodeNativeArrayOfObjects(addr, this.imageOpaqueBindCount, VkSparseImageOpaqueMemoryBindInfo);
this._pImageOpaqueBinds = array;
return this.pImageOpaqueBinds;
} else {
return this._pImageOpaqueBinds;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pImageOpaqueBinds = value;
} else if (value === null) {
this._pImageOpaqueBinds = null;
} else {
throw new TypeError("Invalid type for 'VkBindSparseInfo.pImageOpaqueBinds': Expected 'Array VkSparseImageOpaqueMemoryBindInfo' but got '" + typeToString(value) + "'");
}
}
},
"imageBindCount": {
get() {
return this.memoryView.getUint32(0x40, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBindSparseInfo.imageBindCount");
this.memoryView.setUint32(0x40, value, true);
}
},
"pImageBinds": {
get() {
if (this._pImageBinds === null && this.memoryView.getBigInt64(0x48, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x48, true);
let array = decodeNativeArrayOfObjects(addr, this.imageBindCount, VkSparseImageMemoryBindInfo);
this._pImageBinds = array;
return this.pImageBinds;
} else {
return this._pImageBinds;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pImageBinds = value;
} else if (value === null) {
this._pImageBinds = null;
} else {
throw new TypeError("Invalid type for 'VkBindSparseInfo.pImageBinds': Expected 'Array VkSparseImageMemoryBindInfo' but got '" + typeToString(value) + "'");
}
}
},
"signalSemaphoreCount": {
get() {
return this.memoryView.getUint32(0x50, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBindSparseInfo.signalSemaphoreCount");
this.memoryView.setUint32(0x50, value, true);
}
},
"pSignalSemaphores": {
get() {
if (this._pSignalSemaphores === null && this.memoryView.getBigInt64(0x58, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x58, true);
let array = decodeNativeArrayOfObjects(addr, this.signalSemaphoreCount, VkSemaphore);
this._pSignalSemaphores = array;
return this.pSignalSemaphores;
} else {
return this._pSignalSemaphores;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pSignalSemaphores = value;
} else if (value === null) {
this._pSignalSemaphores = null;
} else {
throw new TypeError("Invalid type for 'VkBindSparseInfo.pSignalSemaphores': Expected 'Array VkSemaphore' but got '" + typeToString(value) + "'");
}
}
},
});
VkBindSparseInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x60);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x60"], 0x0);
this._pNext = null;
this._pWaitSemaphores = null;
this._pWaitSemaphoresNative = null;
this._pBufferBinds = null;
this._pBufferBindsNative = null;
this._pImageOpaqueBinds = null;
this._pImageOpaqueBindsNative = null;
this._pImageBinds = null;
this._pImageBindsNative = null;
this._pSignalSemaphores = null;
this._pSignalSemaphoresNative = null;
this.sType = 0x7;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.waitSemaphoreCount !== void 0) this.waitSemaphoreCount = opts.waitSemaphoreCount;
if (opts.pWaitSemaphores !== void 0) this.pWaitSemaphores = opts.pWaitSemaphores;
if (opts.bufferBindCount !== void 0) this.bufferBindCount = opts.bufferBindCount;
if (opts.pBufferBinds !== void 0) this.pBufferBinds = opts.pBufferBinds;
if (opts.imageOpaqueBindCount !== void 0) this.imageOpaqueBindCount = opts.imageOpaqueBindCount;
if (opts.pImageOpaqueBinds !== void 0) this.pImageOpaqueBinds = opts.pImageOpaqueBinds;
if (opts.imageBindCount !== void 0) this.imageBindCount = opts.imageBindCount;
if (opts.pImageBinds !== void 0) this.pImageBinds = opts.pImageBinds;
if (opts.signalSemaphoreCount !== void 0) this.signalSemaphoreCount = opts.signalSemaphoreCount;
if (opts.pSignalSemaphores !== void 0) this.pSignalSemaphores = opts.pSignalSemaphores;
}
};
VkBindSparseInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pWaitSemaphores !== null) {
let array = this._pWaitSemaphores;
if (array.length !== this.waitSemaphoreCount) {
throw new RangeError("Invalid array length, expected length of 'waitSemaphoreCount' for 'VkBindSparseInfo.pWaitSemaphores'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSemaphore)) {
throw new TypeError("Invalid type for 'VkBindSparseInfo.pWaitSemaphores[" + ii + "]': Expected 'VkSemaphore' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pWaitSemaphoresNative = nativeArray;
this.memoryView.setBigInt64(0x18, nativeArray.address, true);
} else {
this._pWaitSemaphoresNative = null;
this.memoryView.setBigInt64(0x18, BI0, true);
}
}
if (this._pBufferBinds !== null) {
let array = this._pBufferBinds;
if (array.length !== this.bufferBindCount) {
throw new RangeError("Invalid array length, expected length of 'bufferBindCount' for 'VkBindSparseInfo.pBufferBinds'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSparseBufferMemoryBindInfo)) {
throw new TypeError("Invalid type for 'VkBindSparseInfo.pBufferBinds[" + ii + "]': Expected 'VkSparseBufferMemoryBindInfo' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pBufferBindsNative = nativeArray;
this.memoryView.setBigInt64(0x28, nativeArray.address, true);
} else {
this._pBufferBindsNative = null;
this.memoryView.setBigInt64(0x28, BI0, true);
}
}
if (this._pImageOpaqueBinds !== null) {
let array = this._pImageOpaqueBinds;
if (array.length !== this.imageOpaqueBindCount) {
throw new RangeError("Invalid array length, expected length of 'imageOpaqueBindCount' for 'VkBindSparseInfo.pImageOpaqueBinds'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSparseImageOpaqueMemoryBindInfo)) {
throw new TypeError("Invalid type for 'VkBindSparseInfo.pImageOpaqueBinds[" + ii + "]': Expected 'VkSparseImageOpaqueMemoryBindInfo' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pImageOpaqueBindsNative = nativeArray;
this.memoryView.setBigInt64(0x38, nativeArray.address, true);
} else {
this._pImageOpaqueBindsNative = null;
this.memoryView.setBigInt64(0x38, BI0, true);
}
}
if (this._pImageBinds !== null) {
let array = this._pImageBinds;
if (array.length !== this.imageBindCount) {
throw new RangeError("Invalid array length, expected length of 'imageBindCount' for 'VkBindSparseInfo.pImageBinds'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSparseImageMemoryBindInfo)) {
throw new TypeError("Invalid type for 'VkBindSparseInfo.pImageBinds[" + ii + "]': Expected 'VkSparseImageMemoryBindInfo' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pImageBindsNative = nativeArray;
this.memoryView.setBigInt64(0x48, nativeArray.address, true);
} else {
this._pImageBindsNative = null;
this.memoryView.setBigInt64(0x48, BI0, true);
}
}
if (this._pSignalSemaphores !== null) {
let array = this._pSignalSemaphores;
if (array.length !== this.signalSemaphoreCount) {
throw new RangeError("Invalid array length, expected length of 'signalSemaphoreCount' for 'VkBindSparseInfo.pSignalSemaphores'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSemaphore)) {
throw new TypeError("Invalid type for 'VkBindSparseInfo.pSignalSemaphores[" + ii + "]': Expected 'VkSemaphore' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pSignalSemaphoresNative = nativeArray;
this.memoryView.setBigInt64(0x58, nativeArray.address, true);
} else {
this._pSignalSemaphoresNative = null;
this.memoryView.setBigInt64(0x58, BI0, true);
}
}
return true;
};
VkBindSparseInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkBindSparseInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkBindSparseInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.waitSemaphoreCount = original.waitSemaphoreCount;
if (original.pWaitSemaphores !== null) {
copy.pWaitSemaphores = [...Array(original.pWaitSemaphores.length)].map((v, i) => {
return original.pWaitSemaphores[i].constructor.createCopyFrom(original.pWaitSemaphores[i]);
});
}
copy.bufferBindCount = original.bufferBindCount;
if (original.pBufferBinds !== null) {
copy.pBufferBinds = [...Array(original.pBufferBinds.length)].map((v, i) => {
return original.pBufferBinds[i].constructor.createCopyFrom(original.pBufferBinds[i]);
});
}
copy.imageOpaqueBindCount = original.imageOpaqueBindCount;
if (original.pImageOpaqueBinds !== null) {
copy.pImageOpaqueBinds = [...Array(original.pImageOpaqueBinds.length)].map((v, i) => {
return original.pImageOpaqueBinds[i].constructor.createCopyFrom(original.pImageOpaqueBinds[i]);
});
}
copy.imageBindCount = original.imageBindCount;
if (original.pImageBinds !== null) {
copy.pImageBinds = [...Array(original.pImageBinds.length)].map((v, i) => {
return original.pImageBinds[i].constructor.createCopyFrom(original.pImageBinds[i]);
});
}
copy.signalSemaphoreCount = original.signalSemaphoreCount;
if (original.pSignalSemaphores !== null) {
copy.pSignalSemaphores = [...Array(original.pSignalSemaphores.length)].map((v, i) => {
return original.pSignalSemaphores[i].constructor.createCopyFrom(original.pSignalSemaphores[i]);
});
}
return copy;
};
VkBindSparseInfo.byteLength = 0x60;
VkBindSparseInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
waitSemaphoreCount: {
byteOffset: 0x10,
byteLength: 0x4
},
pWaitSemaphores: {
byteOffset: 0x18,
byteLength: 0x8
},
bufferBindCount: {
byteOffset: 0x20,
byteLength: 0x4
},
pBufferBinds: {
byteOffset: 0x28,
byteLength: 0x8
},
imageOpaqueBindCount: {
byteOffset: 0x30,
byteLength: 0x4
},
pImageOpaqueBinds: {
byteOffset: 0x38,
byteLength: 0x8
},
imageBindCount: {
byteOffset: 0x40,
byteLength: 0x4
},
pImageBinds: {
byteOffset: 0x48,
byteLength: 0x8
},
signalSemaphoreCount: {
byteOffset: 0x50,
byteLength: 0x4
},
pSignalSemaphores: {
byteOffset: 0x58,
byteLength: 0x8
},
};
/** VkImageCopy **/
function VkImageCopy(opts, byteOffset) {
if (new.target !== VkImageCopy) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkImageCopy, STRUCT_CACHE_VkImageCopy);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkImageCopy, STRUCT_CACHE_VkImageCopy);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkImageCopy'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x44);
} else {
this.memoryBuffer = new ArrayBuffer(0x44);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x44);
}
this._srcSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
this._srcOffset = new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x10 });
this._dstSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x1C });
this._dstOffset = new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x2C });
this._extent = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x38 });
if (typeof opts === "object") {
if (opts.srcSubresource !== void 0) this.srcSubresource = opts.srcSubresource;
if (opts.srcOffset !== void 0) this.srcOffset = opts.srcOffset;
if (opts.dstSubresource !== void 0) this.dstSubresource = opts.dstSubresource;
if (opts.dstOffset !== void 0) this.dstOffset = opts.dstOffset;
if (opts.extent !== void 0) this.extent = opts.extent;
}
};
Object.defineProperties(VkImageCopy.prototype, {
"srcSubresource": {
get() {
return this._srcSubresource;
},
set(value) {
if (value !== null && value.constructor === VkImageSubresourceLayers) {
value.flush();
this._srcSubresource = value;
} else if (value === null) {
this._srcSubresource = null;
} else {
throw new TypeError("Invalid type for 'VkImageCopy.srcSubresource': Expected 'VkImageSubresourceLayers' but got '" + typeToString(value) + "'");
}
}
},
"srcOffset": {
get() {
return this._srcOffset;
},
set(value) {
if (value !== null && value.constructor === VkOffset3D) {
value.flush();
this._srcOffset = value;
} else if (value === null) {
this._srcOffset = null;
} else {
throw new TypeError("Invalid type for 'VkImageCopy.srcOffset': Expected 'VkOffset3D' but got '" + typeToString(value) + "'");
}
}
},
"dstSubresource": {
get() {
return this._dstSubresource;
},
set(value) {
if (value !== null && value.constructor === VkImageSubresourceLayers) {
value.flush();
this._dstSubresource = value;
} else if (value === null) {
this._dstSubresource = null;
} else {
throw new TypeError("Invalid type for 'VkImageCopy.dstSubresource': Expected 'VkImageSubresourceLayers' but got '" + typeToString(value) + "'");
}
}
},
"dstOffset": {
get() {
return this._dstOffset;
},
set(value) {
if (value !== null && value.constructor === VkOffset3D) {
value.flush();
this._dstOffset = value;
} else if (value === null) {
this._dstOffset = null;
} else {
throw new TypeError("Invalid type for 'VkImageCopy.dstOffset': Expected 'VkOffset3D' but got '" + typeToString(value) + "'");
}
}
},
"extent": {
get() {
return this._extent;
},
set(value) {
if (value !== null && value.constructor === VkExtent3D) {
value.flush();
this._extent = value;
} else if (value === null) {
this._extent = null;
} else {
throw new TypeError("Invalid type for 'VkImageCopy.extent': Expected 'VkExtent3D' but got '" + typeToString(value) + "'");
}
}
},
});
VkImageCopy.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x44);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x44"], 0x0);
if (this._srcSubresource !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._srcSubresource.memoryBuffer) this._srcSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
else this._srcSubresource.reset();
}
if (this._srcOffset !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._srcOffset.memoryBuffer) this._srcOffset = new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x10 });
else this._srcOffset.reset();
}
if (this._dstSubresource !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._dstSubresource.memoryBuffer) this._dstSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x1C });
else this._dstSubresource.reset();
}
if (this._dstOffset !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._dstOffset.memoryBuffer) this._dstOffset = new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x2C });
else this._dstOffset.reset();
}
if (this._extent !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._extent.memoryBuffer) this._extent = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x38 });
else this._extent.reset();
}
if (typeof opts === "object") {
if (opts.srcSubresource !== void 0) this.srcSubresource = opts.srcSubresource;
if (opts.srcOffset !== void 0) this.srcOffset = opts.srcOffset;
if (opts.dstSubresource !== void 0) this.dstSubresource = opts.dstSubresource;
if (opts.dstOffset !== void 0) this.dstOffset = opts.dstOffset;
if (opts.extent !== void 0) this.extent = opts.extent;
}
};
VkImageCopy.prototype.flush = function flush() {
if (this._srcSubresource !== null) {
let srcSubresource = this._srcSubresource;
srcSubresource.flush();
if (this.memoryBuffer !== srcSubresource.memoryBuffer) {
let srcView = new Uint8Array(srcSubresource.memoryBuffer, srcSubresource.$memoryOffset, 0x10);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x0);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageCopy.srcSubresource' isn't used as shared-memory");
}
}
if (this._srcOffset !== null) {
let srcOffset = this._srcOffset;
srcOffset.flush();
if (this.memoryBuffer !== srcOffset.memoryBuffer) {
let srcView = new Uint8Array(srcOffset.memoryBuffer, srcOffset.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x10);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageCopy.srcOffset' isn't used as shared-memory");
}
}
if (this._dstSubresource !== null) {
let dstSubresource = this._dstSubresource;
dstSubresource.flush();
if (this.memoryBuffer !== dstSubresource.memoryBuffer) {
let srcView = new Uint8Array(dstSubresource.memoryBuffer, dstSubresource.$memoryOffset, 0x10);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x1C);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageCopy.dstSubresource' isn't used as shared-memory");
}
}
if (this._dstOffset !== null) {
let dstOffset = this._dstOffset;
dstOffset.flush();
if (this.memoryBuffer !== dstOffset.memoryBuffer) {
let srcView = new Uint8Array(dstOffset.memoryBuffer, dstOffset.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x2C);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageCopy.dstOffset' isn't used as shared-memory");
}
}
if (this._extent !== null) {
let extent = this._extent;
extent.flush();
if (this.memoryBuffer !== extent.memoryBuffer) {
let srcView = new Uint8Array(extent.memoryBuffer, extent.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x38);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageCopy.extent' isn't used as shared-memory");
}
}
return true;
};
VkImageCopy.prototype.reflect = function reflect(memoryAddress) {
};
VkImageCopy.createCopyFrom = function createCopyFrom(original) {
let copy = new VkImageCopy();
if (original.srcSubresource !== null) {
copy.srcSubresource = original.srcSubresource.constructor.createCopyFrom(original.srcSubresource);
}
if (original.srcOffset !== null) {
copy.srcOffset = original.srcOffset.constructor.createCopyFrom(original.srcOffset);
}
if (original.dstSubresource !== null) {
copy.dstSubresource = original.dstSubresource.constructor.createCopyFrom(original.dstSubresource);
}
if (original.dstOffset !== null) {
copy.dstOffset = original.dstOffset.constructor.createCopyFrom(original.dstOffset);
}
if (original.extent !== null) {
copy.extent = original.extent.constructor.createCopyFrom(original.extent);
}
return copy;
};
VkImageCopy.byteLength = 0x44;
VkImageCopy.memoryLayout = {
srcSubresource: {
byteOffset: 0x0,
byteLength: 0x10
},
srcOffset: {
byteOffset: 0x10,
byteLength: 0xC
},
dstSubresource: {
byteOffset: 0x1C,
byteLength: 0x10
},
dstOffset: {
byteOffset: 0x2C,
byteLength: 0xC
},
extent: {
byteOffset: 0x38,
byteLength: 0xC
},
};
/** VkImageBlit **/
function VkImageBlit(opts, byteOffset) {
if (new.target !== VkImageBlit) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkImageBlit, STRUCT_CACHE_VkImageBlit);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkImageBlit, STRUCT_CACHE_VkImageBlit);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkImageBlit'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x50);
} else {
this.memoryBuffer = new ArrayBuffer(0x50);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x50);
}
this._srcSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
this._srcOffsets = [...Array(2)].map((v, i) => new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x10 + (i * 0xC) }));
this._dstSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x28 });
this._dstOffsets = [...Array(2)].map((v, i) => new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x38 + (i * 0xC) }));
if (typeof opts === "object") {
if (opts.srcSubresource !== void 0) this.srcSubresource = opts.srcSubresource;
if (opts.srcOffsets !== void 0) this.srcOffsets = opts.srcOffsets;
if (opts.dstSubresource !== void 0) this.dstSubresource = opts.dstSubresource;
if (opts.dstOffsets !== void 0) this.dstOffsets = opts.dstOffsets;
}
};
Object.defineProperties(VkImageBlit.prototype, {
"srcSubresource": {
get() {
return this._srcSubresource;
},
set(value) {
if (value !== null && value.constructor === VkImageSubresourceLayers) {
value.flush();
this._srcSubresource = value;
} else if (value === null) {
this._srcSubresource = null;
} else {
throw new TypeError("Invalid type for 'VkImageBlit.srcSubresource': Expected 'VkImageSubresourceLayers' but got '" + typeToString(value) + "'");
}
}
},
"srcOffsets": {
get() {
return this._srcOffsets;
},
set(value) {
if (value !== null && value.constructor === Array) {
this._srcOffsets = value;
} else if (value === null) {
this._srcOffsets = null;
} else {
throw new TypeError("Invalid type for 'VkImageBlit.srcOffsets': Expected 'Array VkOffset3D' but got '" + typeToString(value) + "'");
}
}
},
"dstSubresource": {
get() {
return this._dstSubresource;
},
set(value) {
if (value !== null && value.constructor === VkImageSubresourceLayers) {
value.flush();
this._dstSubresource = value;
} else if (value === null) {
this._dstSubresource = null;
} else {
throw new TypeError("Invalid type for 'VkImageBlit.dstSubresource': Expected 'VkImageSubresourceLayers' but got '" + typeToString(value) + "'");
}
}
},
"dstOffsets": {
get() {
return this._dstOffsets;
},
set(value) {
if (value !== null && value.constructor === Array) {
this._dstOffsets = value;
} else if (value === null) {
this._dstOffsets = null;
} else {
throw new TypeError("Invalid type for 'VkImageBlit.dstOffsets': Expected 'Array VkOffset3D' but got '" + typeToString(value) + "'");
}
}
},
});
VkImageBlit.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x50);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x50"], 0x0);
if (this._srcSubresource !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._srcSubresource.memoryBuffer) this._srcSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
else this._srcSubresource.reset();
}
if (this._srcOffsets !== null) {
let array = this._srcOffsets;
for (let ii = 0; ii < array.length; ++ii) {
array[ii].reset();
};
}
if (this._dstSubresource !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._dstSubresource.memoryBuffer) this._dstSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x28 });
else this._dstSubresource.reset();
}
if (this._dstOffsets !== null) {
let array = this._dstOffsets;
for (let ii = 0; ii < array.length; ++ii) {
array[ii].reset();
};
}
if (typeof opts === "object") {
if (opts.srcSubresource !== void 0) this.srcSubresource = opts.srcSubresource;
if (opts.srcOffsets !== void 0) this.srcOffsets = opts.srcOffsets;
if (opts.dstSubresource !== void 0) this.dstSubresource = opts.dstSubresource;
if (opts.dstOffsets !== void 0) this.dstOffsets = opts.dstOffsets;
}
};
VkImageBlit.prototype.flush = function flush() {
if (this._srcSubresource !== null) {
let srcSubresource = this._srcSubresource;
srcSubresource.flush();
if (this.memoryBuffer !== srcSubresource.memoryBuffer) {
let srcView = new Uint8Array(srcSubresource.memoryBuffer, srcSubresource.$memoryOffset, 0x10);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x0);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageBlit.srcSubresource' isn't used as shared-memory");
}
}
if (this._srcOffsets !== null) {
let array = this._srcOffsets;
if (array.length !== 2) {
throw new RangeError("Invalid array length, expected length of '2' for 'VkImageBlit.srcOffsets'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkOffset3D)) {
throw new TypeError("Invalid type for 'VkImageBlit.srcOffsets[" + ii + "]': Expected 'VkOffset3D' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
let dstView = new Uint8Array(this.memoryBuffer);
let byteOffset = 0x10;
for (let ii = 0; ii < array.length; ++ii) {
let srcView = new Uint8Array(array[ii].memoryBuffer);
dstView.set(srcView, byteOffset);
byteOffset += VkOffset3D.byteLength;
};
}
if (this._dstSubresource !== null) {
let dstSubresource = this._dstSubresource;
dstSubresource.flush();
if (this.memoryBuffer !== dstSubresource.memoryBuffer) {
let srcView = new Uint8Array(dstSubresource.memoryBuffer, dstSubresource.$memoryOffset, 0x10);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x28);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageBlit.dstSubresource' isn't used as shared-memory");
}
}
if (this._dstOffsets !== null) {
let array = this._dstOffsets;
if (array.length !== 2) {
throw new RangeError("Invalid array length, expected length of '2' for 'VkImageBlit.dstOffsets'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkOffset3D)) {
throw new TypeError("Invalid type for 'VkImageBlit.dstOffsets[" + ii + "]': Expected 'VkOffset3D' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
let dstView = new Uint8Array(this.memoryBuffer);
let byteOffset = 0x38;
for (let ii = 0; ii < array.length; ++ii) {
let srcView = new Uint8Array(array[ii].memoryBuffer);
dstView.set(srcView, byteOffset);
byteOffset += VkOffset3D.byteLength;
};
}
return true;
};
VkImageBlit.prototype.reflect = function reflect(memoryAddress) {
};
VkImageBlit.createCopyFrom = function createCopyFrom(original) {
let copy = new VkImageBlit();
if (original.srcSubresource !== null) {
copy.srcSubresource = original.srcSubresource.constructor.createCopyFrom(original.srcSubresource);
}
if (original.srcOffsets !== null) {
copy.srcOffsets = [...Array(original.srcOffsets.length)].map((v, i) => {
return original.srcOffsets[i].constructor.createCopyFrom(original.srcOffsets[i]);
});
}
if (original.dstSubresource !== null) {
copy.dstSubresource = original.dstSubresource.constructor.createCopyFrom(original.dstSubresource);
}
if (original.dstOffsets !== null) {
copy.dstOffsets = [...Array(original.dstOffsets.length)].map((v, i) => {
return original.dstOffsets[i].constructor.createCopyFrom(original.dstOffsets[i]);
});
}
return copy;
};
VkImageBlit.byteLength = 0x50;
VkImageBlit.memoryLayout = {
srcSubresource: {
byteOffset: 0x0,
byteLength: 0x10
},
srcOffsets: {
byteOffset: 0x10,
byteLength: 0x18
},
dstSubresource: {
byteOffset: 0x28,
byteLength: 0x10
},
dstOffsets: {
byteOffset: 0x38,
byteLength: 0x18
},
};
/** VkBufferImageCopy **/
function VkBufferImageCopy(opts, byteOffset) {
if (new.target !== VkBufferImageCopy) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkBufferImageCopy, STRUCT_CACHE_VkBufferImageCopy);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkBufferImageCopy, STRUCT_CACHE_VkBufferImageCopy);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkBufferImageCopy'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x38);
} else {
this.memoryBuffer = new ArrayBuffer(0x38);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x38);
}
this._imageSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x10 });
this._imageOffset = new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x20 });
this._imageExtent = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x2C });
if (typeof opts === "object") {
if (opts.bufferOffset !== void 0) this.bufferOffset = opts.bufferOffset;
if (opts.bufferRowLength !== void 0) this.bufferRowLength = opts.bufferRowLength;
if (opts.bufferImageHeight !== void 0) this.bufferImageHeight = opts.bufferImageHeight;
if (opts.imageSubresource !== void 0) this.imageSubresource = opts.imageSubresource;
if (opts.imageOffset !== void 0) this.imageOffset = opts.imageOffset;
if (opts.imageExtent !== void 0) this.imageExtent = opts.imageExtent;
}
};
Object.defineProperties(VkBufferImageCopy.prototype, {
"bufferOffset": {
get() {
return this.memoryView.getBigUint64(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkBufferImageCopy.bufferOffset")
this.memoryView.setBigUint64(0x0, BigInt(value), true);
}
},
"bufferRowLength": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferImageCopy.bufferRowLength");
this.memoryView.setUint32(0x8, value, true);
}
},
"bufferImageHeight": {
get() {
return this.memoryView.getUint32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkBufferImageCopy.bufferImageHeight");
this.memoryView.setUint32(0xC, value, true);
}
},
"imageSubresource": {
get() {
return this._imageSubresource;
},
set(value) {
if (value !== null && value.constructor === VkImageSubresourceLayers) {
value.flush();
this._imageSubresource = value;
} else if (value === null) {
this._imageSubresource = null;
} else {
throw new TypeError("Invalid type for 'VkBufferImageCopy.imageSubresource': Expected 'VkImageSubresourceLayers' but got '" + typeToString(value) + "'");
}
}
},
"imageOffset": {
get() {
return this._imageOffset;
},
set(value) {
if (value !== null && value.constructor === VkOffset3D) {
value.flush();
this._imageOffset = value;
} else if (value === null) {
this._imageOffset = null;
} else {
throw new TypeError("Invalid type for 'VkBufferImageCopy.imageOffset': Expected 'VkOffset3D' but got '" + typeToString(value) + "'");
}
}
},
"imageExtent": {
get() {
return this._imageExtent;
},
set(value) {
if (value !== null && value.constructor === VkExtent3D) {
value.flush();
this._imageExtent = value;
} else if (value === null) {
this._imageExtent = null;
} else {
throw new TypeError("Invalid type for 'VkBufferImageCopy.imageExtent': Expected 'VkExtent3D' but got '" + typeToString(value) + "'");
}
}
},
});
VkBufferImageCopy.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x38);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x38"], 0x0);
if (this._imageSubresource !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._imageSubresource.memoryBuffer) this._imageSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x10 });
else this._imageSubresource.reset();
}
if (this._imageOffset !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._imageOffset.memoryBuffer) this._imageOffset = new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x20 });
else this._imageOffset.reset();
}
if (this._imageExtent !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._imageExtent.memoryBuffer) this._imageExtent = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x2C });
else this._imageExtent.reset();
}
if (typeof opts === "object") {
if (opts.bufferOffset !== void 0) this.bufferOffset = opts.bufferOffset;
if (opts.bufferRowLength !== void 0) this.bufferRowLength = opts.bufferRowLength;
if (opts.bufferImageHeight !== void 0) this.bufferImageHeight = opts.bufferImageHeight;
if (opts.imageSubresource !== void 0) this.imageSubresource = opts.imageSubresource;
if (opts.imageOffset !== void 0) this.imageOffset = opts.imageOffset;
if (opts.imageExtent !== void 0) this.imageExtent = opts.imageExtent;
}
};
VkBufferImageCopy.prototype.flush = function flush() {
if (this._imageSubresource !== null) {
let imageSubresource = this._imageSubresource;
imageSubresource.flush();
if (this.memoryBuffer !== imageSubresource.memoryBuffer) {
let srcView = new Uint8Array(imageSubresource.memoryBuffer, imageSubresource.$memoryOffset, 0x10);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x10);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkBufferImageCopy.imageSubresource' isn't used as shared-memory");
}
}
if (this._imageOffset !== null) {
let imageOffset = this._imageOffset;
imageOffset.flush();
if (this.memoryBuffer !== imageOffset.memoryBuffer) {
let srcView = new Uint8Array(imageOffset.memoryBuffer, imageOffset.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x20);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkBufferImageCopy.imageOffset' isn't used as shared-memory");
}
}
if (this._imageExtent !== null) {
let imageExtent = this._imageExtent;
imageExtent.flush();
if (this.memoryBuffer !== imageExtent.memoryBuffer) {
let srcView = new Uint8Array(imageExtent.memoryBuffer, imageExtent.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x2C);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkBufferImageCopy.imageExtent' isn't used as shared-memory");
}
}
return true;
};
VkBufferImageCopy.prototype.reflect = function reflect(memoryAddress) {
};
VkBufferImageCopy.createCopyFrom = function createCopyFrom(original) {
let copy = new VkBufferImageCopy();
copy.bufferOffset = original.bufferOffset;
copy.bufferRowLength = original.bufferRowLength;
copy.bufferImageHeight = original.bufferImageHeight;
if (original.imageSubresource !== null) {
copy.imageSubresource = original.imageSubresource.constructor.createCopyFrom(original.imageSubresource);
}
if (original.imageOffset !== null) {
copy.imageOffset = original.imageOffset.constructor.createCopyFrom(original.imageOffset);
}
if (original.imageExtent !== null) {
copy.imageExtent = original.imageExtent.constructor.createCopyFrom(original.imageExtent);
}
return copy;
};
VkBufferImageCopy.byteLength = 0x38;
VkBufferImageCopy.memoryLayout = {
bufferOffset: {
byteOffset: 0x0,
byteLength: 0x8
},
bufferRowLength: {
byteOffset: 0x8,
byteLength: 0x4
},
bufferImageHeight: {
byteOffset: 0xC,
byteLength: 0x4
},
imageSubresource: {
byteOffset: 0x10,
byteLength: 0x10
},
imageOffset: {
byteOffset: 0x20,
byteLength: 0xC
},
imageExtent: {
byteOffset: 0x2C,
byteLength: 0xC
},
};
/** VkImageResolve **/
function VkImageResolve(opts, byteOffset) {
if (new.target !== VkImageResolve) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkImageResolve, STRUCT_CACHE_VkImageResolve);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkImageResolve, STRUCT_CACHE_VkImageResolve);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkImageResolve'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x44);
} else {
this.memoryBuffer = new ArrayBuffer(0x44);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x44);
}
this._srcSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
this._srcOffset = new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x10 });
this._dstSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x1C });
this._dstOffset = new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x2C });
this._extent = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x38 });
if (typeof opts === "object") {
if (opts.srcSubresource !== void 0) this.srcSubresource = opts.srcSubresource;
if (opts.srcOffset !== void 0) this.srcOffset = opts.srcOffset;
if (opts.dstSubresource !== void 0) this.dstSubresource = opts.dstSubresource;
if (opts.dstOffset !== void 0) this.dstOffset = opts.dstOffset;
if (opts.extent !== void 0) this.extent = opts.extent;
}
};
Object.defineProperties(VkImageResolve.prototype, {
"srcSubresource": {
get() {
return this._srcSubresource;
},
set(value) {
if (value !== null && value.constructor === VkImageSubresourceLayers) {
value.flush();
this._srcSubresource = value;
} else if (value === null) {
this._srcSubresource = null;
} else {
throw new TypeError("Invalid type for 'VkImageResolve.srcSubresource': Expected 'VkImageSubresourceLayers' but got '" + typeToString(value) + "'");
}
}
},
"srcOffset": {
get() {
return this._srcOffset;
},
set(value) {
if (value !== null && value.constructor === VkOffset3D) {
value.flush();
this._srcOffset = value;
} else if (value === null) {
this._srcOffset = null;
} else {
throw new TypeError("Invalid type for 'VkImageResolve.srcOffset': Expected 'VkOffset3D' but got '" + typeToString(value) + "'");
}
}
},
"dstSubresource": {
get() {
return this._dstSubresource;
},
set(value) {
if (value !== null && value.constructor === VkImageSubresourceLayers) {
value.flush();
this._dstSubresource = value;
} else if (value === null) {
this._dstSubresource = null;
} else {
throw new TypeError("Invalid type for 'VkImageResolve.dstSubresource': Expected 'VkImageSubresourceLayers' but got '" + typeToString(value) + "'");
}
}
},
"dstOffset": {
get() {
return this._dstOffset;
},
set(value) {
if (value !== null && value.constructor === VkOffset3D) {
value.flush();
this._dstOffset = value;
} else if (value === null) {
this._dstOffset = null;
} else {
throw new TypeError("Invalid type for 'VkImageResolve.dstOffset': Expected 'VkOffset3D' but got '" + typeToString(value) + "'");
}
}
},
"extent": {
get() {
return this._extent;
},
set(value) {
if (value !== null && value.constructor === VkExtent3D) {
value.flush();
this._extent = value;
} else if (value === null) {
this._extent = null;
} else {
throw new TypeError("Invalid type for 'VkImageResolve.extent': Expected 'VkExtent3D' but got '" + typeToString(value) + "'");
}
}
},
});
VkImageResolve.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x44);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x44"], 0x0);
if (this._srcSubresource !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._srcSubresource.memoryBuffer) this._srcSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
else this._srcSubresource.reset();
}
if (this._srcOffset !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._srcOffset.memoryBuffer) this._srcOffset = new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x10 });
else this._srcOffset.reset();
}
if (this._dstSubresource !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._dstSubresource.memoryBuffer) this._dstSubresource = new VkImageSubresourceLayers({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x1C });
else this._dstSubresource.reset();
}
if (this._dstOffset !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._dstOffset.memoryBuffer) this._dstOffset = new VkOffset3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x2C });
else this._dstOffset.reset();
}
if (this._extent !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._extent.memoryBuffer) this._extent = new VkExtent3D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x38 });
else this._extent.reset();
}
if (typeof opts === "object") {
if (opts.srcSubresource !== void 0) this.srcSubresource = opts.srcSubresource;
if (opts.srcOffset !== void 0) this.srcOffset = opts.srcOffset;
if (opts.dstSubresource !== void 0) this.dstSubresource = opts.dstSubresource;
if (opts.dstOffset !== void 0) this.dstOffset = opts.dstOffset;
if (opts.extent !== void 0) this.extent = opts.extent;
}
};
VkImageResolve.prototype.flush = function flush() {
if (this._srcSubresource !== null) {
let srcSubresource = this._srcSubresource;
srcSubresource.flush();
if (this.memoryBuffer !== srcSubresource.memoryBuffer) {
let srcView = new Uint8Array(srcSubresource.memoryBuffer, srcSubresource.$memoryOffset, 0x10);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x0);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageResolve.srcSubresource' isn't used as shared-memory");
}
}
if (this._srcOffset !== null) {
let srcOffset = this._srcOffset;
srcOffset.flush();
if (this.memoryBuffer !== srcOffset.memoryBuffer) {
let srcView = new Uint8Array(srcOffset.memoryBuffer, srcOffset.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x10);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageResolve.srcOffset' isn't used as shared-memory");
}
}
if (this._dstSubresource !== null) {
let dstSubresource = this._dstSubresource;
dstSubresource.flush();
if (this.memoryBuffer !== dstSubresource.memoryBuffer) {
let srcView = new Uint8Array(dstSubresource.memoryBuffer, dstSubresource.$memoryOffset, 0x10);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x1C);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageResolve.dstSubresource' isn't used as shared-memory");
}
}
if (this._dstOffset !== null) {
let dstOffset = this._dstOffset;
dstOffset.flush();
if (this.memoryBuffer !== dstOffset.memoryBuffer) {
let srcView = new Uint8Array(dstOffset.memoryBuffer, dstOffset.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x2C);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageResolve.dstOffset' isn't used as shared-memory");
}
}
if (this._extent !== null) {
let extent = this._extent;
extent.flush();
if (this.memoryBuffer !== extent.memoryBuffer) {
let srcView = new Uint8Array(extent.memoryBuffer, extent.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x38);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkImageResolve.extent' isn't used as shared-memory");
}
}
return true;
};
VkImageResolve.prototype.reflect = function reflect(memoryAddress) {
};
VkImageResolve.createCopyFrom = function createCopyFrom(original) {
let copy = new VkImageResolve();
if (original.srcSubresource !== null) {
copy.srcSubresource = original.srcSubresource.constructor.createCopyFrom(original.srcSubresource);
}
if (original.srcOffset !== null) {
copy.srcOffset = original.srcOffset.constructor.createCopyFrom(original.srcOffset);
}
if (original.dstSubresource !== null) {
copy.dstSubresource = original.dstSubresource.constructor.createCopyFrom(original.dstSubresource);
}
if (original.dstOffset !== null) {
copy.dstOffset = original.dstOffset.constructor.createCopyFrom(original.dstOffset);
}
if (original.extent !== null) {
copy.extent = original.extent.constructor.createCopyFrom(original.extent);
}
return copy;
};
VkImageResolve.byteLength = 0x44;
VkImageResolve.memoryLayout = {
srcSubresource: {
byteOffset: 0x0,
byteLength: 0x10
},
srcOffset: {
byteOffset: 0x10,
byteLength: 0xC
},
dstSubresource: {
byteOffset: 0x1C,
byteLength: 0x10
},
dstOffset: {
byteOffset: 0x2C,
byteLength: 0xC
},
extent: {
byteOffset: 0x38,
byteLength: 0xC
},
};
/** VkShaderModuleCreateInfo **/
function VkShaderModuleCreateInfo(opts, byteOffset) {
if (new.target !== VkShaderModuleCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkShaderModuleCreateInfo, STRUCT_CACHE_VkShaderModuleCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkShaderModuleCreateInfo, STRUCT_CACHE_VkShaderModuleCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkShaderModuleCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x28);
} else {
this.memoryBuffer = new ArrayBuffer(0x28);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x28);
}
this._pNext = null;
this._pCode = null;
this.sType = 0x10;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.codeSize !== void 0) this.codeSize = opts.codeSize;
if (opts.pCode !== void 0) this.pCode = opts.pCode;
}
};
Object.defineProperties(VkShaderModuleCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkShaderModuleCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkShaderModuleCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkShaderModuleCreateInfo.pNext'");
switch (sType) {
case 0x3B9D3B01:
break;
default:
throw new TypeError("Invalid type for 'VkShaderModuleCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkShaderModuleCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkShaderModuleCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"codeSize": {
get() {
return this.memoryView.getBigInt64(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkShaderModuleCreateInfo.codeSize")
this.memoryView.setBigInt64(0x18, BigInt(value), true);
}
},
"pCode": {
get() {
return this._pCode;
},
set(value) {
if (value !== null && value.constructor === Uint8Array) {
this._pCode = value;
this.memoryView.setBigInt64(0x20, getAddressFromArrayBuffer(value.buffer), true);
} else if (value === null) {
this._pCode = null;
this.memoryView.setBigInt64(0x20, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkShaderModuleCreateInfo.pCode': Expected 'Uint8Array' but got '" + typeToString(value) + "'");
}
}
},
});
VkShaderModuleCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x28);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x28"], 0x0);
this._pNext = null;
this._pCode = null;
this.sType = 0x10;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.codeSize !== void 0) this.codeSize = opts.codeSize;
if (opts.pCode !== void 0) this.pCode = opts.pCode;
}
};
VkShaderModuleCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkShaderModuleCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkShaderModuleCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkShaderModuleCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.codeSize = original.codeSize;
if (original.pCode !== null) {
copy.pCode = new Uint8Array(original.pCode);
}
return copy;
};
VkShaderModuleCreateInfo.byteLength = 0x28;
VkShaderModuleCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
codeSize: {
byteOffset: 0x18,
byteLength: 0x8
},
pCode: {
byteOffset: 0x20,
byteLength: 0x8
},
};
/** VkDescriptorSetLayoutBinding **/
function VkDescriptorSetLayoutBinding(opts, byteOffset) {
if (new.target !== VkDescriptorSetLayoutBinding) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDescriptorSetLayoutBinding, STRUCT_CACHE_VkDescriptorSetLayoutBinding);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDescriptorSetLayoutBinding, STRUCT_CACHE_VkDescriptorSetLayoutBinding);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDescriptorSetLayoutBinding'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._pImmutableSamplers = null;
this._pImmutableSamplersNative = null;
if (typeof opts === "object") {
if (opts.binding !== void 0) this.binding = opts.binding;
if (opts.descriptorType !== void 0) this.descriptorType = opts.descriptorType;
if (opts.descriptorCount !== void 0) this.descriptorCount = opts.descriptorCount;
if (opts.stageFlags !== void 0) this.stageFlags = opts.stageFlags;
if (opts.pImmutableSamplers !== void 0) this.pImmutableSamplers = opts.pImmutableSamplers;
}
};
Object.defineProperties(VkDescriptorSetLayoutBinding.prototype, {
"binding": {
get() {
return this.memoryView.getUint32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorSetLayoutBinding.binding");
this.memoryView.setUint32(0x0, value, true);
}
},
"descriptorType": {
get() {
return this.memoryView.getInt32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorSetLayoutBinding.descriptorType");
if (!$VAL_R_VkDescriptorType(value)) {
throw new RangeError("Invalid value for 'VkDescriptorSetLayoutBinding.descriptorType': '" + value + "' is not a value of 'VkDescriptorType'");
}
this.memoryView.setInt32(0x4, value, true);
}
},
"descriptorCount": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorSetLayoutBinding.descriptorCount");
this.memoryView.setUint32(0x8, value, true);
}
},
"stageFlags": {
get() {
return this.memoryView.getInt32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorSetLayoutBinding.stageFlags");
this.memoryView.setInt32(0xC, value, true);
}
},
"pImmutableSamplers": {
get() {
if (this._pImmutableSamplers === null && this.memoryView.getBigInt64(0x10, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x10, true);
let array = decodeNativeArrayOfObjects(addr, this.descriptorCount, VkSampler);
this._pImmutableSamplers = array;
return this.pImmutableSamplers;
} else {
return this._pImmutableSamplers;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pImmutableSamplers = value;
} else if (value === null) {
this._pImmutableSamplers = null;
} else {
throw new TypeError("Invalid type for 'VkDescriptorSetLayoutBinding.pImmutableSamplers': Expected 'Array VkSampler' but got '" + typeToString(value) + "'");
}
}
},
});
VkDescriptorSetLayoutBinding.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._pImmutableSamplers = null;
this._pImmutableSamplersNative = null;
if (typeof opts === "object") {
if (opts.binding !== void 0) this.binding = opts.binding;
if (opts.descriptorType !== void 0) this.descriptorType = opts.descriptorType;
if (opts.descriptorCount !== void 0) this.descriptorCount = opts.descriptorCount;
if (opts.stageFlags !== void 0) this.stageFlags = opts.stageFlags;
if (opts.pImmutableSamplers !== void 0) this.pImmutableSamplers = opts.pImmutableSamplers;
}
};
VkDescriptorSetLayoutBinding.prototype.flush = function flush() {
if (this._pImmutableSamplers !== null) {
let array = this._pImmutableSamplers;
if (array.length !== this.descriptorCount) {
throw new RangeError("Invalid array length, expected length of 'descriptorCount' for 'VkDescriptorSetLayoutBinding.pImmutableSamplers'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSampler)) {
throw new TypeError("Invalid type for 'VkDescriptorSetLayoutBinding.pImmutableSamplers[" + ii + "]': Expected 'VkSampler' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pImmutableSamplersNative = nativeArray;
this.memoryView.setBigInt64(0x10, nativeArray.address, true);
} else {
this._pImmutableSamplersNative = null;
this.memoryView.setBigInt64(0x10, BI0, true);
}
}
return true;
};
VkDescriptorSetLayoutBinding.prototype.reflect = function reflect(memoryAddress) {
};
VkDescriptorSetLayoutBinding.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDescriptorSetLayoutBinding();
copy.binding = original.binding;
copy.descriptorType = original.descriptorType;
copy.descriptorCount = original.descriptorCount;
copy.stageFlags = original.stageFlags;
if (original.pImmutableSamplers !== null) {
copy.pImmutableSamplers = [...Array(original.pImmutableSamplers.length)].map((v, i) => {
return original.pImmutableSamplers[i].constructor.createCopyFrom(original.pImmutableSamplers[i]);
});
}
return copy;
};
VkDescriptorSetLayoutBinding.byteLength = 0x18;
VkDescriptorSetLayoutBinding.memoryLayout = {
binding: {
byteOffset: 0x0,
byteLength: 0x4
},
descriptorType: {
byteOffset: 0x4,
byteLength: 0x4
},
descriptorCount: {
byteOffset: 0x8,
byteLength: 0x4
},
stageFlags: {
byteOffset: 0xC,
byteLength: 0x4
},
pImmutableSamplers: {
byteOffset: 0x10,
byteLength: 0x8
},
};
/** VkDescriptorSetLayoutCreateInfo **/
function VkDescriptorSetLayoutCreateInfo(opts, byteOffset) {
if (new.target !== VkDescriptorSetLayoutCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDescriptorSetLayoutCreateInfo, STRUCT_CACHE_VkDescriptorSetLayoutCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDescriptorSetLayoutCreateInfo, STRUCT_CACHE_VkDescriptorSetLayoutCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDescriptorSetLayoutCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x20);
} else {
this.memoryBuffer = new ArrayBuffer(0x20);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x20);
}
this._pNext = null;
this._pBindings = null;
this._pBindingsNative = null;
this.sType = 0x20;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.bindingCount !== void 0) this.bindingCount = opts.bindingCount;
if (opts.pBindings !== void 0) this.pBindings = opts.pBindings;
}
};
Object.defineProperties(VkDescriptorSetLayoutCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorSetLayoutCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkDescriptorSetLayoutCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkDescriptorSetLayoutCreateInfo.pNext'");
switch (sType) {
case 0x3B9D3EE8:
break;
default:
throw new TypeError("Invalid type for 'VkDescriptorSetLayoutCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkDescriptorSetLayoutCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorSetLayoutCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"bindingCount": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorSetLayoutCreateInfo.bindingCount");
this.memoryView.setUint32(0x14, value, true);
}
},
"pBindings": {
get() {
if (this._pBindings === null && this.memoryView.getBigInt64(0x18, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x18, true);
let array = decodeNativeArrayOfObjects(addr, this.bindingCount, VkDescriptorSetLayoutBinding);
this._pBindings = array;
return this.pBindings;
} else {
return this._pBindings;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pBindings = value;
} else if (value === null) {
this._pBindings = null;
} else {
throw new TypeError("Invalid type for 'VkDescriptorSetLayoutCreateInfo.pBindings': Expected 'Array VkDescriptorSetLayoutBinding' but got '" + typeToString(value) + "'");
}
}
},
});
VkDescriptorSetLayoutCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x20);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x20"], 0x0);
this._pNext = null;
this._pBindings = null;
this._pBindingsNative = null;
this.sType = 0x20;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.bindingCount !== void 0) this.bindingCount = opts.bindingCount;
if (opts.pBindings !== void 0) this.pBindings = opts.pBindings;
}
};
VkDescriptorSetLayoutCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pBindings !== null) {
let array = this._pBindings;
if (array.length !== this.bindingCount) {
throw new RangeError("Invalid array length, expected length of 'bindingCount' for 'VkDescriptorSetLayoutCreateInfo.pBindings'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkDescriptorSetLayoutBinding)) {
throw new TypeError("Invalid type for 'VkDescriptorSetLayoutCreateInfo.pBindings[" + ii + "]': Expected 'VkDescriptorSetLayoutBinding' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pBindingsNative = nativeArray;
this.memoryView.setBigInt64(0x18, nativeArray.address, true);
} else {
this._pBindingsNative = null;
this.memoryView.setBigInt64(0x18, BI0, true);
}
}
return true;
};
VkDescriptorSetLayoutCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkDescriptorSetLayoutCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDescriptorSetLayoutCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.bindingCount = original.bindingCount;
if (original.pBindings !== null) {
copy.pBindings = [...Array(original.pBindings.length)].map((v, i) => {
return original.pBindings[i].constructor.createCopyFrom(original.pBindings[i]);
});
}
return copy;
};
VkDescriptorSetLayoutCreateInfo.byteLength = 0x20;
VkDescriptorSetLayoutCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
bindingCount: {
byteOffset: 0x14,
byteLength: 0x4
},
pBindings: {
byteOffset: 0x18,
byteLength: 0x8
},
};
/** VkDescriptorPoolSize **/
function VkDescriptorPoolSize(opts, byteOffset) {
if (new.target !== VkDescriptorPoolSize) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDescriptorPoolSize, STRUCT_CACHE_VkDescriptorPoolSize);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDescriptorPoolSize, STRUCT_CACHE_VkDescriptorPoolSize);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDescriptorPoolSize'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x8);
} else {
this.memoryBuffer = new ArrayBuffer(0x8);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
}
if (typeof opts === "object") {
if (opts.type !== void 0) this.type = opts.type;
if (opts.descriptorCount !== void 0) this.descriptorCount = opts.descriptorCount;
}
};
Object.defineProperties(VkDescriptorPoolSize.prototype, {
"type": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorPoolSize.type");
if (!$VAL_R_VkDescriptorType(value)) {
throw new RangeError("Invalid value for 'VkDescriptorPoolSize.type': '" + value + "' is not a value of 'VkDescriptorType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"descriptorCount": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorPoolSize.descriptorCount");
this.memoryView.setUint32(0x4, value, true);
}
},
});
VkDescriptorPoolSize.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x8);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x8"], 0x0);
if (typeof opts === "object") {
if (opts.type !== void 0) this.type = opts.type;
if (opts.descriptorCount !== void 0) this.descriptorCount = opts.descriptorCount;
}
};
VkDescriptorPoolSize.prototype.flush = function flush() {
return true;
};
VkDescriptorPoolSize.prototype.reflect = function reflect(memoryAddress) {
};
VkDescriptorPoolSize.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDescriptorPoolSize();
copy.type = original.type;
copy.descriptorCount = original.descriptorCount;
return copy;
};
VkDescriptorPoolSize.byteLength = 0x8;
VkDescriptorPoolSize.memoryLayout = {
type: {
byteOffset: 0x0,
byteLength: 0x4
},
descriptorCount: {
byteOffset: 0x4,
byteLength: 0x4
},
};
/** VkDescriptorPoolCreateInfo **/
function VkDescriptorPoolCreateInfo(opts, byteOffset) {
if (new.target !== VkDescriptorPoolCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDescriptorPoolCreateInfo, STRUCT_CACHE_VkDescriptorPoolCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDescriptorPoolCreateInfo, STRUCT_CACHE_VkDescriptorPoolCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDescriptorPoolCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x28);
} else {
this.memoryBuffer = new ArrayBuffer(0x28);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x28);
}
this._pNext = null;
this._pPoolSizes = null;
this._pPoolSizesNative = null;
this.sType = 0x21;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.maxSets !== void 0) this.maxSets = opts.maxSets;
if (opts.poolSizeCount !== void 0) this.poolSizeCount = opts.poolSizeCount;
if (opts.pPoolSizes !== void 0) this.pPoolSizes = opts.pPoolSizes;
}
};
Object.defineProperties(VkDescriptorPoolCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorPoolCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkDescriptorPoolCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkDescriptorPoolCreateInfo.pNext'");
switch (sType) {
case 0x3B9CE513:
break;
default:
throw new TypeError("Invalid type for 'VkDescriptorPoolCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkDescriptorPoolCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorPoolCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"maxSets": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorPoolCreateInfo.maxSets");
this.memoryView.setUint32(0x14, value, true);
}
},
"poolSizeCount": {
get() {
return this.memoryView.getUint32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorPoolCreateInfo.poolSizeCount");
this.memoryView.setUint32(0x18, value, true);
}
},
"pPoolSizes": {
get() {
if (this._pPoolSizes === null && this.memoryView.getBigInt64(0x20, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x20, true);
let array = decodeNativeArrayOfObjects(addr, this.poolSizeCount, VkDescriptorPoolSize);
this._pPoolSizes = array;
return this.pPoolSizes;
} else {
return this._pPoolSizes;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pPoolSizes = value;
} else if (value === null) {
this._pPoolSizes = null;
} else {
throw new TypeError("Invalid type for 'VkDescriptorPoolCreateInfo.pPoolSizes': Expected 'Array VkDescriptorPoolSize' but got '" + typeToString(value) + "'");
}
}
},
});
VkDescriptorPoolCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x28);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x28"], 0x0);
this._pNext = null;
this._pPoolSizes = null;
this._pPoolSizesNative = null;
this.sType = 0x21;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.maxSets !== void 0) this.maxSets = opts.maxSets;
if (opts.poolSizeCount !== void 0) this.poolSizeCount = opts.poolSizeCount;
if (opts.pPoolSizes !== void 0) this.pPoolSizes = opts.pPoolSizes;
}
};
VkDescriptorPoolCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pPoolSizes !== null) {
let array = this._pPoolSizes;
if (array.length !== this.poolSizeCount) {
throw new RangeError("Invalid array length, expected length of 'poolSizeCount' for 'VkDescriptorPoolCreateInfo.pPoolSizes'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkDescriptorPoolSize)) {
throw new TypeError("Invalid type for 'VkDescriptorPoolCreateInfo.pPoolSizes[" + ii + "]': Expected 'VkDescriptorPoolSize' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pPoolSizesNative = nativeArray;
this.memoryView.setBigInt64(0x20, nativeArray.address, true);
} else {
this._pPoolSizesNative = null;
this.memoryView.setBigInt64(0x20, BI0, true);
}
}
return true;
};
VkDescriptorPoolCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkDescriptorPoolCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDescriptorPoolCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.maxSets = original.maxSets;
copy.poolSizeCount = original.poolSizeCount;
if (original.pPoolSizes !== null) {
copy.pPoolSizes = [...Array(original.pPoolSizes.length)].map((v, i) => {
return original.pPoolSizes[i].constructor.createCopyFrom(original.pPoolSizes[i]);
});
}
return copy;
};
VkDescriptorPoolCreateInfo.byteLength = 0x28;
VkDescriptorPoolCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
maxSets: {
byteOffset: 0x14,
byteLength: 0x4
},
poolSizeCount: {
byteOffset: 0x18,
byteLength: 0x4
},
pPoolSizes: {
byteOffset: 0x20,
byteLength: 0x8
},
};
/** VkDescriptorSetAllocateInfo **/
function VkDescriptorSetAllocateInfo(opts, byteOffset) {
if (new.target !== VkDescriptorSetAllocateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDescriptorSetAllocateInfo, STRUCT_CACHE_VkDescriptorSetAllocateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDescriptorSetAllocateInfo, STRUCT_CACHE_VkDescriptorSetAllocateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDescriptorSetAllocateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x28);
} else {
this.memoryBuffer = new ArrayBuffer(0x28);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x28);
}
this._pNext = null;
this._descriptorPool = null;
this._pSetLayouts = null;
this._pSetLayoutsNative = null;
this.sType = 0x22;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.descriptorPool !== void 0) this.descriptorPool = opts.descriptorPool;
if (opts.descriptorSetCount !== void 0) this.descriptorSetCount = opts.descriptorSetCount;
if (opts.pSetLayouts !== void 0) this.pSetLayouts = opts.pSetLayouts;
}
};
Object.defineProperties(VkDescriptorSetAllocateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorSetAllocateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkDescriptorSetAllocateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkDescriptorSetAllocateInfo.pNext'");
switch (sType) {
case 0x3B9D3EEB:
break;
default:
throw new TypeError("Invalid type for 'VkDescriptorSetAllocateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkDescriptorSetAllocateInfo.pNext'");
}
}
},
"descriptorPool": {
get() {
return this._descriptorPool;
},
set(value) {
if (value !== null && value.constructor === VkDescriptorPool) {
this._descriptorPool = value;
this.memoryView.setBigInt64(0x10, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._descriptorPool = null;
this.memoryView.setBigInt64(0x10, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkDescriptorSetAllocateInfo.descriptorPool': Expected 'VkDescriptorPool' but got '" + typeToString(value) + "'");
}
}
},
"descriptorSetCount": {
get() {
return this.memoryView.getUint32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDescriptorSetAllocateInfo.descriptorSetCount");
this.memoryView.setUint32(0x18, value, true);
}
},
"pSetLayouts": {
get() {
if (this._pSetLayouts === null && this.memoryView.getBigInt64(0x20, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x20, true);
let array = decodeNativeArrayOfObjects(addr, this.descriptorSetCount, VkDescriptorSetLayout);
this._pSetLayouts = array;
return this.pSetLayouts;
} else {
return this._pSetLayouts;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pSetLayouts = value;
} else if (value === null) {
this._pSetLayouts = null;
} else {
throw new TypeError("Invalid type for 'VkDescriptorSetAllocateInfo.pSetLayouts': Expected 'Array VkDescriptorSetLayout' but got '" + typeToString(value) + "'");
}
}
},
});
VkDescriptorSetAllocateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x28);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x28"], 0x0);
this._pNext = null;
this._descriptorPool = null;
this._pSetLayouts = null;
this._pSetLayoutsNative = null;
this.sType = 0x22;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.descriptorPool !== void 0) this.descriptorPool = opts.descriptorPool;
if (opts.descriptorSetCount !== void 0) this.descriptorSetCount = opts.descriptorSetCount;
if (opts.pSetLayouts !== void 0) this.pSetLayouts = opts.pSetLayouts;
}
};
VkDescriptorSetAllocateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pSetLayouts !== null) {
let array = this._pSetLayouts;
if (array.length !== this.descriptorSetCount) {
throw new RangeError("Invalid array length, expected length of 'descriptorSetCount' for 'VkDescriptorSetAllocateInfo.pSetLayouts'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkDescriptorSetLayout)) {
throw new TypeError("Invalid type for 'VkDescriptorSetAllocateInfo.pSetLayouts[" + ii + "]': Expected 'VkDescriptorSetLayout' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pSetLayoutsNative = nativeArray;
this.memoryView.setBigInt64(0x20, nativeArray.address, true);
} else {
this._pSetLayoutsNative = null;
this.memoryView.setBigInt64(0x20, BI0, true);
}
}
return true;
};
VkDescriptorSetAllocateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkDescriptorSetAllocateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDescriptorSetAllocateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
if (original.descriptorPool !== null) {
copy.descriptorPool = original.descriptorPool.constructor.createCopyFrom(original.descriptorPool);
}
copy.descriptorSetCount = original.descriptorSetCount;
if (original.pSetLayouts !== null) {
copy.pSetLayouts = [...Array(original.pSetLayouts.length)].map((v, i) => {
return original.pSetLayouts[i].constructor.createCopyFrom(original.pSetLayouts[i]);
});
}
return copy;
};
VkDescriptorSetAllocateInfo.byteLength = 0x28;
VkDescriptorSetAllocateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
descriptorPool: {
byteOffset: 0x10,
byteLength: 0x8
},
descriptorSetCount: {
byteOffset: 0x18,
byteLength: 0x4
},
pSetLayouts: {
byteOffset: 0x20,
byteLength: 0x8
},
};
/** VkSpecializationMapEntry **/
function VkSpecializationMapEntry(opts, byteOffset) {
if (new.target !== VkSpecializationMapEntry) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSpecializationMapEntry, STRUCT_CACHE_VkSpecializationMapEntry);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSpecializationMapEntry, STRUCT_CACHE_VkSpecializationMapEntry);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSpecializationMapEntry'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x10);
} else {
this.memoryBuffer = new ArrayBuffer(0x10);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x10);
}
if (typeof opts === "object") {
if (opts.constantID !== void 0) this.constantID = opts.constantID;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.size !== void 0) this.size = opts.size;
}
};
Object.defineProperties(VkSpecializationMapEntry.prototype, {
"constantID": {
get() {
return this.memoryView.getUint32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSpecializationMapEntry.constantID");
this.memoryView.setUint32(0x0, value, true);
}
},
"offset": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSpecializationMapEntry.offset");
this.memoryView.setUint32(0x4, value, true);
}
},
"size": {
get() {
return this.memoryView.getBigInt64(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkSpecializationMapEntry.size")
this.memoryView.setBigInt64(0x8, BigInt(value), true);
}
},
});
VkSpecializationMapEntry.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x10);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x10"], 0x0);
if (typeof opts === "object") {
if (opts.constantID !== void 0) this.constantID = opts.constantID;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.size !== void 0) this.size = opts.size;
}
};
VkSpecializationMapEntry.prototype.flush = function flush() {
return true;
};
VkSpecializationMapEntry.prototype.reflect = function reflect(memoryAddress) {
};
VkSpecializationMapEntry.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSpecializationMapEntry();
copy.constantID = original.constantID;
copy.offset = original.offset;
copy.size = original.size;
return copy;
};
VkSpecializationMapEntry.byteLength = 0x10;
VkSpecializationMapEntry.memoryLayout = {
constantID: {
byteOffset: 0x0,
byteLength: 0x4
},
offset: {
byteOffset: 0x4,
byteLength: 0x4
},
size: {
byteOffset: 0x8,
byteLength: 0x8
},
};
/** VkSpecializationInfo **/
function VkSpecializationInfo(opts, byteOffset) {
if (new.target !== VkSpecializationInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSpecializationInfo, STRUCT_CACHE_VkSpecializationInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSpecializationInfo, STRUCT_CACHE_VkSpecializationInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSpecializationInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x20);
} else {
this.memoryBuffer = new ArrayBuffer(0x20);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x20);
}
this._pMapEntries = null;
this._pMapEntriesNative = null;
this._pData = null;
if (typeof opts === "object") {
if (opts.mapEntryCount !== void 0) this.mapEntryCount = opts.mapEntryCount;
if (opts.pMapEntries !== void 0) this.pMapEntries = opts.pMapEntries;
if (opts.dataSize !== void 0) this.dataSize = opts.dataSize;
if (opts.pData !== void 0) this.pData = opts.pData;
}
};
Object.defineProperties(VkSpecializationInfo.prototype, {
"mapEntryCount": {
get() {
return this.memoryView.getUint32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSpecializationInfo.mapEntryCount");
this.memoryView.setUint32(0x0, value, true);
}
},
"pMapEntries": {
get() {
if (this._pMapEntries === null && this.memoryView.getBigInt64(0x8, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x8, true);
let array = decodeNativeArrayOfObjects(addr, this.mapEntryCount, VkSpecializationMapEntry);
this._pMapEntries = array;
return this.pMapEntries;
} else {
return this._pMapEntries;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pMapEntries = value;
} else if (value === null) {
this._pMapEntries = null;
} else {
throw new TypeError("Invalid type for 'VkSpecializationInfo.pMapEntries': Expected 'Array VkSpecializationMapEntry' but got '" + typeToString(value) + "'");
}
}
},
"dataSize": {
get() {
return this.memoryView.getBigInt64(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkSpecializationInfo.dataSize")
this.memoryView.setBigInt64(0x10, BigInt(value), true);
}
},
"pData": {
get() {
return this._pData;
},
set(value) {
if (value !== null && value.constructor === ArrayBuffer) {
this._pData = value;
this.memoryView.setBigInt64(0x18, getAddressFromArrayBuffer(value), true);
} else if (value === null) {
this._pData = null;
this.memoryView.setBigInt64(0x18, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkSpecializationInfo.pData': Expected 'ArrayBuffer' but got '" + typeToString(value) + "'");
}
}
},
});
VkSpecializationInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x20);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x20"], 0x0);
this._pMapEntries = null;
this._pMapEntriesNative = null;
this._pData = null;
if (typeof opts === "object") {
if (opts.mapEntryCount !== void 0) this.mapEntryCount = opts.mapEntryCount;
if (opts.pMapEntries !== void 0) this.pMapEntries = opts.pMapEntries;
if (opts.dataSize !== void 0) this.dataSize = opts.dataSize;
if (opts.pData !== void 0) this.pData = opts.pData;
}
};
VkSpecializationInfo.prototype.flush = function flush() {
if (this._pMapEntries !== null) {
let array = this._pMapEntries;
if (array.length !== this.mapEntryCount) {
throw new RangeError("Invalid array length, expected length of 'mapEntryCount' for 'VkSpecializationInfo.pMapEntries'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSpecializationMapEntry)) {
throw new TypeError("Invalid type for 'VkSpecializationInfo.pMapEntries[" + ii + "]': Expected 'VkSpecializationMapEntry' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pMapEntriesNative = nativeArray;
this.memoryView.setBigInt64(0x8, nativeArray.address, true);
} else {
this._pMapEntriesNative = null;
this.memoryView.setBigInt64(0x8, BI0, true);
}
}
return true;
};
VkSpecializationInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkSpecializationInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSpecializationInfo();
copy.mapEntryCount = original.mapEntryCount;
if (original.pMapEntries !== null) {
copy.pMapEntries = [...Array(original.pMapEntries.length)].map((v, i) => {
return original.pMapEntries[i].constructor.createCopyFrom(original.pMapEntries[i]);
});
}
copy.dataSize = original.dataSize;
if (original.pData !== null) {
let buf = new ArrayBuffer(original.pData.byteLength);
new Uint8Array(buf).set(new Uint8Array(original.pData), 0x0);
copy.pData = buf;
}
return copy;
};
VkSpecializationInfo.byteLength = 0x20;
VkSpecializationInfo.memoryLayout = {
mapEntryCount: {
byteOffset: 0x0,
byteLength: 0x4
},
pMapEntries: {
byteOffset: 0x8,
byteLength: 0x8
},
dataSize: {
byteOffset: 0x10,
byteLength: 0x8
},
pData: {
byteOffset: 0x18,
byteLength: 0x8
},
};
/** VkPipelineShaderStageCreateInfo **/
function VkPipelineShaderStageCreateInfo(opts, byteOffset) {
if (new.target !== VkPipelineShaderStageCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineShaderStageCreateInfo, STRUCT_CACHE_VkPipelineShaderStageCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineShaderStageCreateInfo, STRUCT_CACHE_VkPipelineShaderStageCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineShaderStageCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x30);
} else {
this.memoryBuffer = new ArrayBuffer(0x30);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x30);
}
this._pNext = null;
this._module = null;
this._pName = null;
this._pSpecializationInfo = null;
this.sType = 0x12;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.stage !== void 0) this.stage = opts.stage;
if (opts.module !== void 0) this.module = opts.module;
if (opts.pName !== void 0) this.pName = opts.pName;
if (opts.pSpecializationInfo !== void 0) this.pSpecializationInfo = opts.pSpecializationInfo;
}
};
Object.defineProperties(VkPipelineShaderStageCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineShaderStageCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkPipelineShaderStageCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkPipelineShaderStageCreateInfo.pNext'");
switch (sType) {
case 0x3B9E38E9:
break;
default:
throw new TypeError("Invalid type for 'VkPipelineShaderStageCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkPipelineShaderStageCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineShaderStageCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"stage": {
get() {
return this.memoryView.getInt32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineShaderStageCreateInfo.stage");
this.memoryView.setInt32(0x14, value, true);
}
},
"module": {
get() {
return this._module;
},
set(value) {
if (value !== null && value.constructor === VkShaderModule) {
this._module = value;
this.memoryView.setBigInt64(0x18, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._module = null;
this.memoryView.setBigInt64(0x18, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkPipelineShaderStageCreateInfo.module': Expected 'VkShaderModule' but got '" + typeToString(value) + "'");
}
}
},
"pName": {
get() {
if (this._pName !== null) {
let str = textDecoder.decode(this._pName);
return str.substr(0, str.length - 1);
} else {
// native memory contains a string which we didn't reflect yet
if (this.memoryView.getBigInt64(0x20, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x20, true);
let length = findNullTerminatedUTF8StringLength(addr);
let buffer = getArrayBufferFromAddress(addr, BigInt(length));
this._pName = buffer;
return this.pName;
}
return null;
}
},
set(value) {
if (value !== null && value.constructor === String) {
this._pName = textEncoder.encode(value + NULLT).buffer;
this.memoryView.setBigInt64(0x20, getAddressFromArrayBuffer(this._pName), true);
} else if (value === null) {
this._pName = null;
this.memoryView.setBigInt64(0x20, BI0, true);
} else {
ASSERT_IS_STRING(value, "VkPipelineShaderStageCreateInfo.pName");
}
}
},
"pSpecializationInfo": {
get() {
if (this._pSpecializationInfo === null && this.memoryView.getBigInt64(0x28, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x28, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkSpecializationInfo.byteLength));
this._pSpecializationInfo = new VkSpecializationInfo({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x28, this._pSpecializationInfo.memoryAddress, true);
return this.pSpecializationInfo;
} else {
return this._pSpecializationInfo;
}
},
set(value) {
if (value !== null && value.constructor === VkSpecializationInfo) {
value.flush();
this._pSpecializationInfo = value;
this.memoryView.setBigInt64(0x28, value.memoryAddress, true);
} else if (value === null) {
this._pSpecializationInfo = null;
this.memoryView.setBigInt64(0x28, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkPipelineShaderStageCreateInfo.pSpecializationInfo': Expected 'VkSpecializationInfo' but got '" + typeToString(value) + "'");
}
}
},
});
VkPipelineShaderStageCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x30);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x30"], 0x0);
this._pNext = null;
this._module = null;
this._pName = null;
this._pSpecializationInfo = null;
this.sType = 0x12;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.stage !== void 0) this.stage = opts.stage;
if (opts.module !== void 0) this.module = opts.module;
if (opts.pName !== void 0) this.pName = opts.pName;
if (opts.pSpecializationInfo !== void 0) this.pSpecializationInfo = opts.pSpecializationInfo;
}
};
VkPipelineShaderStageCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkPipelineShaderStageCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineShaderStageCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineShaderStageCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.stage = original.stage;
if (original.module !== null) {
copy.module = original.module.constructor.createCopyFrom(original.module);
}
copy.pName = original.pName;
if (original.pSpecializationInfo !== null) {
copy.pSpecializationInfo = original.pSpecializationInfo.constructor.createCopyFrom(original.pSpecializationInfo);
}
return copy;
};
VkPipelineShaderStageCreateInfo.byteLength = 0x30;
VkPipelineShaderStageCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
stage: {
byteOffset: 0x14,
byteLength: 0x4
},
module: {
byteOffset: 0x18,
byteLength: 0x8
},
pName: {
byteOffset: 0x20,
byteLength: 0x8
},
pSpecializationInfo: {
byteOffset: 0x28,
byteLength: 0x8
},
};
/** VkComputePipelineCreateInfo **/
function VkComputePipelineCreateInfo(opts, byteOffset) {
if (new.target !== VkComputePipelineCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkComputePipelineCreateInfo, STRUCT_CACHE_VkComputePipelineCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkComputePipelineCreateInfo, STRUCT_CACHE_VkComputePipelineCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkComputePipelineCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x60);
} else {
this.memoryBuffer = new ArrayBuffer(0x60);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x60);
}
this._pNext = null;
this._stage = new VkPipelineShaderStageCreateInfo({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x18 });
this._layout = null;
this._basePipelineHandle = null;
this.sType = 0x1D;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.stage !== void 0) this.stage = opts.stage;
if (opts.layout !== void 0) this.layout = opts.layout;
if (opts.basePipelineHandle !== void 0) this.basePipelineHandle = opts.basePipelineHandle;
if (opts.basePipelineIndex !== void 0) this.basePipelineIndex = opts.basePipelineIndex;
}
};
Object.defineProperties(VkComputePipelineCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkComputePipelineCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkComputePipelineCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkComputePipelineCreateInfo.pNext'");
switch (sType) {
case 0x3B9DB800:
case 0x3B9D94D8:
break;
default:
throw new TypeError("Invalid type for 'VkComputePipelineCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkComputePipelineCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkComputePipelineCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"stage": {
get() {
return this._stage;
},
set(value) {
if (value !== null && value.constructor === VkPipelineShaderStageCreateInfo) {
value.flush();
this._stage = value;
} else if (value === null) {
this._stage = null;
} else {
throw new TypeError("Invalid type for 'VkComputePipelineCreateInfo.stage': Expected 'VkPipelineShaderStageCreateInfo' but got '" + typeToString(value) + "'");
}
}
},
"layout": {
get() {
return this._layout;
},
set(value) {
if (value !== null && value.constructor === VkPipelineLayout) {
this._layout = value;
this.memoryView.setBigInt64(0x48, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._layout = null;
this.memoryView.setBigInt64(0x48, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkComputePipelineCreateInfo.layout': Expected 'VkPipelineLayout' but got '" + typeToString(value) + "'");
}
}
},
"basePipelineHandle": {
get() {
return this._basePipelineHandle;
},
set(value) {
if (value !== null && value.constructor === VkPipeline) {
this._basePipelineHandle = value;
this.memoryView.setBigInt64(0x50, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._basePipelineHandle = null;
this.memoryView.setBigInt64(0x50, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkComputePipelineCreateInfo.basePipelineHandle': Expected 'VkPipeline' but got '" + typeToString(value) + "'");
}
}
},
"basePipelineIndex": {
get() {
return this.memoryView.getInt32(0x58, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkComputePipelineCreateInfo.basePipelineIndex");
this.memoryView.setInt32(0x58, value, true);
}
},
});
VkComputePipelineCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x60);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x60"], 0x0);
this._pNext = null;
if (this._stage !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._stage.memoryBuffer) this._stage = new VkPipelineShaderStageCreateInfo({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x18 });
else this._stage.reset();
}
this._layout = null;
this._basePipelineHandle = null;
this.sType = 0x1D;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.stage !== void 0) this.stage = opts.stage;
if (opts.layout !== void 0) this.layout = opts.layout;
if (opts.basePipelineHandle !== void 0) this.basePipelineHandle = opts.basePipelineHandle;
if (opts.basePipelineIndex !== void 0) this.basePipelineIndex = opts.basePipelineIndex;
}
};
VkComputePipelineCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._stage !== null) {
let stage = this._stage;
stage.flush();
if (this.memoryBuffer !== stage.memoryBuffer) {
let srcView = new Uint8Array(stage.memoryBuffer, stage.$memoryOffset, 0x30);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x18);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkComputePipelineCreateInfo.stage' isn't used as shared-memory");
}
}
return true;
};
VkComputePipelineCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkComputePipelineCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkComputePipelineCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
if (original.stage !== null) {
copy.stage = original.stage.constructor.createCopyFrom(original.stage);
}
if (original.layout !== null) {
copy.layout = original.layout.constructor.createCopyFrom(original.layout);
}
if (original.basePipelineHandle !== null) {
copy.basePipelineHandle = original.basePipelineHandle.constructor.createCopyFrom(original.basePipelineHandle);
}
copy.basePipelineIndex = original.basePipelineIndex;
return copy;
};
VkComputePipelineCreateInfo.byteLength = 0x60;
VkComputePipelineCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
stage: {
byteOffset: 0x18,
byteLength: 0x30
},
layout: {
byteOffset: 0x48,
byteLength: 0x8
},
basePipelineHandle: {
byteOffset: 0x50,
byteLength: 0x8
},
basePipelineIndex: {
byteOffset: 0x58,
byteLength: 0x4
},
};
/** VkVertexInputBindingDescription **/
function VkVertexInputBindingDescription(opts, byteOffset) {
if (new.target !== VkVertexInputBindingDescription) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkVertexInputBindingDescription, STRUCT_CACHE_VkVertexInputBindingDescription);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkVertexInputBindingDescription, STRUCT_CACHE_VkVertexInputBindingDescription);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkVertexInputBindingDescription'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0xC);
} else {
this.memoryBuffer = new ArrayBuffer(0xC);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0xC);
}
if (typeof opts === "object") {
if (opts.binding !== void 0) this.binding = opts.binding;
if (opts.stride !== void 0) this.stride = opts.stride;
if (opts.inputRate !== void 0) this.inputRate = opts.inputRate;
}
};
Object.defineProperties(VkVertexInputBindingDescription.prototype, {
"binding": {
get() {
return this.memoryView.getUint32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkVertexInputBindingDescription.binding");
this.memoryView.setUint32(0x0, value, true);
}
},
"stride": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkVertexInputBindingDescription.stride");
this.memoryView.setUint32(0x4, value, true);
}
},
"inputRate": {
get() {
return this.memoryView.getInt32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkVertexInputBindingDescription.inputRate");
if (!$VAL_R_VkVertexInputRate(value)) {
throw new RangeError("Invalid value for 'VkVertexInputBindingDescription.inputRate': '" + value + "' is not a value of 'VkVertexInputRate'");
}
this.memoryView.setInt32(0x8, value, true);
}
},
});
VkVertexInputBindingDescription.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0xC);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0xC"], 0x0);
if (typeof opts === "object") {
if (opts.binding !== void 0) this.binding = opts.binding;
if (opts.stride !== void 0) this.stride = opts.stride;
if (opts.inputRate !== void 0) this.inputRate = opts.inputRate;
}
};
VkVertexInputBindingDescription.prototype.flush = function flush() {
return true;
};
VkVertexInputBindingDescription.prototype.reflect = function reflect(memoryAddress) {
};
VkVertexInputBindingDescription.createCopyFrom = function createCopyFrom(original) {
let copy = new VkVertexInputBindingDescription();
copy.binding = original.binding;
copy.stride = original.stride;
copy.inputRate = original.inputRate;
return copy;
};
VkVertexInputBindingDescription.byteLength = 0xC;
VkVertexInputBindingDescription.memoryLayout = {
binding: {
byteOffset: 0x0,
byteLength: 0x4
},
stride: {
byteOffset: 0x4,
byteLength: 0x4
},
inputRate: {
byteOffset: 0x8,
byteLength: 0x4
},
};
/** VkVertexInputAttributeDescription **/
function VkVertexInputAttributeDescription(opts, byteOffset) {
if (new.target !== VkVertexInputAttributeDescription) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkVertexInputAttributeDescription, STRUCT_CACHE_VkVertexInputAttributeDescription);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkVertexInputAttributeDescription, STRUCT_CACHE_VkVertexInputAttributeDescription);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkVertexInputAttributeDescription'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x10);
} else {
this.memoryBuffer = new ArrayBuffer(0x10);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x10);
}
if (typeof opts === "object") {
if (opts.location !== void 0) this.location = opts.location;
if (opts.binding !== void 0) this.binding = opts.binding;
if (opts.format !== void 0) this.format = opts.format;
if (opts.offset !== void 0) this.offset = opts.offset;
}
};
Object.defineProperties(VkVertexInputAttributeDescription.prototype, {
"location": {
get() {
return this.memoryView.getUint32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkVertexInputAttributeDescription.location");
this.memoryView.setUint32(0x0, value, true);
}
},
"binding": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkVertexInputAttributeDescription.binding");
this.memoryView.setUint32(0x4, value, true);
}
},
"format": {
get() {
return this.memoryView.getInt32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkVertexInputAttributeDescription.format");
if (!$VAL_R_VkFormat(value)) {
throw new RangeError("Invalid value for 'VkVertexInputAttributeDescription.format': '" + value + "' is not a value of 'VkFormat'");
}
this.memoryView.setInt32(0x8, value, true);
}
},
"offset": {
get() {
return this.memoryView.getUint32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkVertexInputAttributeDescription.offset");
this.memoryView.setUint32(0xC, value, true);
}
},
});
VkVertexInputAttributeDescription.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x10);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x10"], 0x0);
if (typeof opts === "object") {
if (opts.location !== void 0) this.location = opts.location;
if (opts.binding !== void 0) this.binding = opts.binding;
if (opts.format !== void 0) this.format = opts.format;
if (opts.offset !== void 0) this.offset = opts.offset;
}
};
VkVertexInputAttributeDescription.prototype.flush = function flush() {
return true;
};
VkVertexInputAttributeDescription.prototype.reflect = function reflect(memoryAddress) {
};
VkVertexInputAttributeDescription.createCopyFrom = function createCopyFrom(original) {
let copy = new VkVertexInputAttributeDescription();
copy.location = original.location;
copy.binding = original.binding;
copy.format = original.format;
copy.offset = original.offset;
return copy;
};
VkVertexInputAttributeDescription.byteLength = 0x10;
VkVertexInputAttributeDescription.memoryLayout = {
location: {
byteOffset: 0x0,
byteLength: 0x4
},
binding: {
byteOffset: 0x4,
byteLength: 0x4
},
format: {
byteOffset: 0x8,
byteLength: 0x4
},
offset: {
byteOffset: 0xC,
byteLength: 0x4
},
};
/** VkPipelineVertexInputStateCreateInfo **/
function VkPipelineVertexInputStateCreateInfo(opts, byteOffset) {
if (new.target !== VkPipelineVertexInputStateCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineVertexInputStateCreateInfo, STRUCT_CACHE_VkPipelineVertexInputStateCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineVertexInputStateCreateInfo, STRUCT_CACHE_VkPipelineVertexInputStateCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineVertexInputStateCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x30);
} else {
this.memoryBuffer = new ArrayBuffer(0x30);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x30);
}
this._pNext = null;
this._pVertexBindingDescriptions = null;
this._pVertexBindingDescriptionsNative = null;
this._pVertexAttributeDescriptions = null;
this._pVertexAttributeDescriptionsNative = null;
this.sType = 0x13;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.vertexBindingDescriptionCount !== void 0) this.vertexBindingDescriptionCount = opts.vertexBindingDescriptionCount;
if (opts.pVertexBindingDescriptions !== void 0) this.pVertexBindingDescriptions = opts.pVertexBindingDescriptions;
if (opts.vertexAttributeDescriptionCount !== void 0) this.vertexAttributeDescriptionCount = opts.vertexAttributeDescriptionCount;
if (opts.pVertexAttributeDescriptions !== void 0) this.pVertexAttributeDescriptions = opts.pVertexAttributeDescriptions;
}
};
Object.defineProperties(VkPipelineVertexInputStateCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineVertexInputStateCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkPipelineVertexInputStateCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkPipelineVertexInputStateCreateInfo.pNext'");
switch (sType) {
case 0x3B9DB031:
break;
default:
throw new TypeError("Invalid type for 'VkPipelineVertexInputStateCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkPipelineVertexInputStateCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineVertexInputStateCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"vertexBindingDescriptionCount": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineVertexInputStateCreateInfo.vertexBindingDescriptionCount");
this.memoryView.setUint32(0x14, value, true);
}
},
"pVertexBindingDescriptions": {
get() {
if (this._pVertexBindingDescriptions === null && this.memoryView.getBigInt64(0x18, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x18, true);
let array = decodeNativeArrayOfObjects(addr, this.vertexBindingDescriptionCount, VkVertexInputBindingDescription);
this._pVertexBindingDescriptions = array;
return this.pVertexBindingDescriptions;
} else {
return this._pVertexBindingDescriptions;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pVertexBindingDescriptions = value;
} else if (value === null) {
this._pVertexBindingDescriptions = null;
} else {
throw new TypeError("Invalid type for 'VkPipelineVertexInputStateCreateInfo.pVertexBindingDescriptions': Expected 'Array VkVertexInputBindingDescription' but got '" + typeToString(value) + "'");
}
}
},
"vertexAttributeDescriptionCount": {
get() {
return this.memoryView.getUint32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineVertexInputStateCreateInfo.vertexAttributeDescriptionCount");
this.memoryView.setUint32(0x20, value, true);
}
},
"pVertexAttributeDescriptions": {
get() {
if (this._pVertexAttributeDescriptions === null && this.memoryView.getBigInt64(0x28, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x28, true);
let array = decodeNativeArrayOfObjects(addr, this.vertexAttributeDescriptionCount, VkVertexInputAttributeDescription);
this._pVertexAttributeDescriptions = array;
return this.pVertexAttributeDescriptions;
} else {
return this._pVertexAttributeDescriptions;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pVertexAttributeDescriptions = value;
} else if (value === null) {
this._pVertexAttributeDescriptions = null;
} else {
throw new TypeError("Invalid type for 'VkPipelineVertexInputStateCreateInfo.pVertexAttributeDescriptions': Expected 'Array VkVertexInputAttributeDescription' but got '" + typeToString(value) + "'");
}
}
},
});
VkPipelineVertexInputStateCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x30);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x30"], 0x0);
this._pNext = null;
this._pVertexBindingDescriptions = null;
this._pVertexBindingDescriptionsNative = null;
this._pVertexAttributeDescriptions = null;
this._pVertexAttributeDescriptionsNative = null;
this.sType = 0x13;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.vertexBindingDescriptionCount !== void 0) this.vertexBindingDescriptionCount = opts.vertexBindingDescriptionCount;
if (opts.pVertexBindingDescriptions !== void 0) this.pVertexBindingDescriptions = opts.pVertexBindingDescriptions;
if (opts.vertexAttributeDescriptionCount !== void 0) this.vertexAttributeDescriptionCount = opts.vertexAttributeDescriptionCount;
if (opts.pVertexAttributeDescriptions !== void 0) this.pVertexAttributeDescriptions = opts.pVertexAttributeDescriptions;
}
};
VkPipelineVertexInputStateCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pVertexBindingDescriptions !== null) {
let array = this._pVertexBindingDescriptions;
if (array.length !== this.vertexBindingDescriptionCount) {
throw new RangeError("Invalid array length, expected length of 'vertexBindingDescriptionCount' for 'VkPipelineVertexInputStateCreateInfo.pVertexBindingDescriptions'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkVertexInputBindingDescription)) {
throw new TypeError("Invalid type for 'VkPipelineVertexInputStateCreateInfo.pVertexBindingDescriptions[" + ii + "]': Expected 'VkVertexInputBindingDescription' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pVertexBindingDescriptionsNative = nativeArray;
this.memoryView.setBigInt64(0x18, nativeArray.address, true);
} else {
this._pVertexBindingDescriptionsNative = null;
this.memoryView.setBigInt64(0x18, BI0, true);
}
}
if (this._pVertexAttributeDescriptions !== null) {
let array = this._pVertexAttributeDescriptions;
if (array.length !== this.vertexAttributeDescriptionCount) {
throw new RangeError("Invalid array length, expected length of 'vertexAttributeDescriptionCount' for 'VkPipelineVertexInputStateCreateInfo.pVertexAttributeDescriptions'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkVertexInputAttributeDescription)) {
throw new TypeError("Invalid type for 'VkPipelineVertexInputStateCreateInfo.pVertexAttributeDescriptions[" + ii + "]': Expected 'VkVertexInputAttributeDescription' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pVertexAttributeDescriptionsNative = nativeArray;
this.memoryView.setBigInt64(0x28, nativeArray.address, true);
} else {
this._pVertexAttributeDescriptionsNative = null;
this.memoryView.setBigInt64(0x28, BI0, true);
}
}
return true;
};
VkPipelineVertexInputStateCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineVertexInputStateCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineVertexInputStateCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.vertexBindingDescriptionCount = original.vertexBindingDescriptionCount;
if (original.pVertexBindingDescriptions !== null) {
copy.pVertexBindingDescriptions = [...Array(original.pVertexBindingDescriptions.length)].map((v, i) => {
return original.pVertexBindingDescriptions[i].constructor.createCopyFrom(original.pVertexBindingDescriptions[i]);
});
}
copy.vertexAttributeDescriptionCount = original.vertexAttributeDescriptionCount;
if (original.pVertexAttributeDescriptions !== null) {
copy.pVertexAttributeDescriptions = [...Array(original.pVertexAttributeDescriptions.length)].map((v, i) => {
return original.pVertexAttributeDescriptions[i].constructor.createCopyFrom(original.pVertexAttributeDescriptions[i]);
});
}
return copy;
};
VkPipelineVertexInputStateCreateInfo.byteLength = 0x30;
VkPipelineVertexInputStateCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
vertexBindingDescriptionCount: {
byteOffset: 0x14,
byteLength: 0x4
},
pVertexBindingDescriptions: {
byteOffset: 0x18,
byteLength: 0x8
},
vertexAttributeDescriptionCount: {
byteOffset: 0x20,
byteLength: 0x4
},
pVertexAttributeDescriptions: {
byteOffset: 0x28,
byteLength: 0x8
},
};
/** VkPipelineInputAssemblyStateCreateInfo **/
function VkPipelineInputAssemblyStateCreateInfo(opts, byteOffset) {
if (new.target !== VkPipelineInputAssemblyStateCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineInputAssemblyStateCreateInfo, STRUCT_CACHE_VkPipelineInputAssemblyStateCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineInputAssemblyStateCreateInfo, STRUCT_CACHE_VkPipelineInputAssemblyStateCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineInputAssemblyStateCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x20);
} else {
this.memoryBuffer = new ArrayBuffer(0x20);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x20);
}
this._pNext = null;
this.sType = 0x14;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.topology !== void 0) this.topology = opts.topology;
if (opts.primitiveRestartEnable !== void 0) this.primitiveRestartEnable = opts.primitiveRestartEnable;
}
};
Object.defineProperties(VkPipelineInputAssemblyStateCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineInputAssemblyStateCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkPipelineInputAssemblyStateCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkPipelineInputAssemblyStateCreateInfo.pNext' isn't allowed to be filled");
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineInputAssemblyStateCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"topology": {
get() {
return this.memoryView.getInt32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineInputAssemblyStateCreateInfo.topology");
if (!$VAL_R_VkPrimitiveTopology(value)) {
throw new RangeError("Invalid value for 'VkPipelineInputAssemblyStateCreateInfo.topology': '" + value + "' is not a value of 'VkPrimitiveTopology'");
}
this.memoryView.setInt32(0x14, value, true);
}
},
"primitiveRestartEnable": {
get() {
return this.memoryView.getUint32(0x18, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x18, value | 0, true);
}
},
});
VkPipelineInputAssemblyStateCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x20);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x20"], 0x0);
this._pNext = null;
this.sType = 0x14;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.topology !== void 0) this.topology = opts.topology;
if (opts.primitiveRestartEnable !== void 0) this.primitiveRestartEnable = opts.primitiveRestartEnable;
}
};
VkPipelineInputAssemblyStateCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkPipelineInputAssemblyStateCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineInputAssemblyStateCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineInputAssemblyStateCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.topology = original.topology;
copy.primitiveRestartEnable = original.primitiveRestartEnable;
return copy;
};
VkPipelineInputAssemblyStateCreateInfo.byteLength = 0x20;
VkPipelineInputAssemblyStateCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
topology: {
byteOffset: 0x14,
byteLength: 0x4
},
primitiveRestartEnable: {
byteOffset: 0x18,
byteLength: 0x4
},
};
/** VkPipelineTessellationStateCreateInfo **/
function VkPipelineTessellationStateCreateInfo(opts, byteOffset) {
if (new.target !== VkPipelineTessellationStateCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineTessellationStateCreateInfo, STRUCT_CACHE_VkPipelineTessellationStateCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineTessellationStateCreateInfo, STRUCT_CACHE_VkPipelineTessellationStateCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineTessellationStateCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._pNext = null;
this.sType = 0x15;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.patchControlPoints !== void 0) this.patchControlPoints = opts.patchControlPoints;
}
};
Object.defineProperties(VkPipelineTessellationStateCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineTessellationStateCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkPipelineTessellationStateCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkPipelineTessellationStateCreateInfo.pNext'");
switch (sType) {
case 0x3B9C930B:
break;
default:
throw new TypeError("Invalid type for 'VkPipelineTessellationStateCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkPipelineTessellationStateCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineTessellationStateCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"patchControlPoints": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineTessellationStateCreateInfo.patchControlPoints");
this.memoryView.setUint32(0x14, value, true);
}
},
});
VkPipelineTessellationStateCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._pNext = null;
this.sType = 0x15;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.patchControlPoints !== void 0) this.patchControlPoints = opts.patchControlPoints;
}
};
VkPipelineTessellationStateCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkPipelineTessellationStateCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineTessellationStateCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineTessellationStateCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.patchControlPoints = original.patchControlPoints;
return copy;
};
VkPipelineTessellationStateCreateInfo.byteLength = 0x18;
VkPipelineTessellationStateCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
patchControlPoints: {
byteOffset: 0x14,
byteLength: 0x4
},
};
/** VkPipelineViewportStateCreateInfo **/
function VkPipelineViewportStateCreateInfo(opts, byteOffset) {
if (new.target !== VkPipelineViewportStateCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineViewportStateCreateInfo, STRUCT_CACHE_VkPipelineViewportStateCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineViewportStateCreateInfo, STRUCT_CACHE_VkPipelineViewportStateCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineViewportStateCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x30);
} else {
this.memoryBuffer = new ArrayBuffer(0x30);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x30);
}
this._pNext = null;
this._pViewports = null;
this._pViewportsNative = null;
this._pScissors = null;
this._pScissorsNative = null;
this.sType = 0x16;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.viewportCount !== void 0) this.viewportCount = opts.viewportCount;
if (opts.pViewports !== void 0) this.pViewports = opts.pViewports;
if (opts.scissorCount !== void 0) this.scissorCount = opts.scissorCount;
if (opts.pScissors !== void 0) this.pScissors = opts.pScissors;
}
};
Object.defineProperties(VkPipelineViewportStateCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineViewportStateCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkPipelineViewportStateCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkPipelineViewportStateCreateInfo.pNext'");
switch (sType) {
case 0x3B9C1DD8:
case 0x3B9C48D0:
case 0x3B9DEAC8:
case 0x3B9D4AA0:
case 0x3B9D4AA5:
break;
default:
throw new TypeError("Invalid type for 'VkPipelineViewportStateCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkPipelineViewportStateCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineViewportStateCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"viewportCount": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineViewportStateCreateInfo.viewportCount");
this.memoryView.setUint32(0x14, value, true);
}
},
"pViewports": {
get() {
if (this._pViewports === null && this.memoryView.getBigInt64(0x18, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x18, true);
let array = decodeNativeArrayOfObjects(addr, this.viewportCount, VkViewport);
this._pViewports = array;
return this.pViewports;
} else {
return this._pViewports;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pViewports = value;
} else if (value === null) {
this._pViewports = null;
} else {
throw new TypeError("Invalid type for 'VkPipelineViewportStateCreateInfo.pViewports': Expected 'Array VkViewport' but got '" + typeToString(value) + "'");
}
}
},
"scissorCount": {
get() {
return this.memoryView.getUint32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineViewportStateCreateInfo.scissorCount");
this.memoryView.setUint32(0x20, value, true);
}
},
"pScissors": {
get() {
if (this._pScissors === null && this.memoryView.getBigInt64(0x28, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x28, true);
let array = decodeNativeArrayOfObjects(addr, this.scissorCount, VkRect2D);
this._pScissors = array;
return this.pScissors;
} else {
return this._pScissors;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pScissors = value;
} else if (value === null) {
this._pScissors = null;
} else {
throw new TypeError("Invalid type for 'VkPipelineViewportStateCreateInfo.pScissors': Expected 'Array VkRect2D' but got '" + typeToString(value) + "'");
}
}
},
});
VkPipelineViewportStateCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x30);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x30"], 0x0);
this._pNext = null;
this._pViewports = null;
this._pViewportsNative = null;
this._pScissors = null;
this._pScissorsNative = null;
this.sType = 0x16;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.viewportCount !== void 0) this.viewportCount = opts.viewportCount;
if (opts.pViewports !== void 0) this.pViewports = opts.pViewports;
if (opts.scissorCount !== void 0) this.scissorCount = opts.scissorCount;
if (opts.pScissors !== void 0) this.pScissors = opts.pScissors;
}
};
VkPipelineViewportStateCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pViewports !== null) {
let array = this._pViewports;
if (array.length !== this.viewportCount) {
throw new RangeError("Invalid array length, expected length of 'viewportCount' for 'VkPipelineViewportStateCreateInfo.pViewports'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkViewport)) {
throw new TypeError("Invalid type for 'VkPipelineViewportStateCreateInfo.pViewports[" + ii + "]': Expected 'VkViewport' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pViewportsNative = nativeArray;
this.memoryView.setBigInt64(0x18, nativeArray.address, true);
} else {
this._pViewportsNative = null;
this.memoryView.setBigInt64(0x18, BI0, true);
}
}
if (this._pScissors !== null) {
let array = this._pScissors;
if (array.length !== this.scissorCount) {
throw new RangeError("Invalid array length, expected length of 'scissorCount' for 'VkPipelineViewportStateCreateInfo.pScissors'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkRect2D)) {
throw new TypeError("Invalid type for 'VkPipelineViewportStateCreateInfo.pScissors[" + ii + "]': Expected 'VkRect2D' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pScissorsNative = nativeArray;
this.memoryView.setBigInt64(0x28, nativeArray.address, true);
} else {
this._pScissorsNative = null;
this.memoryView.setBigInt64(0x28, BI0, true);
}
}
return true;
};
VkPipelineViewportStateCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineViewportStateCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineViewportStateCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.viewportCount = original.viewportCount;
if (original.pViewports !== null) {
copy.pViewports = [...Array(original.pViewports.length)].map((v, i) => {
return original.pViewports[i].constructor.createCopyFrom(original.pViewports[i]);
});
}
copy.scissorCount = original.scissorCount;
if (original.pScissors !== null) {
copy.pScissors = [...Array(original.pScissors.length)].map((v, i) => {
return original.pScissors[i].constructor.createCopyFrom(original.pScissors[i]);
});
}
return copy;
};
VkPipelineViewportStateCreateInfo.byteLength = 0x30;
VkPipelineViewportStateCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
viewportCount: {
byteOffset: 0x14,
byteLength: 0x4
},
pViewports: {
byteOffset: 0x18,
byteLength: 0x8
},
scissorCount: {
byteOffset: 0x20,
byteLength: 0x4
},
pScissors: {
byteOffset: 0x28,
byteLength: 0x8
},
};
/** VkPipelineRasterizationStateCreateInfo **/
function VkPipelineRasterizationStateCreateInfo(opts, byteOffset) {
if (new.target !== VkPipelineRasterizationStateCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineRasterizationStateCreateInfo, STRUCT_CACHE_VkPipelineRasterizationStateCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineRasterizationStateCreateInfo, STRUCT_CACHE_VkPipelineRasterizationStateCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineRasterizationStateCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x40);
} else {
this.memoryBuffer = new ArrayBuffer(0x40);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x40);
}
this._pNext = null;
this.sType = 0x17;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.depthClampEnable !== void 0) this.depthClampEnable = opts.depthClampEnable;
if (opts.rasterizerDiscardEnable !== void 0) this.rasterizerDiscardEnable = opts.rasterizerDiscardEnable;
if (opts.polygonMode !== void 0) this.polygonMode = opts.polygonMode;
if (opts.cullMode !== void 0) this.cullMode = opts.cullMode;
if (opts.frontFace !== void 0) this.frontFace = opts.frontFace;
if (opts.depthBiasEnable !== void 0) this.depthBiasEnable = opts.depthBiasEnable;
if (opts.depthBiasConstantFactor !== void 0) this.depthBiasConstantFactor = opts.depthBiasConstantFactor;
if (opts.depthBiasClamp !== void 0) this.depthBiasClamp = opts.depthBiasClamp;
if (opts.depthBiasSlopeFactor !== void 0) this.depthBiasSlopeFactor = opts.depthBiasSlopeFactor;
if (opts.lineWidth !== void 0) this.lineWidth = opts.lineWidth;
}
};
Object.defineProperties(VkPipelineRasterizationStateCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineRasterizationStateCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkPipelineRasterizationStateCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkPipelineRasterizationStateCreateInfo.pNext'");
switch (sType) {
case 0x3B9B1050:
case 0x3B9C5489:
case 0x3B9B3762:
case 0x3B9C5871:
case 0x3B9EBDB9:
break;
default:
throw new TypeError("Invalid type for 'VkPipelineRasterizationStateCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkPipelineRasterizationStateCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineRasterizationStateCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"depthClampEnable": {
get() {
return this.memoryView.getUint32(0x14, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x14, value | 0, true);
}
},
"rasterizerDiscardEnable": {
get() {
return this.memoryView.getUint32(0x18, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x18, value | 0, true);
}
},
"polygonMode": {
get() {
return this.memoryView.getInt32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineRasterizationStateCreateInfo.polygonMode");
if (!$VAL_R_VkPolygonMode(value)) {
throw new RangeError("Invalid value for 'VkPipelineRasterizationStateCreateInfo.polygonMode': '" + value + "' is not a value of 'VkPolygonMode'");
}
this.memoryView.setInt32(0x1C, value, true);
}
},
"cullMode": {
get() {
return this.memoryView.getInt32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineRasterizationStateCreateInfo.cullMode");
this.memoryView.setInt32(0x20, value, true);
}
},
"frontFace": {
get() {
return this.memoryView.getInt32(0x24, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineRasterizationStateCreateInfo.frontFace");
if (!$VAL_R_VkFrontFace(value)) {
throw new RangeError("Invalid value for 'VkPipelineRasterizationStateCreateInfo.frontFace': '" + value + "' is not a value of 'VkFrontFace'");
}
this.memoryView.setInt32(0x24, value, true);
}
},
"depthBiasEnable": {
get() {
return this.memoryView.getUint32(0x28, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x28, value | 0, true);
}
},
"depthBiasConstantFactor": {
get() {
return this.memoryView.getFloat32(0x2C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineRasterizationStateCreateInfo.depthBiasConstantFactor");
this.memoryView.setFloat32(0x2C, value, true);
}
},
"depthBiasClamp": {
get() {
return this.memoryView.getFloat32(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineRasterizationStateCreateInfo.depthBiasClamp");
this.memoryView.setFloat32(0x30, value, true);
}
},
"depthBiasSlopeFactor": {
get() {
return this.memoryView.getFloat32(0x34, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineRasterizationStateCreateInfo.depthBiasSlopeFactor");
this.memoryView.setFloat32(0x34, value, true);
}
},
"lineWidth": {
get() {
return this.memoryView.getFloat32(0x38, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineRasterizationStateCreateInfo.lineWidth");
this.memoryView.setFloat32(0x38, value, true);
}
},
});
VkPipelineRasterizationStateCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x40);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x40"], 0x0);
this._pNext = null;
this.sType = 0x17;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.depthClampEnable !== void 0) this.depthClampEnable = opts.depthClampEnable;
if (opts.rasterizerDiscardEnable !== void 0) this.rasterizerDiscardEnable = opts.rasterizerDiscardEnable;
if (opts.polygonMode !== void 0) this.polygonMode = opts.polygonMode;
if (opts.cullMode !== void 0) this.cullMode = opts.cullMode;
if (opts.frontFace !== void 0) this.frontFace = opts.frontFace;
if (opts.depthBiasEnable !== void 0) this.depthBiasEnable = opts.depthBiasEnable;
if (opts.depthBiasConstantFactor !== void 0) this.depthBiasConstantFactor = opts.depthBiasConstantFactor;
if (opts.depthBiasClamp !== void 0) this.depthBiasClamp = opts.depthBiasClamp;
if (opts.depthBiasSlopeFactor !== void 0) this.depthBiasSlopeFactor = opts.depthBiasSlopeFactor;
if (opts.lineWidth !== void 0) this.lineWidth = opts.lineWidth;
}
};
VkPipelineRasterizationStateCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkPipelineRasterizationStateCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineRasterizationStateCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineRasterizationStateCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.depthClampEnable = original.depthClampEnable;
copy.rasterizerDiscardEnable = original.rasterizerDiscardEnable;
copy.polygonMode = original.polygonMode;
copy.cullMode = original.cullMode;
copy.frontFace = original.frontFace;
copy.depthBiasEnable = original.depthBiasEnable;
copy.depthBiasConstantFactor = original.depthBiasConstantFactor;
copy.depthBiasClamp = original.depthBiasClamp;
copy.depthBiasSlopeFactor = original.depthBiasSlopeFactor;
copy.lineWidth = original.lineWidth;
return copy;
};
VkPipelineRasterizationStateCreateInfo.byteLength = 0x40;
VkPipelineRasterizationStateCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
depthClampEnable: {
byteOffset: 0x14,
byteLength: 0x4
},
rasterizerDiscardEnable: {
byteOffset: 0x18,
byteLength: 0x4
},
polygonMode: {
byteOffset: 0x1C,
byteLength: 0x4
},
cullMode: {
byteOffset: 0x20,
byteLength: 0x4
},
frontFace: {
byteOffset: 0x24,
byteLength: 0x4
},
depthBiasEnable: {
byteOffset: 0x28,
byteLength: 0x4
},
depthBiasConstantFactor: {
byteOffset: 0x2C,
byteLength: 0x4
},
depthBiasClamp: {
byteOffset: 0x30,
byteLength: 0x4
},
depthBiasSlopeFactor: {
byteOffset: 0x34,
byteLength: 0x4
},
lineWidth: {
byteOffset: 0x38,
byteLength: 0x4
},
};
/** VkPipelineMultisampleStateCreateInfo **/
function VkPipelineMultisampleStateCreateInfo(opts, byteOffset) {
if (new.target !== VkPipelineMultisampleStateCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineMultisampleStateCreateInfo, STRUCT_CACHE_VkPipelineMultisampleStateCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineMultisampleStateCreateInfo, STRUCT_CACHE_VkPipelineMultisampleStateCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineMultisampleStateCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x30);
} else {
this.memoryBuffer = new ArrayBuffer(0x30);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x30);
}
this._pNext = null;
this._pSampleMask = null;
this.sType = 0x18;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.rasterizationSamples !== void 0) this.rasterizationSamples = opts.rasterizationSamples;
if (opts.sampleShadingEnable !== void 0) this.sampleShadingEnable = opts.sampleShadingEnable;
if (opts.minSampleShading !== void 0) this.minSampleShading = opts.minSampleShading;
if (opts.pSampleMask !== void 0) this.pSampleMask = opts.pSampleMask;
if (opts.alphaToCoverageEnable !== void 0) this.alphaToCoverageEnable = opts.alphaToCoverageEnable;
if (opts.alphaToOneEnable !== void 0) this.alphaToOneEnable = opts.alphaToOneEnable;
}
};
Object.defineProperties(VkPipelineMultisampleStateCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineMultisampleStateCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkPipelineMultisampleStateCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkPipelineMultisampleStateCreateInfo.pNext'");
switch (sType) {
case 0x3B9D1008:
case 0x3B9CF89A:
case 0x3B9D1BC0:
case 0x3B9E9A91:
break;
default:
throw new TypeError("Invalid type for 'VkPipelineMultisampleStateCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkPipelineMultisampleStateCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineMultisampleStateCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"rasterizationSamples": {
get() {
return this.memoryView.getInt32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineMultisampleStateCreateInfo.rasterizationSamples");
this.memoryView.setInt32(0x14, value, true);
}
},
"sampleShadingEnable": {
get() {
return this.memoryView.getUint32(0x18, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x18, value | 0, true);
}
},
"minSampleShading": {
get() {
return this.memoryView.getFloat32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineMultisampleStateCreateInfo.minSampleShading");
this.memoryView.setFloat32(0x1C, value, true);
}
},
"pSampleMask": {
get() {
return this._pSampleMask;
},
set(value) {
if (value !== null && value.constructor === Uint32Array) {
this._pSampleMask = value;
this.memoryView.setBigInt64(0x20, getAddressFromArrayBuffer(value.buffer), true);
} else if (value === null) {
this._pSampleMask = null;
this.memoryView.setBigInt64(0x20, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkPipelineMultisampleStateCreateInfo.pSampleMask': Expected 'Uint32Array' but got '" + typeToString(value) + "'");
}
}
},
"alphaToCoverageEnable": {
get() {
return this.memoryView.getUint32(0x28, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x28, value | 0, true);
}
},
"alphaToOneEnable": {
get() {
return this.memoryView.getUint32(0x2C, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x2C, value | 0, true);
}
},
});
VkPipelineMultisampleStateCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x30);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x30"], 0x0);
this._pNext = null;
this._pSampleMask = null;
this.sType = 0x18;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.rasterizationSamples !== void 0) this.rasterizationSamples = opts.rasterizationSamples;
if (opts.sampleShadingEnable !== void 0) this.sampleShadingEnable = opts.sampleShadingEnable;
if (opts.minSampleShading !== void 0) this.minSampleShading = opts.minSampleShading;
if (opts.pSampleMask !== void 0) this.pSampleMask = opts.pSampleMask;
if (opts.alphaToCoverageEnable !== void 0) this.alphaToCoverageEnable = opts.alphaToCoverageEnable;
if (opts.alphaToOneEnable !== void 0) this.alphaToOneEnable = opts.alphaToOneEnable;
}
};
VkPipelineMultisampleStateCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkPipelineMultisampleStateCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineMultisampleStateCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineMultisampleStateCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.rasterizationSamples = original.rasterizationSamples;
copy.sampleShadingEnable = original.sampleShadingEnable;
copy.minSampleShading = original.minSampleShading;
if (original.pSampleMask !== null) {
copy.pSampleMask = new Uint32Array(original.pSampleMask);
}
copy.alphaToCoverageEnable = original.alphaToCoverageEnable;
copy.alphaToOneEnable = original.alphaToOneEnable;
return copy;
};
VkPipelineMultisampleStateCreateInfo.byteLength = 0x30;
VkPipelineMultisampleStateCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
rasterizationSamples: {
byteOffset: 0x14,
byteLength: 0x4
},
sampleShadingEnable: {
byteOffset: 0x18,
byteLength: 0x4
},
minSampleShading: {
byteOffset: 0x1C,
byteLength: 0x4
},
pSampleMask: {
byteOffset: 0x20,
byteLength: 0x8
},
alphaToCoverageEnable: {
byteOffset: 0x28,
byteLength: 0x4
},
alphaToOneEnable: {
byteOffset: 0x2C,
byteLength: 0x4
},
};
/** VkPipelineColorBlendAttachmentState **/
function VkPipelineColorBlendAttachmentState(opts, byteOffset) {
if (new.target !== VkPipelineColorBlendAttachmentState) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineColorBlendAttachmentState, STRUCT_CACHE_VkPipelineColorBlendAttachmentState);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineColorBlendAttachmentState, STRUCT_CACHE_VkPipelineColorBlendAttachmentState);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineColorBlendAttachmentState'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x20);
} else {
this.memoryBuffer = new ArrayBuffer(0x20);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x20);
}
if (typeof opts === "object") {
if (opts.blendEnable !== void 0) this.blendEnable = opts.blendEnable;
if (opts.srcColorBlendFactor !== void 0) this.srcColorBlendFactor = opts.srcColorBlendFactor;
if (opts.dstColorBlendFactor !== void 0) this.dstColorBlendFactor = opts.dstColorBlendFactor;
if (opts.colorBlendOp !== void 0) this.colorBlendOp = opts.colorBlendOp;
if (opts.srcAlphaBlendFactor !== void 0) this.srcAlphaBlendFactor = opts.srcAlphaBlendFactor;
if (opts.dstAlphaBlendFactor !== void 0) this.dstAlphaBlendFactor = opts.dstAlphaBlendFactor;
if (opts.alphaBlendOp !== void 0) this.alphaBlendOp = opts.alphaBlendOp;
if (opts.colorWriteMask !== void 0) this.colorWriteMask = opts.colorWriteMask;
}
};
Object.defineProperties(VkPipelineColorBlendAttachmentState.prototype, {
"blendEnable": {
get() {
return this.memoryView.getUint32(0x0, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x0, value | 0, true);
}
},
"srcColorBlendFactor": {
get() {
return this.memoryView.getInt32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineColorBlendAttachmentState.srcColorBlendFactor");
if (!$VAL_R_VkBlendFactor(value)) {
throw new RangeError("Invalid value for 'VkPipelineColorBlendAttachmentState.srcColorBlendFactor': '" + value + "' is not a value of 'VkBlendFactor'");
}
this.memoryView.setInt32(0x4, value, true);
}
},
"dstColorBlendFactor": {
get() {
return this.memoryView.getInt32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineColorBlendAttachmentState.dstColorBlendFactor");
if (!$VAL_R_VkBlendFactor(value)) {
throw new RangeError("Invalid value for 'VkPipelineColorBlendAttachmentState.dstColorBlendFactor': '" + value + "' is not a value of 'VkBlendFactor'");
}
this.memoryView.setInt32(0x8, value, true);
}
},
"colorBlendOp": {
get() {
return this.memoryView.getInt32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineColorBlendAttachmentState.colorBlendOp");
if (!$VAL_R_VkBlendOp(value)) {
throw new RangeError("Invalid value for 'VkPipelineColorBlendAttachmentState.colorBlendOp': '" + value + "' is not a value of 'VkBlendOp'");
}
this.memoryView.setInt32(0xC, value, true);
}
},
"srcAlphaBlendFactor": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineColorBlendAttachmentState.srcAlphaBlendFactor");
if (!$VAL_R_VkBlendFactor(value)) {
throw new RangeError("Invalid value for 'VkPipelineColorBlendAttachmentState.srcAlphaBlendFactor': '" + value + "' is not a value of 'VkBlendFactor'");
}
this.memoryView.setInt32(0x10, value, true);
}
},
"dstAlphaBlendFactor": {
get() {
return this.memoryView.getInt32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineColorBlendAttachmentState.dstAlphaBlendFactor");
if (!$VAL_R_VkBlendFactor(value)) {
throw new RangeError("Invalid value for 'VkPipelineColorBlendAttachmentState.dstAlphaBlendFactor': '" + value + "' is not a value of 'VkBlendFactor'");
}
this.memoryView.setInt32(0x14, value, true);
}
},
"alphaBlendOp": {
get() {
return this.memoryView.getInt32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineColorBlendAttachmentState.alphaBlendOp");
if (!$VAL_R_VkBlendOp(value)) {
throw new RangeError("Invalid value for 'VkPipelineColorBlendAttachmentState.alphaBlendOp': '" + value + "' is not a value of 'VkBlendOp'");
}
this.memoryView.setInt32(0x18, value, true);
}
},
"colorWriteMask": {
get() {
return this.memoryView.getInt32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineColorBlendAttachmentState.colorWriteMask");
this.memoryView.setInt32(0x1C, value, true);
}
},
});
VkPipelineColorBlendAttachmentState.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x20);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x20"], 0x0);
if (typeof opts === "object") {
if (opts.blendEnable !== void 0) this.blendEnable = opts.blendEnable;
if (opts.srcColorBlendFactor !== void 0) this.srcColorBlendFactor = opts.srcColorBlendFactor;
if (opts.dstColorBlendFactor !== void 0) this.dstColorBlendFactor = opts.dstColorBlendFactor;
if (opts.colorBlendOp !== void 0) this.colorBlendOp = opts.colorBlendOp;
if (opts.srcAlphaBlendFactor !== void 0) this.srcAlphaBlendFactor = opts.srcAlphaBlendFactor;
if (opts.dstAlphaBlendFactor !== void 0) this.dstAlphaBlendFactor = opts.dstAlphaBlendFactor;
if (opts.alphaBlendOp !== void 0) this.alphaBlendOp = opts.alphaBlendOp;
if (opts.colorWriteMask !== void 0) this.colorWriteMask = opts.colorWriteMask;
}
};
VkPipelineColorBlendAttachmentState.prototype.flush = function flush() {
return true;
};
VkPipelineColorBlendAttachmentState.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineColorBlendAttachmentState.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineColorBlendAttachmentState();
copy.blendEnable = original.blendEnable;
copy.srcColorBlendFactor = original.srcColorBlendFactor;
copy.dstColorBlendFactor = original.dstColorBlendFactor;
copy.colorBlendOp = original.colorBlendOp;
copy.srcAlphaBlendFactor = original.srcAlphaBlendFactor;
copy.dstAlphaBlendFactor = original.dstAlphaBlendFactor;
copy.alphaBlendOp = original.alphaBlendOp;
copy.colorWriteMask = original.colorWriteMask;
return copy;
};
VkPipelineColorBlendAttachmentState.byteLength = 0x20;
VkPipelineColorBlendAttachmentState.memoryLayout = {
blendEnable: {
byteOffset: 0x0,
byteLength: 0x4
},
srcColorBlendFactor: {
byteOffset: 0x4,
byteLength: 0x4
},
dstColorBlendFactor: {
byteOffset: 0x8,
byteLength: 0x4
},
colorBlendOp: {
byteOffset: 0xC,
byteLength: 0x4
},
srcAlphaBlendFactor: {
byteOffset: 0x10,
byteLength: 0x4
},
dstAlphaBlendFactor: {
byteOffset: 0x14,
byteLength: 0x4
},
alphaBlendOp: {
byteOffset: 0x18,
byteLength: 0x4
},
colorWriteMask: {
byteOffset: 0x1C,
byteLength: 0x4
},
};
/** VkPipelineColorBlendStateCreateInfo **/
function VkPipelineColorBlendStateCreateInfo(opts, byteOffset) {
if (new.target !== VkPipelineColorBlendStateCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineColorBlendStateCreateInfo, STRUCT_CACHE_VkPipelineColorBlendStateCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineColorBlendStateCreateInfo, STRUCT_CACHE_VkPipelineColorBlendStateCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineColorBlendStateCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x38);
} else {
this.memoryBuffer = new ArrayBuffer(0x38);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x38);
}
this._pNext = null;
this._pAttachments = null;
this._pAttachmentsNative = null;
this._blendConstants = [...Array(4)].fill(0x0);
this.sType = 0x1A;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.logicOpEnable !== void 0) this.logicOpEnable = opts.logicOpEnable;
if (opts.logicOp !== void 0) this.logicOp = opts.logicOp;
if (opts.attachmentCount !== void 0) this.attachmentCount = opts.attachmentCount;
if (opts.pAttachments !== void 0) this.pAttachments = opts.pAttachments;
if (opts.blendConstants !== void 0) this.blendConstants = opts.blendConstants;
}
};
Object.defineProperties(VkPipelineColorBlendStateCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineColorBlendStateCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkPipelineColorBlendStateCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkPipelineColorBlendStateCreateInfo.pNext'");
switch (sType) {
case 0x3B9D0C22:
break;
default:
throw new TypeError("Invalid type for 'VkPipelineColorBlendStateCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkPipelineColorBlendStateCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineColorBlendStateCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"logicOpEnable": {
get() {
return this.memoryView.getUint32(0x14, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x14, value | 0, true);
}
},
"logicOp": {
get() {
return this.memoryView.getInt32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineColorBlendStateCreateInfo.logicOp");
if (!$VAL_R_VkLogicOp(value)) {
throw new RangeError("Invalid value for 'VkPipelineColorBlendStateCreateInfo.logicOp': '" + value + "' is not a value of 'VkLogicOp'");
}
this.memoryView.setInt32(0x18, value, true);
}
},
"attachmentCount": {
get() {
return this.memoryView.getUint32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineColorBlendStateCreateInfo.attachmentCount");
this.memoryView.setUint32(0x1C, value, true);
}
},
"pAttachments": {
get() {
if (this._pAttachments === null && this.memoryView.getBigInt64(0x20, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x20, true);
let array = decodeNativeArrayOfObjects(addr, this.attachmentCount, VkPipelineColorBlendAttachmentState);
this._pAttachments = array;
return this.pAttachments;
} else {
return this._pAttachments;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pAttachments = value;
} else if (value === null) {
this._pAttachments = null;
} else {
throw new TypeError("Invalid type for 'VkPipelineColorBlendStateCreateInfo.pAttachments': Expected 'Array VkPipelineColorBlendAttachmentState' but got '" + typeToString(value) + "'");
}
}
},
"blendConstants": {
get() {
return this._blendConstants;
},
set(value) {
if (value !== null && value.constructor === Array) {
this._blendConstants = value;
} else if (value === null) {
this._blendConstants = null;
} else {
throw new TypeError("Invalid type for 'VkPipelineColorBlendStateCreateInfo.blendConstants': Expected 'Array float' but got '" + typeToString(value) + "'");
}
}
},
});
VkPipelineColorBlendStateCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x38);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x38"], 0x0);
this._pNext = null;
this._pAttachments = null;
this._pAttachmentsNative = null;
if (this._blendConstants !== null) this._blendConstants.fill(0x0);
else this._blendConstants = [...Array(4)].fill(0x0);
this.sType = 0x1A;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.logicOpEnable !== void 0) this.logicOpEnable = opts.logicOpEnable;
if (opts.logicOp !== void 0) this.logicOp = opts.logicOp;
if (opts.attachmentCount !== void 0) this.attachmentCount = opts.attachmentCount;
if (opts.pAttachments !== void 0) this.pAttachments = opts.pAttachments;
if (opts.blendConstants !== void 0) this.blendConstants = opts.blendConstants;
}
};
VkPipelineColorBlendStateCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pAttachments !== null) {
let array = this._pAttachments;
if (array.length !== this.attachmentCount) {
throw new RangeError("Invalid array length, expected length of 'attachmentCount' for 'VkPipelineColorBlendStateCreateInfo.pAttachments'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkPipelineColorBlendAttachmentState)) {
throw new TypeError("Invalid type for 'VkPipelineColorBlendStateCreateInfo.pAttachments[" + ii + "]': Expected 'VkPipelineColorBlendAttachmentState' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pAttachmentsNative = nativeArray;
this.memoryView.setBigInt64(0x20, nativeArray.address, true);
} else {
this._pAttachmentsNative = null;
this.memoryView.setBigInt64(0x20, BI0, true);
}
}
if (this._blendConstants !== null) {
let array = this._blendConstants;
// validate length
if (array.length !== 4) {
throw new RangeError("Invalid array length, expected length of '4' for 'VkPipelineColorBlendStateCreateInfo.blendConstants'");
return false;
}
// validate type
for (let ii = 0; ii < array.length; ++ii) {
if (typeof (array[ii]) !== "number") {
throw new TypeError("Invalid type for 'VkPipelineColorBlendStateCreateInfo.blendConstants[" + ii + "]': Expected 'Number' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
for (let ii = 0; ii < array.length; ++ii) {
this.memoryView.setFloat32(0x28 + ii, array[ii], true);
};
} else {
this.memoryView.setFloat32(0x28, 0x0, true);
}
return true;
};
VkPipelineColorBlendStateCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineColorBlendStateCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineColorBlendStateCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.logicOpEnable = original.logicOpEnable;
copy.logicOp = original.logicOp;
copy.attachmentCount = original.attachmentCount;
if (original.pAttachments !== null) {
copy.pAttachments = [...Array(original.pAttachments.length)].map((v, i) => {
return original.pAttachments[i].constructor.createCopyFrom(original.pAttachments[i]);
});
}
if (original.blendConstants !== null) {
copy.blendConstants = [...Array(original.blendConstants.length)].map((v, i) => {
return original.blendConstants[i];
});
}
return copy;
};
VkPipelineColorBlendStateCreateInfo.byteLength = 0x38;
VkPipelineColorBlendStateCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
logicOpEnable: {
byteOffset: 0x14,
byteLength: 0x4
},
logicOp: {
byteOffset: 0x18,
byteLength: 0x4
},
attachmentCount: {
byteOffset: 0x1C,
byteLength: 0x4
},
pAttachments: {
byteOffset: 0x20,
byteLength: 0x8
},
blendConstants: {
byteOffset: 0x28,
byteLength: 0x10
},
};
/** VkPipelineDynamicStateCreateInfo **/
function VkPipelineDynamicStateCreateInfo(opts, byteOffset) {
if (new.target !== VkPipelineDynamicStateCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineDynamicStateCreateInfo, STRUCT_CACHE_VkPipelineDynamicStateCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineDynamicStateCreateInfo, STRUCT_CACHE_VkPipelineDynamicStateCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineDynamicStateCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x20);
} else {
this.memoryBuffer = new ArrayBuffer(0x20);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x20);
}
this._pNext = null;
this._pDynamicStates = null;
this.sType = 0x1B;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.dynamicStateCount !== void 0) this.dynamicStateCount = opts.dynamicStateCount;
if (opts.pDynamicStates !== void 0) this.pDynamicStates = opts.pDynamicStates;
}
};
Object.defineProperties(VkPipelineDynamicStateCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineDynamicStateCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkPipelineDynamicStateCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkPipelineDynamicStateCreateInfo.pNext' isn't allowed to be filled");
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineDynamicStateCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"dynamicStateCount": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineDynamicStateCreateInfo.dynamicStateCount");
this.memoryView.setUint32(0x14, value, true);
}
},
"pDynamicStates": {
get() {
return this._pDynamicStates;
},
set(value) {
if (value !== null && value.constructor === Int32Array) {
this._pDynamicStates = value;
this.memoryView.setBigInt64(0x18, getAddressFromArrayBuffer(value.buffer), true);
} else if (value === null) {
this._pDynamicStates = null;
this.memoryView.setBigInt64(0x18, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkPipelineDynamicStateCreateInfo.pDynamicStates': Expected 'Int32Array' but got '" + typeToString(value) + "'");
}
}
},
});
VkPipelineDynamicStateCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x20);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x20"], 0x0);
this._pNext = null;
this._pDynamicStates = null;
this.sType = 0x1B;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.dynamicStateCount !== void 0) this.dynamicStateCount = opts.dynamicStateCount;
if (opts.pDynamicStates !== void 0) this.pDynamicStates = opts.pDynamicStates;
}
};
VkPipelineDynamicStateCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkPipelineDynamicStateCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineDynamicStateCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineDynamicStateCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.dynamicStateCount = original.dynamicStateCount;
if (original.pDynamicStates !== null) {
copy.pDynamicStates = new Int32Array(original.pDynamicStates);
}
return copy;
};
VkPipelineDynamicStateCreateInfo.byteLength = 0x20;
VkPipelineDynamicStateCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
dynamicStateCount: {
byteOffset: 0x14,
byteLength: 0x4
},
pDynamicStates: {
byteOffset: 0x18,
byteLength: 0x8
},
};
/** VkStencilOpState **/
function VkStencilOpState(opts, byteOffset) {
if (new.target !== VkStencilOpState) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkStencilOpState, STRUCT_CACHE_VkStencilOpState);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkStencilOpState, STRUCT_CACHE_VkStencilOpState);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkStencilOpState'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x1C);
} else {
this.memoryBuffer = new ArrayBuffer(0x1C);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x1C);
}
if (typeof opts === "object") {
if (opts.failOp !== void 0) this.failOp = opts.failOp;
if (opts.passOp !== void 0) this.passOp = opts.passOp;
if (opts.depthFailOp !== void 0) this.depthFailOp = opts.depthFailOp;
if (opts.compareOp !== void 0) this.compareOp = opts.compareOp;
if (opts.compareMask !== void 0) this.compareMask = opts.compareMask;
if (opts.writeMask !== void 0) this.writeMask = opts.writeMask;
if (opts.reference !== void 0) this.reference = opts.reference;
}
};
Object.defineProperties(VkStencilOpState.prototype, {
"failOp": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkStencilOpState.failOp");
if (!$VAL_R_VkStencilOp(value)) {
throw new RangeError("Invalid value for 'VkStencilOpState.failOp': '" + value + "' is not a value of 'VkStencilOp'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"passOp": {
get() {
return this.memoryView.getInt32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkStencilOpState.passOp");
if (!$VAL_R_VkStencilOp(value)) {
throw new RangeError("Invalid value for 'VkStencilOpState.passOp': '" + value + "' is not a value of 'VkStencilOp'");
}
this.memoryView.setInt32(0x4, value, true);
}
},
"depthFailOp": {
get() {
return this.memoryView.getInt32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkStencilOpState.depthFailOp");
if (!$VAL_R_VkStencilOp(value)) {
throw new RangeError("Invalid value for 'VkStencilOpState.depthFailOp': '" + value + "' is not a value of 'VkStencilOp'");
}
this.memoryView.setInt32(0x8, value, true);
}
},
"compareOp": {
get() {
return this.memoryView.getInt32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkStencilOpState.compareOp");
if (!$VAL_R_VkCompareOp(value)) {
throw new RangeError("Invalid value for 'VkStencilOpState.compareOp': '" + value + "' is not a value of 'VkCompareOp'");
}
this.memoryView.setInt32(0xC, value, true);
}
},
"compareMask": {
get() {
return this.memoryView.getUint32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkStencilOpState.compareMask");
this.memoryView.setUint32(0x10, value, true);
}
},
"writeMask": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkStencilOpState.writeMask");
this.memoryView.setUint32(0x14, value, true);
}
},
"reference": {
get() {
return this.memoryView.getUint32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkStencilOpState.reference");
this.memoryView.setUint32(0x18, value, true);
}
},
});
VkStencilOpState.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x1C);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x1C"], 0x0);
if (typeof opts === "object") {
if (opts.failOp !== void 0) this.failOp = opts.failOp;
if (opts.passOp !== void 0) this.passOp = opts.passOp;
if (opts.depthFailOp !== void 0) this.depthFailOp = opts.depthFailOp;
if (opts.compareOp !== void 0) this.compareOp = opts.compareOp;
if (opts.compareMask !== void 0) this.compareMask = opts.compareMask;
if (opts.writeMask !== void 0) this.writeMask = opts.writeMask;
if (opts.reference !== void 0) this.reference = opts.reference;
}
};
VkStencilOpState.prototype.flush = function flush() {
return true;
};
VkStencilOpState.prototype.reflect = function reflect(memoryAddress) {
};
VkStencilOpState.createCopyFrom = function createCopyFrom(original) {
let copy = new VkStencilOpState();
copy.failOp = original.failOp;
copy.passOp = original.passOp;
copy.depthFailOp = original.depthFailOp;
copy.compareOp = original.compareOp;
copy.compareMask = original.compareMask;
copy.writeMask = original.writeMask;
copy.reference = original.reference;
return copy;
};
VkStencilOpState.byteLength = 0x1C;
VkStencilOpState.memoryLayout = {
failOp: {
byteOffset: 0x0,
byteLength: 0x4
},
passOp: {
byteOffset: 0x4,
byteLength: 0x4
},
depthFailOp: {
byteOffset: 0x8,
byteLength: 0x4
},
compareOp: {
byteOffset: 0xC,
byteLength: 0x4
},
compareMask: {
byteOffset: 0x10,
byteLength: 0x4
},
writeMask: {
byteOffset: 0x14,
byteLength: 0x4
},
reference: {
byteOffset: 0x18,
byteLength: 0x4
},
};
/** VkPipelineDepthStencilStateCreateInfo **/
function VkPipelineDepthStencilStateCreateInfo(opts, byteOffset) {
if (new.target !== VkPipelineDepthStencilStateCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineDepthStencilStateCreateInfo, STRUCT_CACHE_VkPipelineDepthStencilStateCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineDepthStencilStateCreateInfo, STRUCT_CACHE_VkPipelineDepthStencilStateCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineDepthStencilStateCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x68);
} else {
this.memoryBuffer = new ArrayBuffer(0x68);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x68);
}
this._pNext = null;
this._front = new VkStencilOpState({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x28 });
this._back = new VkStencilOpState({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x44 });
this.sType = 0x19;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.depthTestEnable !== void 0) this.depthTestEnable = opts.depthTestEnable;
if (opts.depthWriteEnable !== void 0) this.depthWriteEnable = opts.depthWriteEnable;
if (opts.depthCompareOp !== void 0) this.depthCompareOp = opts.depthCompareOp;
if (opts.depthBoundsTestEnable !== void 0) this.depthBoundsTestEnable = opts.depthBoundsTestEnable;
if (opts.stencilTestEnable !== void 0) this.stencilTestEnable = opts.stencilTestEnable;
if (opts.front !== void 0) this.front = opts.front;
if (opts.back !== void 0) this.back = opts.back;
if (opts.minDepthBounds !== void 0) this.minDepthBounds = opts.minDepthBounds;
if (opts.maxDepthBounds !== void 0) this.maxDepthBounds = opts.maxDepthBounds;
}
};
Object.defineProperties(VkPipelineDepthStencilStateCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineDepthStencilStateCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkPipelineDepthStencilStateCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkPipelineDepthStencilStateCreateInfo.pNext' isn't allowed to be filled");
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineDepthStencilStateCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"depthTestEnable": {
get() {
return this.memoryView.getUint32(0x14, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x14, value | 0, true);
}
},
"depthWriteEnable": {
get() {
return this.memoryView.getUint32(0x18, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x18, value | 0, true);
}
},
"depthCompareOp": {
get() {
return this.memoryView.getInt32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineDepthStencilStateCreateInfo.depthCompareOp");
if (!$VAL_R_VkCompareOp(value)) {
throw new RangeError("Invalid value for 'VkPipelineDepthStencilStateCreateInfo.depthCompareOp': '" + value + "' is not a value of 'VkCompareOp'");
}
this.memoryView.setInt32(0x1C, value, true);
}
},
"depthBoundsTestEnable": {
get() {
return this.memoryView.getUint32(0x20, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x20, value | 0, true);
}
},
"stencilTestEnable": {
get() {
return this.memoryView.getUint32(0x24, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x24, value | 0, true);
}
},
"front": {
get() {
return this._front;
},
set(value) {
if (value !== null && value.constructor === VkStencilOpState) {
value.flush();
this._front = value;
} else if (value === null) {
this._front = null;
} else {
throw new TypeError("Invalid type for 'VkPipelineDepthStencilStateCreateInfo.front': Expected 'VkStencilOpState' but got '" + typeToString(value) + "'");
}
}
},
"back": {
get() {
return this._back;
},
set(value) {
if (value !== null && value.constructor === VkStencilOpState) {
value.flush();
this._back = value;
} else if (value === null) {
this._back = null;
} else {
throw new TypeError("Invalid type for 'VkPipelineDepthStencilStateCreateInfo.back': Expected 'VkStencilOpState' but got '" + typeToString(value) + "'");
}
}
},
"minDepthBounds": {
get() {
return this.memoryView.getFloat32(0x60, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineDepthStencilStateCreateInfo.minDepthBounds");
this.memoryView.setFloat32(0x60, value, true);
}
},
"maxDepthBounds": {
get() {
return this.memoryView.getFloat32(0x64, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineDepthStencilStateCreateInfo.maxDepthBounds");
this.memoryView.setFloat32(0x64, value, true);
}
},
});
VkPipelineDepthStencilStateCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x68);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x68"], 0x0);
this._pNext = null;
if (this._front !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._front.memoryBuffer) this._front = new VkStencilOpState({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x28 });
else this._front.reset();
}
if (this._back !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._back.memoryBuffer) this._back = new VkStencilOpState({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x44 });
else this._back.reset();
}
this.sType = 0x19;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.depthTestEnable !== void 0) this.depthTestEnable = opts.depthTestEnable;
if (opts.depthWriteEnable !== void 0) this.depthWriteEnable = opts.depthWriteEnable;
if (opts.depthCompareOp !== void 0) this.depthCompareOp = opts.depthCompareOp;
if (opts.depthBoundsTestEnable !== void 0) this.depthBoundsTestEnable = opts.depthBoundsTestEnable;
if (opts.stencilTestEnable !== void 0) this.stencilTestEnable = opts.stencilTestEnable;
if (opts.front !== void 0) this.front = opts.front;
if (opts.back !== void 0) this.back = opts.back;
if (opts.minDepthBounds !== void 0) this.minDepthBounds = opts.minDepthBounds;
if (opts.maxDepthBounds !== void 0) this.maxDepthBounds = opts.maxDepthBounds;
}
};
VkPipelineDepthStencilStateCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._front !== null) {
let front = this._front;
front.flush();
if (this.memoryBuffer !== front.memoryBuffer) {
let srcView = new Uint8Array(front.memoryBuffer, front.$memoryOffset, 0x1C);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x28);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkPipelineDepthStencilStateCreateInfo.front' isn't used as shared-memory");
}
}
if (this._back !== null) {
let back = this._back;
back.flush();
if (this.memoryBuffer !== back.memoryBuffer) {
let srcView = new Uint8Array(back.memoryBuffer, back.$memoryOffset, 0x1C);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x44);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkPipelineDepthStencilStateCreateInfo.back' isn't used as shared-memory");
}
}
return true;
};
VkPipelineDepthStencilStateCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineDepthStencilStateCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineDepthStencilStateCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.depthTestEnable = original.depthTestEnable;
copy.depthWriteEnable = original.depthWriteEnable;
copy.depthCompareOp = original.depthCompareOp;
copy.depthBoundsTestEnable = original.depthBoundsTestEnable;
copy.stencilTestEnable = original.stencilTestEnable;
if (original.front !== null) {
copy.front = original.front.constructor.createCopyFrom(original.front);
}
if (original.back !== null) {
copy.back = original.back.constructor.createCopyFrom(original.back);
}
copy.minDepthBounds = original.minDepthBounds;
copy.maxDepthBounds = original.maxDepthBounds;
return copy;
};
VkPipelineDepthStencilStateCreateInfo.byteLength = 0x68;
VkPipelineDepthStencilStateCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
depthTestEnable: {
byteOffset: 0x14,
byteLength: 0x4
},
depthWriteEnable: {
byteOffset: 0x18,
byteLength: 0x4
},
depthCompareOp: {
byteOffset: 0x1C,
byteLength: 0x4
},
depthBoundsTestEnable: {
byteOffset: 0x20,
byteLength: 0x4
},
stencilTestEnable: {
byteOffset: 0x24,
byteLength: 0x4
},
front: {
byteOffset: 0x28,
byteLength: 0x1C
},
back: {
byteOffset: 0x44,
byteLength: 0x1C
},
minDepthBounds: {
byteOffset: 0x60,
byteLength: 0x4
},
maxDepthBounds: {
byteOffset: 0x64,
byteLength: 0x4
},
};
/** VkGraphicsPipelineCreateInfo **/
function VkGraphicsPipelineCreateInfo(opts, byteOffset) {
if (new.target !== VkGraphicsPipelineCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkGraphicsPipelineCreateInfo, STRUCT_CACHE_VkGraphicsPipelineCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkGraphicsPipelineCreateInfo, STRUCT_CACHE_VkGraphicsPipelineCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkGraphicsPipelineCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x90);
} else {
this.memoryBuffer = new ArrayBuffer(0x90);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x90);
}
this._pNext = null;
this._pStages = null;
this._pStagesNative = null;
this._pVertexInputState = null;
this._pInputAssemblyState = null;
this._pTessellationState = null;
this._pViewportState = null;
this._pRasterizationState = null;
this._pMultisampleState = null;
this._pDepthStencilState = null;
this._pColorBlendState = null;
this._pDynamicState = null;
this._layout = null;
this._renderPass = null;
this._basePipelineHandle = null;
this.sType = 0x1C;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.stageCount !== void 0) this.stageCount = opts.stageCount;
if (opts.pStages !== void 0) this.pStages = opts.pStages;
if (opts.pVertexInputState !== void 0) this.pVertexInputState = opts.pVertexInputState;
if (opts.pInputAssemblyState !== void 0) this.pInputAssemblyState = opts.pInputAssemblyState;
if (opts.pTessellationState !== void 0) this.pTessellationState = opts.pTessellationState;
if (opts.pViewportState !== void 0) this.pViewportState = opts.pViewportState;
if (opts.pRasterizationState !== void 0) this.pRasterizationState = opts.pRasterizationState;
if (opts.pMultisampleState !== void 0) this.pMultisampleState = opts.pMultisampleState;
if (opts.pDepthStencilState !== void 0) this.pDepthStencilState = opts.pDepthStencilState;
if (opts.pColorBlendState !== void 0) this.pColorBlendState = opts.pColorBlendState;
if (opts.pDynamicState !== void 0) this.pDynamicState = opts.pDynamicState;
if (opts.layout !== void 0) this.layout = opts.layout;
if (opts.renderPass !== void 0) this.renderPass = opts.renderPass;
if (opts.subpass !== void 0) this.subpass = opts.subpass;
if (opts.basePipelineHandle !== void 0) this.basePipelineHandle = opts.basePipelineHandle;
if (opts.basePipelineIndex !== void 0) this.basePipelineIndex = opts.basePipelineIndex;
}
};
Object.defineProperties(VkGraphicsPipelineCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkGraphicsPipelineCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkGraphicsPipelineCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pNext'");
switch (sType) {
case 0x3B9C4CB9:
case 0x3B9D5271:
case 0x3B9DB800:
case 0x3B9D94D8:
break;
default:
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkGraphicsPipelineCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"stageCount": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkGraphicsPipelineCreateInfo.stageCount");
this.memoryView.setUint32(0x14, value, true);
}
},
"pStages": {
get() {
if (this._pStages === null && this.memoryView.getBigInt64(0x18, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x18, true);
let array = decodeNativeArrayOfObjects(addr, this.stageCount, VkPipelineShaderStageCreateInfo);
this._pStages = array;
return this.pStages;
} else {
return this._pStages;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pStages = value;
} else if (value === null) {
this._pStages = null;
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pStages': Expected 'Array VkPipelineShaderStageCreateInfo' but got '" + typeToString(value) + "'");
}
}
},
"pVertexInputState": {
get() {
if (this._pVertexInputState === null && this.memoryView.getBigInt64(0x20, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x20, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkPipelineVertexInputStateCreateInfo.byteLength));
this._pVertexInputState = new VkPipelineVertexInputStateCreateInfo({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x20, this._pVertexInputState.memoryAddress, true);
return this.pVertexInputState;
} else {
return this._pVertexInputState;
}
},
set(value) {
if (value !== null && value.constructor === VkPipelineVertexInputStateCreateInfo) {
value.flush();
this._pVertexInputState = value;
this.memoryView.setBigInt64(0x20, value.memoryAddress, true);
} else if (value === null) {
this._pVertexInputState = null;
this.memoryView.setBigInt64(0x20, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pVertexInputState': Expected 'VkPipelineVertexInputStateCreateInfo' but got '" + typeToString(value) + "'");
}
}
},
"pInputAssemblyState": {
get() {
if (this._pInputAssemblyState === null && this.memoryView.getBigInt64(0x28, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x28, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkPipelineInputAssemblyStateCreateInfo.byteLength));
this._pInputAssemblyState = new VkPipelineInputAssemblyStateCreateInfo({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x28, this._pInputAssemblyState.memoryAddress, true);
return this.pInputAssemblyState;
} else {
return this._pInputAssemblyState;
}
},
set(value) {
if (value !== null && value.constructor === VkPipelineInputAssemblyStateCreateInfo) {
value.flush();
this._pInputAssemblyState = value;
this.memoryView.setBigInt64(0x28, value.memoryAddress, true);
} else if (value === null) {
this._pInputAssemblyState = null;
this.memoryView.setBigInt64(0x28, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pInputAssemblyState': Expected 'VkPipelineInputAssemblyStateCreateInfo' but got '" + typeToString(value) + "'");
}
}
},
"pTessellationState": {
get() {
if (this._pTessellationState === null && this.memoryView.getBigInt64(0x30, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x30, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkPipelineTessellationStateCreateInfo.byteLength));
this._pTessellationState = new VkPipelineTessellationStateCreateInfo({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x30, this._pTessellationState.memoryAddress, true);
return this.pTessellationState;
} else {
return this._pTessellationState;
}
},
set(value) {
if (value !== null && value.constructor === VkPipelineTessellationStateCreateInfo) {
value.flush();
this._pTessellationState = value;
this.memoryView.setBigInt64(0x30, value.memoryAddress, true);
} else if (value === null) {
this._pTessellationState = null;
this.memoryView.setBigInt64(0x30, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pTessellationState': Expected 'VkPipelineTessellationStateCreateInfo' but got '" + typeToString(value) + "'");
}
}
},
"pViewportState": {
get() {
if (this._pViewportState === null && this.memoryView.getBigInt64(0x38, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x38, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkPipelineViewportStateCreateInfo.byteLength));
this._pViewportState = new VkPipelineViewportStateCreateInfo({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x38, this._pViewportState.memoryAddress, true);
return this.pViewportState;
} else {
return this._pViewportState;
}
},
set(value) {
if (value !== null && value.constructor === VkPipelineViewportStateCreateInfo) {
value.flush();
this._pViewportState = value;
this.memoryView.setBigInt64(0x38, value.memoryAddress, true);
} else if (value === null) {
this._pViewportState = null;
this.memoryView.setBigInt64(0x38, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pViewportState': Expected 'VkPipelineViewportStateCreateInfo' but got '" + typeToString(value) + "'");
}
}
},
"pRasterizationState": {
get() {
if (this._pRasterizationState === null && this.memoryView.getBigInt64(0x40, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x40, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkPipelineRasterizationStateCreateInfo.byteLength));
this._pRasterizationState = new VkPipelineRasterizationStateCreateInfo({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x40, this._pRasterizationState.memoryAddress, true);
return this.pRasterizationState;
} else {
return this._pRasterizationState;
}
},
set(value) {
if (value !== null && value.constructor === VkPipelineRasterizationStateCreateInfo) {
value.flush();
this._pRasterizationState = value;
this.memoryView.setBigInt64(0x40, value.memoryAddress, true);
} else if (value === null) {
this._pRasterizationState = null;
this.memoryView.setBigInt64(0x40, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pRasterizationState': Expected 'VkPipelineRasterizationStateCreateInfo' but got '" + typeToString(value) + "'");
}
}
},
"pMultisampleState": {
get() {
if (this._pMultisampleState === null && this.memoryView.getBigInt64(0x48, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x48, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkPipelineMultisampleStateCreateInfo.byteLength));
this._pMultisampleState = new VkPipelineMultisampleStateCreateInfo({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x48, this._pMultisampleState.memoryAddress, true);
return this.pMultisampleState;
} else {
return this._pMultisampleState;
}
},
set(value) {
if (value !== null && value.constructor === VkPipelineMultisampleStateCreateInfo) {
value.flush();
this._pMultisampleState = value;
this.memoryView.setBigInt64(0x48, value.memoryAddress, true);
} else if (value === null) {
this._pMultisampleState = null;
this.memoryView.setBigInt64(0x48, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pMultisampleState': Expected 'VkPipelineMultisampleStateCreateInfo' but got '" + typeToString(value) + "'");
}
}
},
"pDepthStencilState": {
get() {
if (this._pDepthStencilState === null && this.memoryView.getBigInt64(0x50, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x50, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkPipelineDepthStencilStateCreateInfo.byteLength));
this._pDepthStencilState = new VkPipelineDepthStencilStateCreateInfo({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x50, this._pDepthStencilState.memoryAddress, true);
return this.pDepthStencilState;
} else {
return this._pDepthStencilState;
}
},
set(value) {
if (value !== null && value.constructor === VkPipelineDepthStencilStateCreateInfo) {
value.flush();
this._pDepthStencilState = value;
this.memoryView.setBigInt64(0x50, value.memoryAddress, true);
} else if (value === null) {
this._pDepthStencilState = null;
this.memoryView.setBigInt64(0x50, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pDepthStencilState': Expected 'VkPipelineDepthStencilStateCreateInfo' but got '" + typeToString(value) + "'");
}
}
},
"pColorBlendState": {
get() {
if (this._pColorBlendState === null && this.memoryView.getBigInt64(0x58, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x58, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkPipelineColorBlendStateCreateInfo.byteLength));
this._pColorBlendState = new VkPipelineColorBlendStateCreateInfo({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x58, this._pColorBlendState.memoryAddress, true);
return this.pColorBlendState;
} else {
return this._pColorBlendState;
}
},
set(value) {
if (value !== null && value.constructor === VkPipelineColorBlendStateCreateInfo) {
value.flush();
this._pColorBlendState = value;
this.memoryView.setBigInt64(0x58, value.memoryAddress, true);
} else if (value === null) {
this._pColorBlendState = null;
this.memoryView.setBigInt64(0x58, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pColorBlendState': Expected 'VkPipelineColorBlendStateCreateInfo' but got '" + typeToString(value) + "'");
}
}
},
"pDynamicState": {
get() {
if (this._pDynamicState === null && this.memoryView.getBigInt64(0x60, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x60, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkPipelineDynamicStateCreateInfo.byteLength));
this._pDynamicState = new VkPipelineDynamicStateCreateInfo({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x60, this._pDynamicState.memoryAddress, true);
return this.pDynamicState;
} else {
return this._pDynamicState;
}
},
set(value) {
if (value !== null && value.constructor === VkPipelineDynamicStateCreateInfo) {
value.flush();
this._pDynamicState = value;
this.memoryView.setBigInt64(0x60, value.memoryAddress, true);
} else if (value === null) {
this._pDynamicState = null;
this.memoryView.setBigInt64(0x60, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pDynamicState': Expected 'VkPipelineDynamicStateCreateInfo' but got '" + typeToString(value) + "'");
}
}
},
"layout": {
get() {
return this._layout;
},
set(value) {
if (value !== null && value.constructor === VkPipelineLayout) {
this._layout = value;
this.memoryView.setBigInt64(0x68, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._layout = null;
this.memoryView.setBigInt64(0x68, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.layout': Expected 'VkPipelineLayout' but got '" + typeToString(value) + "'");
}
}
},
"renderPass": {
get() {
return this._renderPass;
},
set(value) {
if (value !== null && value.constructor === VkRenderPass) {
this._renderPass = value;
this.memoryView.setBigInt64(0x70, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._renderPass = null;
this.memoryView.setBigInt64(0x70, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.renderPass': Expected 'VkRenderPass' but got '" + typeToString(value) + "'");
}
}
},
"subpass": {
get() {
return this.memoryView.getUint32(0x78, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkGraphicsPipelineCreateInfo.subpass");
this.memoryView.setUint32(0x78, value, true);
}
},
"basePipelineHandle": {
get() {
return this._basePipelineHandle;
},
set(value) {
if (value !== null && value.constructor === VkPipeline) {
this._basePipelineHandle = value;
this.memoryView.setBigInt64(0x80, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._basePipelineHandle = null;
this.memoryView.setBigInt64(0x80, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.basePipelineHandle': Expected 'VkPipeline' but got '" + typeToString(value) + "'");
}
}
},
"basePipelineIndex": {
get() {
return this.memoryView.getInt32(0x88, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkGraphicsPipelineCreateInfo.basePipelineIndex");
this.memoryView.setInt32(0x88, value, true);
}
},
});
VkGraphicsPipelineCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x90);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x90"], 0x0);
this._pNext = null;
this._pStages = null;
this._pStagesNative = null;
this._pVertexInputState = null;
this._pInputAssemblyState = null;
this._pTessellationState = null;
this._pViewportState = null;
this._pRasterizationState = null;
this._pMultisampleState = null;
this._pDepthStencilState = null;
this._pColorBlendState = null;
this._pDynamicState = null;
this._layout = null;
this._renderPass = null;
this._basePipelineHandle = null;
this.sType = 0x1C;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.stageCount !== void 0) this.stageCount = opts.stageCount;
if (opts.pStages !== void 0) this.pStages = opts.pStages;
if (opts.pVertexInputState !== void 0) this.pVertexInputState = opts.pVertexInputState;
if (opts.pInputAssemblyState !== void 0) this.pInputAssemblyState = opts.pInputAssemblyState;
if (opts.pTessellationState !== void 0) this.pTessellationState = opts.pTessellationState;
if (opts.pViewportState !== void 0) this.pViewportState = opts.pViewportState;
if (opts.pRasterizationState !== void 0) this.pRasterizationState = opts.pRasterizationState;
if (opts.pMultisampleState !== void 0) this.pMultisampleState = opts.pMultisampleState;
if (opts.pDepthStencilState !== void 0) this.pDepthStencilState = opts.pDepthStencilState;
if (opts.pColorBlendState !== void 0) this.pColorBlendState = opts.pColorBlendState;
if (opts.pDynamicState !== void 0) this.pDynamicState = opts.pDynamicState;
if (opts.layout !== void 0) this.layout = opts.layout;
if (opts.renderPass !== void 0) this.renderPass = opts.renderPass;
if (opts.subpass !== void 0) this.subpass = opts.subpass;
if (opts.basePipelineHandle !== void 0) this.basePipelineHandle = opts.basePipelineHandle;
if (opts.basePipelineIndex !== void 0) this.basePipelineIndex = opts.basePipelineIndex;
}
};
VkGraphicsPipelineCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pStages !== null) {
let array = this._pStages;
if (array.length !== this.stageCount) {
throw new RangeError("Invalid array length, expected length of 'stageCount' for 'VkGraphicsPipelineCreateInfo.pStages'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkPipelineShaderStageCreateInfo)) {
throw new TypeError("Invalid type for 'VkGraphicsPipelineCreateInfo.pStages[" + ii + "]': Expected 'VkPipelineShaderStageCreateInfo' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pStagesNative = nativeArray;
this.memoryView.setBigInt64(0x18, nativeArray.address, true);
} else {
this._pStagesNative = null;
this.memoryView.setBigInt64(0x18, BI0, true);
}
}
return true;
};
VkGraphicsPipelineCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkGraphicsPipelineCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkGraphicsPipelineCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.stageCount = original.stageCount;
if (original.pStages !== null) {
copy.pStages = [...Array(original.pStages.length)].map((v, i) => {
return original.pStages[i].constructor.createCopyFrom(original.pStages[i]);
});
}
if (original.pVertexInputState !== null) {
copy.pVertexInputState = original.pVertexInputState.constructor.createCopyFrom(original.pVertexInputState);
}
if (original.pInputAssemblyState !== null) {
copy.pInputAssemblyState = original.pInputAssemblyState.constructor.createCopyFrom(original.pInputAssemblyState);
}
if (original.pTessellationState !== null) {
copy.pTessellationState = original.pTessellationState.constructor.createCopyFrom(original.pTessellationState);
}
if (original.pViewportState !== null) {
copy.pViewportState = original.pViewportState.constructor.createCopyFrom(original.pViewportState);
}
if (original.pRasterizationState !== null) {
copy.pRasterizationState = original.pRasterizationState.constructor.createCopyFrom(original.pRasterizationState);
}
if (original.pMultisampleState !== null) {
copy.pMultisampleState = original.pMultisampleState.constructor.createCopyFrom(original.pMultisampleState);
}
if (original.pDepthStencilState !== null) {
copy.pDepthStencilState = original.pDepthStencilState.constructor.createCopyFrom(original.pDepthStencilState);
}
if (original.pColorBlendState !== null) {
copy.pColorBlendState = original.pColorBlendState.constructor.createCopyFrom(original.pColorBlendState);
}
if (original.pDynamicState !== null) {
copy.pDynamicState = original.pDynamicState.constructor.createCopyFrom(original.pDynamicState);
}
if (original.layout !== null) {
copy.layout = original.layout.constructor.createCopyFrom(original.layout);
}
if (original.renderPass !== null) {
copy.renderPass = original.renderPass.constructor.createCopyFrom(original.renderPass);
}
copy.subpass = original.subpass;
if (original.basePipelineHandle !== null) {
copy.basePipelineHandle = original.basePipelineHandle.constructor.createCopyFrom(original.basePipelineHandle);
}
copy.basePipelineIndex = original.basePipelineIndex;
return copy;
};
VkGraphicsPipelineCreateInfo.byteLength = 0x90;
VkGraphicsPipelineCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
stageCount: {
byteOffset: 0x14,
byteLength: 0x4
},
pStages: {
byteOffset: 0x18,
byteLength: 0x8
},
pVertexInputState: {
byteOffset: 0x20,
byteLength: 0x8
},
pInputAssemblyState: {
byteOffset: 0x28,
byteLength: 0x8
},
pTessellationState: {
byteOffset: 0x30,
byteLength: 0x8
},
pViewportState: {
byteOffset: 0x38,
byteLength: 0x8
},
pRasterizationState: {
byteOffset: 0x40,
byteLength: 0x8
},
pMultisampleState: {
byteOffset: 0x48,
byteLength: 0x8
},
pDepthStencilState: {
byteOffset: 0x50,
byteLength: 0x8
},
pColorBlendState: {
byteOffset: 0x58,
byteLength: 0x8
},
pDynamicState: {
byteOffset: 0x60,
byteLength: 0x8
},
layout: {
byteOffset: 0x68,
byteLength: 0x8
},
renderPass: {
byteOffset: 0x70,
byteLength: 0x8
},
subpass: {
byteOffset: 0x78,
byteLength: 0x4
},
basePipelineHandle: {
byteOffset: 0x80,
byteLength: 0x8
},
basePipelineIndex: {
byteOffset: 0x88,
byteLength: 0x4
},
};
/** VkPipelineCacheCreateInfo **/
function VkPipelineCacheCreateInfo(opts, byteOffset) {
if (new.target !== VkPipelineCacheCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineCacheCreateInfo, STRUCT_CACHE_VkPipelineCacheCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineCacheCreateInfo, STRUCT_CACHE_VkPipelineCacheCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineCacheCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x28);
} else {
this.memoryBuffer = new ArrayBuffer(0x28);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x28);
}
this._pNext = null;
this._pInitialData = null;
this.sType = 0x11;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.initialDataSize !== void 0) this.initialDataSize = opts.initialDataSize;
if (opts.pInitialData !== void 0) this.pInitialData = opts.pInitialData;
}
};
Object.defineProperties(VkPipelineCacheCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineCacheCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkPipelineCacheCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkPipelineCacheCreateInfo.pNext' isn't allowed to be filled");
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineCacheCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"initialDataSize": {
get() {
return this.memoryView.getBigInt64(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER_OR_BIGINT(value, "VkPipelineCacheCreateInfo.initialDataSize")
this.memoryView.setBigInt64(0x18, BigInt(value), true);
}
},
"pInitialData": {
get() {
return this._pInitialData;
},
set(value) {
if (value !== null && value.constructor === ArrayBuffer) {
this._pInitialData = value;
this.memoryView.setBigInt64(0x20, getAddressFromArrayBuffer(value), true);
} else if (value === null) {
this._pInitialData = null;
this.memoryView.setBigInt64(0x20, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkPipelineCacheCreateInfo.pInitialData': Expected 'ArrayBuffer' but got '" + typeToString(value) + "'");
}
}
},
});
VkPipelineCacheCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x28);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x28"], 0x0);
this._pNext = null;
this._pInitialData = null;
this.sType = 0x11;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.initialDataSize !== void 0) this.initialDataSize = opts.initialDataSize;
if (opts.pInitialData !== void 0) this.pInitialData = opts.pInitialData;
}
};
VkPipelineCacheCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkPipelineCacheCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineCacheCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineCacheCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.initialDataSize = original.initialDataSize;
if (original.pInitialData !== null) {
let buf = new ArrayBuffer(original.pInitialData.byteLength);
new Uint8Array(buf).set(new Uint8Array(original.pInitialData), 0x0);
copy.pInitialData = buf;
}
return copy;
};
VkPipelineCacheCreateInfo.byteLength = 0x28;
VkPipelineCacheCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
initialDataSize: {
byteOffset: 0x18,
byteLength: 0x8
},
pInitialData: {
byteOffset: 0x20,
byteLength: 0x8
},
};
/** VkPushConstantRange **/
function VkPushConstantRange(opts, byteOffset) {
if (new.target !== VkPushConstantRange) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPushConstantRange, STRUCT_CACHE_VkPushConstantRange);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPushConstantRange, STRUCT_CACHE_VkPushConstantRange);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPushConstantRange'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0xC);
} else {
this.memoryBuffer = new ArrayBuffer(0xC);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0xC);
}
if (typeof opts === "object") {
if (opts.stageFlags !== void 0) this.stageFlags = opts.stageFlags;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.size !== void 0) this.size = opts.size;
}
};
Object.defineProperties(VkPushConstantRange.prototype, {
"stageFlags": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPushConstantRange.stageFlags");
this.memoryView.setInt32(0x0, value, true);
}
},
"offset": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPushConstantRange.offset");
this.memoryView.setUint32(0x4, value, true);
}
},
"size": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPushConstantRange.size");
this.memoryView.setUint32(0x8, value, true);
}
},
});
VkPushConstantRange.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0xC);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0xC"], 0x0);
if (typeof opts === "object") {
if (opts.stageFlags !== void 0) this.stageFlags = opts.stageFlags;
if (opts.offset !== void 0) this.offset = opts.offset;
if (opts.size !== void 0) this.size = opts.size;
}
};
VkPushConstantRange.prototype.flush = function flush() {
return true;
};
VkPushConstantRange.prototype.reflect = function reflect(memoryAddress) {
};
VkPushConstantRange.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPushConstantRange();
copy.stageFlags = original.stageFlags;
copy.offset = original.offset;
copy.size = original.size;
return copy;
};
VkPushConstantRange.byteLength = 0xC;
VkPushConstantRange.memoryLayout = {
stageFlags: {
byteOffset: 0x0,
byteLength: 0x4
},
offset: {
byteOffset: 0x4,
byteLength: 0x4
},
size: {
byteOffset: 0x8,
byteLength: 0x4
},
};
/** VkPipelineLayoutCreateInfo **/
function VkPipelineLayoutCreateInfo(opts, byteOffset) {
if (new.target !== VkPipelineLayoutCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPipelineLayoutCreateInfo, STRUCT_CACHE_VkPipelineLayoutCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPipelineLayoutCreateInfo, STRUCT_CACHE_VkPipelineLayoutCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPipelineLayoutCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x30);
} else {
this.memoryBuffer = new ArrayBuffer(0x30);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x30);
}
this._pNext = null;
this._pSetLayouts = null;
this._pSetLayoutsNative = null;
this._pPushConstantRanges = null;
this._pPushConstantRangesNative = null;
this.sType = 0x1E;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.setLayoutCount !== void 0) this.setLayoutCount = opts.setLayoutCount;
if (opts.pSetLayouts !== void 0) this.pSetLayouts = opts.pSetLayouts;
if (opts.pushConstantRangeCount !== void 0) this.pushConstantRangeCount = opts.pushConstantRangeCount;
if (opts.pPushConstantRanges !== void 0) this.pPushConstantRanges = opts.pPushConstantRanges;
}
};
Object.defineProperties(VkPipelineLayoutCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineLayoutCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkPipelineLayoutCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkPipelineLayoutCreateInfo.pNext' isn't allowed to be filled");
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineLayoutCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"setLayoutCount": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineLayoutCreateInfo.setLayoutCount");
this.memoryView.setUint32(0x14, value, true);
}
},
"pSetLayouts": {
get() {
if (this._pSetLayouts === null && this.memoryView.getBigInt64(0x18, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x18, true);
let array = decodeNativeArrayOfObjects(addr, this.setLayoutCount, VkDescriptorSetLayout);
this._pSetLayouts = array;
return this.pSetLayouts;
} else {
return this._pSetLayouts;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pSetLayouts = value;
} else if (value === null) {
this._pSetLayouts = null;
} else {
throw new TypeError("Invalid type for 'VkPipelineLayoutCreateInfo.pSetLayouts': Expected 'Array VkDescriptorSetLayout' but got '" + typeToString(value) + "'");
}
}
},
"pushConstantRangeCount": {
get() {
return this.memoryView.getUint32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkPipelineLayoutCreateInfo.pushConstantRangeCount");
this.memoryView.setUint32(0x20, value, true);
}
},
"pPushConstantRanges": {
get() {
if (this._pPushConstantRanges === null && this.memoryView.getBigInt64(0x28, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x28, true);
let array = decodeNativeArrayOfObjects(addr, this.pushConstantRangeCount, VkPushConstantRange);
this._pPushConstantRanges = array;
return this.pPushConstantRanges;
} else {
return this._pPushConstantRanges;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pPushConstantRanges = value;
} else if (value === null) {
this._pPushConstantRanges = null;
} else {
throw new TypeError("Invalid type for 'VkPipelineLayoutCreateInfo.pPushConstantRanges': Expected 'Array VkPushConstantRange' but got '" + typeToString(value) + "'");
}
}
},
});
VkPipelineLayoutCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x30);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x30"], 0x0);
this._pNext = null;
this._pSetLayouts = null;
this._pSetLayoutsNative = null;
this._pPushConstantRanges = null;
this._pPushConstantRangesNative = null;
this.sType = 0x1E;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.setLayoutCount !== void 0) this.setLayoutCount = opts.setLayoutCount;
if (opts.pSetLayouts !== void 0) this.pSetLayouts = opts.pSetLayouts;
if (opts.pushConstantRangeCount !== void 0) this.pushConstantRangeCount = opts.pushConstantRangeCount;
if (opts.pPushConstantRanges !== void 0) this.pPushConstantRanges = opts.pPushConstantRanges;
}
};
VkPipelineLayoutCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pSetLayouts !== null) {
let array = this._pSetLayouts;
if (array.length !== this.setLayoutCount) {
throw new RangeError("Invalid array length, expected length of 'setLayoutCount' for 'VkPipelineLayoutCreateInfo.pSetLayouts'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkDescriptorSetLayout)) {
throw new TypeError("Invalid type for 'VkPipelineLayoutCreateInfo.pSetLayouts[" + ii + "]': Expected 'VkDescriptorSetLayout' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pSetLayoutsNative = nativeArray;
this.memoryView.setBigInt64(0x18, nativeArray.address, true);
} else {
this._pSetLayoutsNative = null;
this.memoryView.setBigInt64(0x18, BI0, true);
}
}
if (this._pPushConstantRanges !== null) {
let array = this._pPushConstantRanges;
if (array.length !== this.pushConstantRangeCount) {
throw new RangeError("Invalid array length, expected length of 'pushConstantRangeCount' for 'VkPipelineLayoutCreateInfo.pPushConstantRanges'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkPushConstantRange)) {
throw new TypeError("Invalid type for 'VkPipelineLayoutCreateInfo.pPushConstantRanges[" + ii + "]': Expected 'VkPushConstantRange' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pPushConstantRangesNative = nativeArray;
this.memoryView.setBigInt64(0x28, nativeArray.address, true);
} else {
this._pPushConstantRangesNative = null;
this.memoryView.setBigInt64(0x28, BI0, true);
}
}
return true;
};
VkPipelineLayoutCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkPipelineLayoutCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPipelineLayoutCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.setLayoutCount = original.setLayoutCount;
if (original.pSetLayouts !== null) {
copy.pSetLayouts = [...Array(original.pSetLayouts.length)].map((v, i) => {
return original.pSetLayouts[i].constructor.createCopyFrom(original.pSetLayouts[i]);
});
}
copy.pushConstantRangeCount = original.pushConstantRangeCount;
if (original.pPushConstantRanges !== null) {
copy.pPushConstantRanges = [...Array(original.pPushConstantRanges.length)].map((v, i) => {
return original.pPushConstantRanges[i].constructor.createCopyFrom(original.pPushConstantRanges[i]);
});
}
return copy;
};
VkPipelineLayoutCreateInfo.byteLength = 0x30;
VkPipelineLayoutCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
setLayoutCount: {
byteOffset: 0x14,
byteLength: 0x4
},
pSetLayouts: {
byteOffset: 0x18,
byteLength: 0x8
},
pushConstantRangeCount: {
byteOffset: 0x20,
byteLength: 0x4
},
pPushConstantRanges: {
byteOffset: 0x28,
byteLength: 0x8
},
};
/** VkSamplerCreateInfo **/
function VkSamplerCreateInfo(opts, byteOffset) {
if (new.target !== VkSamplerCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSamplerCreateInfo, STRUCT_CACHE_VkSamplerCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSamplerCreateInfo, STRUCT_CACHE_VkSamplerCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSamplerCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x50);
} else {
this.memoryBuffer = new ArrayBuffer(0x50);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x50);
}
this._pNext = null;
this.sType = 0x1F;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.magFilter !== void 0) this.magFilter = opts.magFilter;
if (opts.minFilter !== void 0) this.minFilter = opts.minFilter;
if (opts.mipmapMode !== void 0) this.mipmapMode = opts.mipmapMode;
if (opts.addressModeU !== void 0) this.addressModeU = opts.addressModeU;
if (opts.addressModeV !== void 0) this.addressModeV = opts.addressModeV;
if (opts.addressModeW !== void 0) this.addressModeW = opts.addressModeW;
if (opts.mipLodBias !== void 0) this.mipLodBias = opts.mipLodBias;
if (opts.anisotropyEnable !== void 0) this.anisotropyEnable = opts.anisotropyEnable;
if (opts.maxAnisotropy !== void 0) this.maxAnisotropy = opts.maxAnisotropy;
if (opts.compareEnable !== void 0) this.compareEnable = opts.compareEnable;
if (opts.compareOp !== void 0) this.compareOp = opts.compareOp;
if (opts.minLod !== void 0) this.minLod = opts.minLod;
if (opts.maxLod !== void 0) this.maxLod = opts.maxLod;
if (opts.borderColor !== void 0) this.borderColor = opts.borderColor;
if (opts.unnormalizedCoordinates !== void 0) this.unnormalizedCoordinates = opts.unnormalizedCoordinates;
}
};
Object.defineProperties(VkSamplerCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkSamplerCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkSamplerCreateInfo.pNext'");
switch (sType) {
case 0x3B9D2B61:
case 0x3B9CC5D1:
break;
default:
throw new TypeError("Invalid type for 'VkSamplerCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkSamplerCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"magFilter": {
get() {
return this.memoryView.getInt32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.magFilter");
if (!$VAL_R_VkFilter(value)) {
throw new RangeError("Invalid value for 'VkSamplerCreateInfo.magFilter': '" + value + "' is not a value of 'VkFilter'");
}
this.memoryView.setInt32(0x14, value, true);
}
},
"minFilter": {
get() {
return this.memoryView.getInt32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.minFilter");
if (!$VAL_R_VkFilter(value)) {
throw new RangeError("Invalid value for 'VkSamplerCreateInfo.minFilter': '" + value + "' is not a value of 'VkFilter'");
}
this.memoryView.setInt32(0x18, value, true);
}
},
"mipmapMode": {
get() {
return this.memoryView.getInt32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.mipmapMode");
if (!$VAL_R_VkSamplerMipmapMode(value)) {
throw new RangeError("Invalid value for 'VkSamplerCreateInfo.mipmapMode': '" + value + "' is not a value of 'VkSamplerMipmapMode'");
}
this.memoryView.setInt32(0x1C, value, true);
}
},
"addressModeU": {
get() {
return this.memoryView.getInt32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.addressModeU");
if (!$VAL_R_VkSamplerAddressMode(value)) {
throw new RangeError("Invalid value for 'VkSamplerCreateInfo.addressModeU': '" + value + "' is not a value of 'VkSamplerAddressMode'");
}
this.memoryView.setInt32(0x20, value, true);
}
},
"addressModeV": {
get() {
return this.memoryView.getInt32(0x24, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.addressModeV");
if (!$VAL_R_VkSamplerAddressMode(value)) {
throw new RangeError("Invalid value for 'VkSamplerCreateInfo.addressModeV': '" + value + "' is not a value of 'VkSamplerAddressMode'");
}
this.memoryView.setInt32(0x24, value, true);
}
},
"addressModeW": {
get() {
return this.memoryView.getInt32(0x28, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.addressModeW");
if (!$VAL_R_VkSamplerAddressMode(value)) {
throw new RangeError("Invalid value for 'VkSamplerCreateInfo.addressModeW': '" + value + "' is not a value of 'VkSamplerAddressMode'");
}
this.memoryView.setInt32(0x28, value, true);
}
},
"mipLodBias": {
get() {
return this.memoryView.getFloat32(0x2C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.mipLodBias");
this.memoryView.setFloat32(0x2C, value, true);
}
},
"anisotropyEnable": {
get() {
return this.memoryView.getUint32(0x30, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x30, value | 0, true);
}
},
"maxAnisotropy": {
get() {
return this.memoryView.getFloat32(0x34, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.maxAnisotropy");
this.memoryView.setFloat32(0x34, value, true);
}
},
"compareEnable": {
get() {
return this.memoryView.getUint32(0x38, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x38, value | 0, true);
}
},
"compareOp": {
get() {
return this.memoryView.getInt32(0x3C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.compareOp");
if (!$VAL_R_VkCompareOp(value)) {
throw new RangeError("Invalid value for 'VkSamplerCreateInfo.compareOp': '" + value + "' is not a value of 'VkCompareOp'");
}
this.memoryView.setInt32(0x3C, value, true);
}
},
"minLod": {
get() {
return this.memoryView.getFloat32(0x40, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.minLod");
this.memoryView.setFloat32(0x40, value, true);
}
},
"maxLod": {
get() {
return this.memoryView.getFloat32(0x44, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.maxLod");
this.memoryView.setFloat32(0x44, value, true);
}
},
"borderColor": {
get() {
return this.memoryView.getInt32(0x48, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSamplerCreateInfo.borderColor");
if (!$VAL_R_VkBorderColor(value)) {
throw new RangeError("Invalid value for 'VkSamplerCreateInfo.borderColor': '" + value + "' is not a value of 'VkBorderColor'");
}
this.memoryView.setInt32(0x48, value, true);
}
},
"unnormalizedCoordinates": {
get() {
return this.memoryView.getUint32(0x4C, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x4C, value | 0, true);
}
},
});
VkSamplerCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x50);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x50"], 0x0);
this._pNext = null;
this.sType = 0x1F;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.magFilter !== void 0) this.magFilter = opts.magFilter;
if (opts.minFilter !== void 0) this.minFilter = opts.minFilter;
if (opts.mipmapMode !== void 0) this.mipmapMode = opts.mipmapMode;
if (opts.addressModeU !== void 0) this.addressModeU = opts.addressModeU;
if (opts.addressModeV !== void 0) this.addressModeV = opts.addressModeV;
if (opts.addressModeW !== void 0) this.addressModeW = opts.addressModeW;
if (opts.mipLodBias !== void 0) this.mipLodBias = opts.mipLodBias;
if (opts.anisotropyEnable !== void 0) this.anisotropyEnable = opts.anisotropyEnable;
if (opts.maxAnisotropy !== void 0) this.maxAnisotropy = opts.maxAnisotropy;
if (opts.compareEnable !== void 0) this.compareEnable = opts.compareEnable;
if (opts.compareOp !== void 0) this.compareOp = opts.compareOp;
if (opts.minLod !== void 0) this.minLod = opts.minLod;
if (opts.maxLod !== void 0) this.maxLod = opts.maxLod;
if (opts.borderColor !== void 0) this.borderColor = opts.borderColor;
if (opts.unnormalizedCoordinates !== void 0) this.unnormalizedCoordinates = opts.unnormalizedCoordinates;
}
};
VkSamplerCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkSamplerCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkSamplerCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSamplerCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.magFilter = original.magFilter;
copy.minFilter = original.minFilter;
copy.mipmapMode = original.mipmapMode;
copy.addressModeU = original.addressModeU;
copy.addressModeV = original.addressModeV;
copy.addressModeW = original.addressModeW;
copy.mipLodBias = original.mipLodBias;
copy.anisotropyEnable = original.anisotropyEnable;
copy.maxAnisotropy = original.maxAnisotropy;
copy.compareEnable = original.compareEnable;
copy.compareOp = original.compareOp;
copy.minLod = original.minLod;
copy.maxLod = original.maxLod;
copy.borderColor = original.borderColor;
copy.unnormalizedCoordinates = original.unnormalizedCoordinates;
return copy;
};
VkSamplerCreateInfo.byteLength = 0x50;
VkSamplerCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
magFilter: {
byteOffset: 0x14,
byteLength: 0x4
},
minFilter: {
byteOffset: 0x18,
byteLength: 0x4
},
mipmapMode: {
byteOffset: 0x1C,
byteLength: 0x4
},
addressModeU: {
byteOffset: 0x20,
byteLength: 0x4
},
addressModeV: {
byteOffset: 0x24,
byteLength: 0x4
},
addressModeW: {
byteOffset: 0x28,
byteLength: 0x4
},
mipLodBias: {
byteOffset: 0x2C,
byteLength: 0x4
},
anisotropyEnable: {
byteOffset: 0x30,
byteLength: 0x4
},
maxAnisotropy: {
byteOffset: 0x34,
byteLength: 0x4
},
compareEnable: {
byteOffset: 0x38,
byteLength: 0x4
},
compareOp: {
byteOffset: 0x3C,
byteLength: 0x4
},
minLod: {
byteOffset: 0x40,
byteLength: 0x4
},
maxLod: {
byteOffset: 0x44,
byteLength: 0x4
},
borderColor: {
byteOffset: 0x48,
byteLength: 0x4
},
unnormalizedCoordinates: {
byteOffset: 0x4C,
byteLength: 0x4
},
};
/** VkCommandPoolCreateInfo **/
function VkCommandPoolCreateInfo(opts, byteOffset) {
if (new.target !== VkCommandPoolCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkCommandPoolCreateInfo, STRUCT_CACHE_VkCommandPoolCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkCommandPoolCreateInfo, STRUCT_CACHE_VkCommandPoolCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkCommandPoolCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._pNext = null;
this.sType = 0x27;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.queueFamilyIndex !== void 0) this.queueFamilyIndex = opts.queueFamilyIndex;
}
};
Object.defineProperties(VkCommandPoolCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCommandPoolCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkCommandPoolCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkCommandPoolCreateInfo.pNext' isn't allowed to be filled");
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCommandPoolCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"queueFamilyIndex": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCommandPoolCreateInfo.queueFamilyIndex");
this.memoryView.setUint32(0x14, value, true);
}
},
});
VkCommandPoolCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._pNext = null;
this.sType = 0x27;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.queueFamilyIndex !== void 0) this.queueFamilyIndex = opts.queueFamilyIndex;
}
};
VkCommandPoolCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkCommandPoolCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkCommandPoolCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkCommandPoolCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.queueFamilyIndex = original.queueFamilyIndex;
return copy;
};
VkCommandPoolCreateInfo.byteLength = 0x18;
VkCommandPoolCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
queueFamilyIndex: {
byteOffset: 0x14,
byteLength: 0x4
},
};
/** VkCommandBufferAllocateInfo **/
function VkCommandBufferAllocateInfo(opts, byteOffset) {
if (new.target !== VkCommandBufferAllocateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkCommandBufferAllocateInfo, STRUCT_CACHE_VkCommandBufferAllocateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkCommandBufferAllocateInfo, STRUCT_CACHE_VkCommandBufferAllocateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkCommandBufferAllocateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x20);
} else {
this.memoryBuffer = new ArrayBuffer(0x20);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x20);
}
this._pNext = null;
this._commandPool = null;
this.sType = 0x28;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.commandPool !== void 0) this.commandPool = opts.commandPool;
if (opts.level !== void 0) this.level = opts.level;
if (opts.commandBufferCount !== void 0) this.commandBufferCount = opts.commandBufferCount;
}
};
Object.defineProperties(VkCommandBufferAllocateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCommandBufferAllocateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkCommandBufferAllocateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkCommandBufferAllocateInfo.pNext' isn't allowed to be filled");
}
},
"commandPool": {
get() {
return this._commandPool;
},
set(value) {
if (value !== null && value.constructor === VkCommandPool) {
this._commandPool = value;
this.memoryView.setBigInt64(0x10, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._commandPool = null;
this.memoryView.setBigInt64(0x10, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkCommandBufferAllocateInfo.commandPool': Expected 'VkCommandPool' but got '" + typeToString(value) + "'");
}
}
},
"level": {
get() {
return this.memoryView.getInt32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCommandBufferAllocateInfo.level");
if (!$VAL_R_VkCommandBufferLevel(value)) {
throw new RangeError("Invalid value for 'VkCommandBufferAllocateInfo.level': '" + value + "' is not a value of 'VkCommandBufferLevel'");
}
this.memoryView.setInt32(0x18, value, true);
}
},
"commandBufferCount": {
get() {
return this.memoryView.getUint32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCommandBufferAllocateInfo.commandBufferCount");
this.memoryView.setUint32(0x1C, value, true);
}
},
});
VkCommandBufferAllocateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x20);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x20"], 0x0);
this._pNext = null;
this._commandPool = null;
this.sType = 0x28;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.commandPool !== void 0) this.commandPool = opts.commandPool;
if (opts.level !== void 0) this.level = opts.level;
if (opts.commandBufferCount !== void 0) this.commandBufferCount = opts.commandBufferCount;
}
};
VkCommandBufferAllocateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkCommandBufferAllocateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkCommandBufferAllocateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkCommandBufferAllocateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
if (original.commandPool !== null) {
copy.commandPool = original.commandPool.constructor.createCopyFrom(original.commandPool);
}
copy.level = original.level;
copy.commandBufferCount = original.commandBufferCount;
return copy;
};
VkCommandBufferAllocateInfo.byteLength = 0x20;
VkCommandBufferAllocateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
commandPool: {
byteOffset: 0x10,
byteLength: 0x8
},
level: {
byteOffset: 0x18,
byteLength: 0x4
},
commandBufferCount: {
byteOffset: 0x1C,
byteLength: 0x4
},
};
/** VkCommandBufferInheritanceInfo **/
function VkCommandBufferInheritanceInfo(opts, byteOffset) {
if (new.target !== VkCommandBufferInheritanceInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkCommandBufferInheritanceInfo, STRUCT_CACHE_VkCommandBufferInheritanceInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkCommandBufferInheritanceInfo, STRUCT_CACHE_VkCommandBufferInheritanceInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkCommandBufferInheritanceInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x38);
} else {
this.memoryBuffer = new ArrayBuffer(0x38);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x38);
}
this._pNext = null;
this._renderPass = null;
this._framebuffer = null;
this.sType = 0x29;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.renderPass !== void 0) this.renderPass = opts.renderPass;
if (opts.subpass !== void 0) this.subpass = opts.subpass;
if (opts.framebuffer !== void 0) this.framebuffer = opts.framebuffer;
if (opts.occlusionQueryEnable !== void 0) this.occlusionQueryEnable = opts.occlusionQueryEnable;
if (opts.queryFlags !== void 0) this.queryFlags = opts.queryFlags;
if (opts.pipelineStatistics !== void 0) this.pipelineStatistics = opts.pipelineStatistics;
}
};
Object.defineProperties(VkCommandBufferInheritanceInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCommandBufferInheritanceInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkCommandBufferInheritanceInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkCommandBufferInheritanceInfo.pNext'");
switch (sType) {
case 0x3B9C0668:
break;
default:
throw new TypeError("Invalid type for 'VkCommandBufferInheritanceInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkCommandBufferInheritanceInfo.pNext'");
}
}
},
"renderPass": {
get() {
return this._renderPass;
},
set(value) {
if (value !== null && value.constructor === VkRenderPass) {
this._renderPass = value;
this.memoryView.setBigInt64(0x10, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._renderPass = null;
this.memoryView.setBigInt64(0x10, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkCommandBufferInheritanceInfo.renderPass': Expected 'VkRenderPass' but got '" + typeToString(value) + "'");
}
}
},
"subpass": {
get() {
return this.memoryView.getUint32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCommandBufferInheritanceInfo.subpass");
this.memoryView.setUint32(0x18, value, true);
}
},
"framebuffer": {
get() {
return this._framebuffer;
},
set(value) {
if (value !== null && value.constructor === VkFramebuffer) {
this._framebuffer = value;
this.memoryView.setBigInt64(0x20, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._framebuffer = null;
this.memoryView.setBigInt64(0x20, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkCommandBufferInheritanceInfo.framebuffer': Expected 'VkFramebuffer' but got '" + typeToString(value) + "'");
}
}
},
"occlusionQueryEnable": {
get() {
return this.memoryView.getUint32(0x28, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x28, value | 0, true);
}
},
"queryFlags": {
get() {
return this.memoryView.getInt32(0x2C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCommandBufferInheritanceInfo.queryFlags");
this.memoryView.setInt32(0x2C, value, true);
}
},
"pipelineStatistics": {
get() {
return this.memoryView.getInt32(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCommandBufferInheritanceInfo.pipelineStatistics");
this.memoryView.setInt32(0x30, value, true);
}
},
});
VkCommandBufferInheritanceInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x38);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x38"], 0x0);
this._pNext = null;
this._renderPass = null;
this._framebuffer = null;
this.sType = 0x29;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.renderPass !== void 0) this.renderPass = opts.renderPass;
if (opts.subpass !== void 0) this.subpass = opts.subpass;
if (opts.framebuffer !== void 0) this.framebuffer = opts.framebuffer;
if (opts.occlusionQueryEnable !== void 0) this.occlusionQueryEnable = opts.occlusionQueryEnable;
if (opts.queryFlags !== void 0) this.queryFlags = opts.queryFlags;
if (opts.pipelineStatistics !== void 0) this.pipelineStatistics = opts.pipelineStatistics;
}
};
VkCommandBufferInheritanceInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkCommandBufferInheritanceInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkCommandBufferInheritanceInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkCommandBufferInheritanceInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
if (original.renderPass !== null) {
copy.renderPass = original.renderPass.constructor.createCopyFrom(original.renderPass);
}
copy.subpass = original.subpass;
if (original.framebuffer !== null) {
copy.framebuffer = original.framebuffer.constructor.createCopyFrom(original.framebuffer);
}
copy.occlusionQueryEnable = original.occlusionQueryEnable;
copy.queryFlags = original.queryFlags;
copy.pipelineStatistics = original.pipelineStatistics;
return copy;
};
VkCommandBufferInheritanceInfo.byteLength = 0x38;
VkCommandBufferInheritanceInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
renderPass: {
byteOffset: 0x10,
byteLength: 0x8
},
subpass: {
byteOffset: 0x18,
byteLength: 0x4
},
framebuffer: {
byteOffset: 0x20,
byteLength: 0x8
},
occlusionQueryEnable: {
byteOffset: 0x28,
byteLength: 0x4
},
queryFlags: {
byteOffset: 0x2C,
byteLength: 0x4
},
pipelineStatistics: {
byteOffset: 0x30,
byteLength: 0x4
},
};
/** VkCommandBufferBeginInfo **/
function VkCommandBufferBeginInfo(opts, byteOffset) {
if (new.target !== VkCommandBufferBeginInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkCommandBufferBeginInfo, STRUCT_CACHE_VkCommandBufferBeginInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkCommandBufferBeginInfo, STRUCT_CACHE_VkCommandBufferBeginInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkCommandBufferBeginInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x20);
} else {
this.memoryBuffer = new ArrayBuffer(0x20);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x20);
}
this._pNext = null;
this._pInheritanceInfo = null;
this.sType = 0x2A;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.pInheritanceInfo !== void 0) this.pInheritanceInfo = opts.pInheritanceInfo;
}
};
Object.defineProperties(VkCommandBufferBeginInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCommandBufferBeginInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkCommandBufferBeginInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkCommandBufferBeginInfo.pNext'");
switch (sType) {
case 0x3B9BB464:
break;
default:
throw new TypeError("Invalid type for 'VkCommandBufferBeginInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkCommandBufferBeginInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkCommandBufferBeginInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"pInheritanceInfo": {
get() {
if (this._pInheritanceInfo === null && this.memoryView.getBigInt64(0x18, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x18, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkCommandBufferInheritanceInfo.byteLength));
this._pInheritanceInfo = new VkCommandBufferInheritanceInfo({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x18, this._pInheritanceInfo.memoryAddress, true);
return this.pInheritanceInfo;
} else {
return this._pInheritanceInfo;
}
},
set(value) {
if (value !== null && value.constructor === VkCommandBufferInheritanceInfo) {
value.flush();
this._pInheritanceInfo = value;
this.memoryView.setBigInt64(0x18, value.memoryAddress, true);
} else if (value === null) {
this._pInheritanceInfo = null;
this.memoryView.setBigInt64(0x18, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkCommandBufferBeginInfo.pInheritanceInfo': Expected 'VkCommandBufferInheritanceInfo' but got '" + typeToString(value) + "'");
}
}
},
});
VkCommandBufferBeginInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x20);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x20"], 0x0);
this._pNext = null;
this._pInheritanceInfo = null;
this.sType = 0x2A;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.pInheritanceInfo !== void 0) this.pInheritanceInfo = opts.pInheritanceInfo;
}
};
VkCommandBufferBeginInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkCommandBufferBeginInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkCommandBufferBeginInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkCommandBufferBeginInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
if (original.pInheritanceInfo !== null) {
copy.pInheritanceInfo = original.pInheritanceInfo.constructor.createCopyFrom(original.pInheritanceInfo);
}
return copy;
};
VkCommandBufferBeginInfo.byteLength = 0x20;
VkCommandBufferBeginInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
pInheritanceInfo: {
byteOffset: 0x18,
byteLength: 0x8
},
};
/** VkRenderPassBeginInfo **/
function VkRenderPassBeginInfo(opts, byteOffset) {
if (new.target !== VkRenderPassBeginInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkRenderPassBeginInfo, STRUCT_CACHE_VkRenderPassBeginInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkRenderPassBeginInfo, STRUCT_CACHE_VkRenderPassBeginInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkRenderPassBeginInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x40);
} else {
this.memoryBuffer = new ArrayBuffer(0x40);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x40);
}
this._pNext = null;
this._renderPass = null;
this._framebuffer = null;
this._renderArea = new VkRect2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x20 });
this._pClearValues = null;
this._pClearValuesNative = null;
this.sType = 0x2B;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.renderPass !== void 0) this.renderPass = opts.renderPass;
if (opts.framebuffer !== void 0) this.framebuffer = opts.framebuffer;
if (opts.renderArea !== void 0) this.renderArea = opts.renderArea;
if (opts.clearValueCount !== void 0) this.clearValueCount = opts.clearValueCount;
if (opts.pClearValues !== void 0) this.pClearValues = opts.pClearValues;
}
};
Object.defineProperties(VkRenderPassBeginInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkRenderPassBeginInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkRenderPassBeginInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkRenderPassBeginInfo.pNext'");
switch (sType) {
case 0x3B9BB463:
case 0x3B9CF899:
case 0x3B9C6FE3:
break;
default:
throw new TypeError("Invalid type for 'VkRenderPassBeginInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkRenderPassBeginInfo.pNext'");
}
}
},
"renderPass": {
get() {
return this._renderPass;
},
set(value) {
if (value !== null && value.constructor === VkRenderPass) {
this._renderPass = value;
this.memoryView.setBigInt64(0x10, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._renderPass = null;
this.memoryView.setBigInt64(0x10, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkRenderPassBeginInfo.renderPass': Expected 'VkRenderPass' but got '" + typeToString(value) + "'");
}
}
},
"framebuffer": {
get() {
return this._framebuffer;
},
set(value) {
if (value !== null && value.constructor === VkFramebuffer) {
this._framebuffer = value;
this.memoryView.setBigInt64(0x18, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._framebuffer = null;
this.memoryView.setBigInt64(0x18, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkRenderPassBeginInfo.framebuffer': Expected 'VkFramebuffer' but got '" + typeToString(value) + "'");
}
}
},
"renderArea": {
get() {
return this._renderArea;
},
set(value) {
if (value !== null && value.constructor === VkRect2D) {
value.flush();
this._renderArea = value;
} else if (value === null) {
this._renderArea = null;
} else {
throw new TypeError("Invalid type for 'VkRenderPassBeginInfo.renderArea': Expected 'VkRect2D' but got '" + typeToString(value) + "'");
}
}
},
"clearValueCount": {
get() {
return this.memoryView.getUint32(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkRenderPassBeginInfo.clearValueCount");
this.memoryView.setUint32(0x30, value, true);
}
},
"pClearValues": {
get() {
if (this._pClearValues === null && this.memoryView.getBigInt64(0x38, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x38, true);
let array = decodeNativeArrayOfObjects(addr, this.clearValueCount, VkClearValue);
this._pClearValues = array;
return this.pClearValues;
} else {
return this._pClearValues;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pClearValues = value;
} else if (value === null) {
this._pClearValues = null;
} else {
throw new TypeError("Invalid type for 'VkRenderPassBeginInfo.pClearValues': Expected 'Array VkClearValue' but got '" + typeToString(value) + "'");
}
}
},
});
VkRenderPassBeginInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x40);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x40"], 0x0);
this._pNext = null;
this._renderPass = null;
this._framebuffer = null;
if (this._renderArea !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._renderArea.memoryBuffer) this._renderArea = new VkRect2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x20 });
else this._renderArea.reset();
}
this._pClearValues = null;
this._pClearValuesNative = null;
this.sType = 0x2B;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.renderPass !== void 0) this.renderPass = opts.renderPass;
if (opts.framebuffer !== void 0) this.framebuffer = opts.framebuffer;
if (opts.renderArea !== void 0) this.renderArea = opts.renderArea;
if (opts.clearValueCount !== void 0) this.clearValueCount = opts.clearValueCount;
if (opts.pClearValues !== void 0) this.pClearValues = opts.pClearValues;
}
};
VkRenderPassBeginInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._renderArea !== null) {
let renderArea = this._renderArea;
renderArea.flush();
if (this.memoryBuffer !== renderArea.memoryBuffer) {
let srcView = new Uint8Array(renderArea.memoryBuffer, renderArea.$memoryOffset, 0x10);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x20);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkRenderPassBeginInfo.renderArea' isn't used as shared-memory");
}
}
if (this._pClearValues !== null) {
let array = this._pClearValues;
if (array.length !== this.clearValueCount) {
throw new RangeError("Invalid array length, expected length of 'clearValueCount' for 'VkRenderPassBeginInfo.pClearValues'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkClearValue)) {
throw new TypeError("Invalid type for 'VkRenderPassBeginInfo.pClearValues[" + ii + "]': Expected 'VkClearValue' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pClearValuesNative = nativeArray;
this.memoryView.setBigInt64(0x38, nativeArray.address, true);
} else {
this._pClearValuesNative = null;
this.memoryView.setBigInt64(0x38, BI0, true);
}
}
return true;
};
VkRenderPassBeginInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkRenderPassBeginInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkRenderPassBeginInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
if (original.renderPass !== null) {
copy.renderPass = original.renderPass.constructor.createCopyFrom(original.renderPass);
}
if (original.framebuffer !== null) {
copy.framebuffer = original.framebuffer.constructor.createCopyFrom(original.framebuffer);
}
if (original.renderArea !== null) {
copy.renderArea = original.renderArea.constructor.createCopyFrom(original.renderArea);
}
copy.clearValueCount = original.clearValueCount;
if (original.pClearValues !== null) {
copy.pClearValues = [...Array(original.pClearValues.length)].map((v, i) => {
return original.pClearValues[i].constructor.createCopyFrom(original.pClearValues[i]);
});
}
return copy;
};
VkRenderPassBeginInfo.byteLength = 0x40;
VkRenderPassBeginInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
renderPass: {
byteOffset: 0x10,
byteLength: 0x8
},
framebuffer: {
byteOffset: 0x18,
byteLength: 0x8
},
renderArea: {
byteOffset: 0x20,
byteLength: 0x10
},
clearValueCount: {
byteOffset: 0x30,
byteLength: 0x4
},
pClearValues: {
byteOffset: 0x38,
byteLength: 0x8
},
};
/** VkClearDepthStencilValue **/
function VkClearDepthStencilValue(opts, byteOffset) {
if (new.target !== VkClearDepthStencilValue) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkClearDepthStencilValue, STRUCT_CACHE_VkClearDepthStencilValue);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkClearDepthStencilValue, STRUCT_CACHE_VkClearDepthStencilValue);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkClearDepthStencilValue'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x8);
} else {
this.memoryBuffer = new ArrayBuffer(0x8);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
}
if (typeof opts === "object") {
if (opts.depth !== void 0) this.depth = opts.depth;
if (opts.stencil !== void 0) this.stencil = opts.stencil;
}
};
Object.defineProperties(VkClearDepthStencilValue.prototype, {
"depth": {
get() {
return this.memoryView.getFloat32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkClearDepthStencilValue.depth");
this.memoryView.setFloat32(0x0, value, true);
}
},
"stencil": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkClearDepthStencilValue.stencil");
this.memoryView.setUint32(0x4, value, true);
}
},
});
VkClearDepthStencilValue.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x8);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x8"], 0x0);
if (typeof opts === "object") {
if (opts.depth !== void 0) this.depth = opts.depth;
if (opts.stencil !== void 0) this.stencil = opts.stencil;
}
};
VkClearDepthStencilValue.prototype.flush = function flush() {
return true;
};
VkClearDepthStencilValue.prototype.reflect = function reflect(memoryAddress) {
};
VkClearDepthStencilValue.createCopyFrom = function createCopyFrom(original) {
let copy = new VkClearDepthStencilValue();
copy.depth = original.depth;
copy.stencil = original.stencil;
return copy;
};
VkClearDepthStencilValue.byteLength = 0x8;
VkClearDepthStencilValue.memoryLayout = {
depth: {
byteOffset: 0x0,
byteLength: 0x4
},
stencil: {
byteOffset: 0x4,
byteLength: 0x4
},
};
/** VkClearAttachment **/
function VkClearAttachment(opts, byteOffset) {
if (new.target !== VkClearAttachment) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkClearAttachment, STRUCT_CACHE_VkClearAttachment);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkClearAttachment, STRUCT_CACHE_VkClearAttachment);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkClearAttachment'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._clearValue = new VkClearValue({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x8 });
if (typeof opts === "object") {
if (opts.aspectMask !== void 0) this.aspectMask = opts.aspectMask;
if (opts.colorAttachment !== void 0) this.colorAttachment = opts.colorAttachment;
if (opts.clearValue !== void 0) this.clearValue = opts.clearValue;
}
};
Object.defineProperties(VkClearAttachment.prototype, {
"aspectMask": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkClearAttachment.aspectMask");
this.memoryView.setInt32(0x0, value, true);
}
},
"colorAttachment": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkClearAttachment.colorAttachment");
this.memoryView.setUint32(0x4, value, true);
}
},
"clearValue": {
get() {
return this._clearValue;
},
set(value) {
if (value !== null && value.constructor === VkClearValue) {
value.flush();
this._clearValue = value;
} else if (value === null) {
this._clearValue = null;
} else {
throw new TypeError("Invalid type for 'VkClearAttachment.clearValue': Expected 'VkClearValue' but got '" + typeToString(value) + "'");
}
}
},
});
VkClearAttachment.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
if (this._clearValue !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._clearValue.memoryBuffer) this._clearValue = new VkClearValue({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x8 });
else this._clearValue.reset();
}
if (typeof opts === "object") {
if (opts.aspectMask !== void 0) this.aspectMask = opts.aspectMask;
if (opts.colorAttachment !== void 0) this.colorAttachment = opts.colorAttachment;
if (opts.clearValue !== void 0) this.clearValue = opts.clearValue;
}
};
VkClearAttachment.prototype.flush = function flush() {
if (this._clearValue !== null) {
let clearValue = this._clearValue;
clearValue.flush();
if (this.memoryBuffer !== clearValue.memoryBuffer) {
let srcView = new Uint8Array(clearValue.memoryBuffer, clearValue.$memoryOffset, 0x10);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x8);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkClearAttachment.clearValue' isn't used as shared-memory");
}
}
return true;
};
VkClearAttachment.prototype.reflect = function reflect(memoryAddress) {
};
VkClearAttachment.createCopyFrom = function createCopyFrom(original) {
let copy = new VkClearAttachment();
copy.aspectMask = original.aspectMask;
copy.colorAttachment = original.colorAttachment;
if (original.clearValue !== null) {
copy.clearValue = original.clearValue.constructor.createCopyFrom(original.clearValue);
}
return copy;
};
VkClearAttachment.byteLength = 0x18;
VkClearAttachment.memoryLayout = {
aspectMask: {
byteOffset: 0x0,
byteLength: 0x4
},
colorAttachment: {
byteOffset: 0x4,
byteLength: 0x4
},
clearValue: {
byteOffset: 0x8,
byteLength: 0x10
},
};
/** VkAttachmentDescription **/
function VkAttachmentDescription(opts, byteOffset) {
if (new.target !== VkAttachmentDescription) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkAttachmentDescription, STRUCT_CACHE_VkAttachmentDescription);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkAttachmentDescription, STRUCT_CACHE_VkAttachmentDescription);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkAttachmentDescription'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x24);
} else {
this.memoryBuffer = new ArrayBuffer(0x24);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x24);
}
if (typeof opts === "object") {
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.format !== void 0) this.format = opts.format;
if (opts.samples !== void 0) this.samples = opts.samples;
if (opts.loadOp !== void 0) this.loadOp = opts.loadOp;
if (opts.storeOp !== void 0) this.storeOp = opts.storeOp;
if (opts.stencilLoadOp !== void 0) this.stencilLoadOp = opts.stencilLoadOp;
if (opts.stencilStoreOp !== void 0) this.stencilStoreOp = opts.stencilStoreOp;
if (opts.initialLayout !== void 0) this.initialLayout = opts.initialLayout;
if (opts.finalLayout !== void 0) this.finalLayout = opts.finalLayout;
}
};
Object.defineProperties(VkAttachmentDescription.prototype, {
"flags": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkAttachmentDescription.flags");
this.memoryView.setInt32(0x0, value, true);
}
},
"format": {
get() {
return this.memoryView.getInt32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkAttachmentDescription.format");
if (!$VAL_R_VkFormat(value)) {
throw new RangeError("Invalid value for 'VkAttachmentDescription.format': '" + value + "' is not a value of 'VkFormat'");
}
this.memoryView.setInt32(0x4, value, true);
}
},
"samples": {
get() {
return this.memoryView.getInt32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkAttachmentDescription.samples");
this.memoryView.setInt32(0x8, value, true);
}
},
"loadOp": {
get() {
return this.memoryView.getInt32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkAttachmentDescription.loadOp");
if (!$VAL_R_VkAttachmentLoadOp(value)) {
throw new RangeError("Invalid value for 'VkAttachmentDescription.loadOp': '" + value + "' is not a value of 'VkAttachmentLoadOp'");
}
this.memoryView.setInt32(0xC, value, true);
}
},
"storeOp": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkAttachmentDescription.storeOp");
if (!$VAL_R_VkAttachmentStoreOp(value)) {
throw new RangeError("Invalid value for 'VkAttachmentDescription.storeOp': '" + value + "' is not a value of 'VkAttachmentStoreOp'");
}
this.memoryView.setInt32(0x10, value, true);
}
},
"stencilLoadOp": {
get() {
return this.memoryView.getInt32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkAttachmentDescription.stencilLoadOp");
if (!$VAL_R_VkAttachmentLoadOp(value)) {
throw new RangeError("Invalid value for 'VkAttachmentDescription.stencilLoadOp': '" + value + "' is not a value of 'VkAttachmentLoadOp'");
}
this.memoryView.setInt32(0x14, value, true);
}
},
"stencilStoreOp": {
get() {
return this.memoryView.getInt32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkAttachmentDescription.stencilStoreOp");
if (!$VAL_R_VkAttachmentStoreOp(value)) {
throw new RangeError("Invalid value for 'VkAttachmentDescription.stencilStoreOp': '" + value + "' is not a value of 'VkAttachmentStoreOp'");
}
this.memoryView.setInt32(0x18, value, true);
}
},
"initialLayout": {
get() {
return this.memoryView.getInt32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkAttachmentDescription.initialLayout");
if (!$VAL_R_VkImageLayout(value)) {
throw new RangeError("Invalid value for 'VkAttachmentDescription.initialLayout': '" + value + "' is not a value of 'VkImageLayout'");
}
this.memoryView.setInt32(0x1C, value, true);
}
},
"finalLayout": {
get() {
return this.memoryView.getInt32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkAttachmentDescription.finalLayout");
if (!$VAL_R_VkImageLayout(value)) {
throw new RangeError("Invalid value for 'VkAttachmentDescription.finalLayout': '" + value + "' is not a value of 'VkImageLayout'");
}
this.memoryView.setInt32(0x20, value, true);
}
},
});
VkAttachmentDescription.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x24);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x24"], 0x0);
if (typeof opts === "object") {
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.format !== void 0) this.format = opts.format;
if (opts.samples !== void 0) this.samples = opts.samples;
if (opts.loadOp !== void 0) this.loadOp = opts.loadOp;
if (opts.storeOp !== void 0) this.storeOp = opts.storeOp;
if (opts.stencilLoadOp !== void 0) this.stencilLoadOp = opts.stencilLoadOp;
if (opts.stencilStoreOp !== void 0) this.stencilStoreOp = opts.stencilStoreOp;
if (opts.initialLayout !== void 0) this.initialLayout = opts.initialLayout;
if (opts.finalLayout !== void 0) this.finalLayout = opts.finalLayout;
}
};
VkAttachmentDescription.prototype.flush = function flush() {
return true;
};
VkAttachmentDescription.prototype.reflect = function reflect(memoryAddress) {
};
VkAttachmentDescription.createCopyFrom = function createCopyFrom(original) {
let copy = new VkAttachmentDescription();
copy.flags = original.flags;
copy.format = original.format;
copy.samples = original.samples;
copy.loadOp = original.loadOp;
copy.storeOp = original.storeOp;
copy.stencilLoadOp = original.stencilLoadOp;
copy.stencilStoreOp = original.stencilStoreOp;
copy.initialLayout = original.initialLayout;
copy.finalLayout = original.finalLayout;
return copy;
};
VkAttachmentDescription.byteLength = 0x24;
VkAttachmentDescription.memoryLayout = {
flags: {
byteOffset: 0x0,
byteLength: 0x4
},
format: {
byteOffset: 0x4,
byteLength: 0x4
},
samples: {
byteOffset: 0x8,
byteLength: 0x4
},
loadOp: {
byteOffset: 0xC,
byteLength: 0x4
},
storeOp: {
byteOffset: 0x10,
byteLength: 0x4
},
stencilLoadOp: {
byteOffset: 0x14,
byteLength: 0x4
},
stencilStoreOp: {
byteOffset: 0x18,
byteLength: 0x4
},
initialLayout: {
byteOffset: 0x1C,
byteLength: 0x4
},
finalLayout: {
byteOffset: 0x20,
byteLength: 0x4
},
};
/** VkAttachmentReference **/
function VkAttachmentReference(opts, byteOffset) {
if (new.target !== VkAttachmentReference) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkAttachmentReference, STRUCT_CACHE_VkAttachmentReference);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkAttachmentReference, STRUCT_CACHE_VkAttachmentReference);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkAttachmentReference'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x8);
} else {
this.memoryBuffer = new ArrayBuffer(0x8);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x8);
}
if (typeof opts === "object") {
if (opts.attachment !== void 0) this.attachment = opts.attachment;
if (opts.layout !== void 0) this.layout = opts.layout;
}
};
Object.defineProperties(VkAttachmentReference.prototype, {
"attachment": {
get() {
return this.memoryView.getUint32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkAttachmentReference.attachment");
this.memoryView.setUint32(0x0, value, true);
}
},
"layout": {
get() {
return this.memoryView.getInt32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkAttachmentReference.layout");
if (!$VAL_R_VkImageLayout(value)) {
throw new RangeError("Invalid value for 'VkAttachmentReference.layout': '" + value + "' is not a value of 'VkImageLayout'");
}
this.memoryView.setInt32(0x4, value, true);
}
},
});
VkAttachmentReference.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x8);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x8"], 0x0);
if (typeof opts === "object") {
if (opts.attachment !== void 0) this.attachment = opts.attachment;
if (opts.layout !== void 0) this.layout = opts.layout;
}
};
VkAttachmentReference.prototype.flush = function flush() {
return true;
};
VkAttachmentReference.prototype.reflect = function reflect(memoryAddress) {
};
VkAttachmentReference.createCopyFrom = function createCopyFrom(original) {
let copy = new VkAttachmentReference();
copy.attachment = original.attachment;
copy.layout = original.layout;
return copy;
};
VkAttachmentReference.byteLength = 0x8;
VkAttachmentReference.memoryLayout = {
attachment: {
byteOffset: 0x0,
byteLength: 0x4
},
layout: {
byteOffset: 0x4,
byteLength: 0x4
},
};
/** VkSubpassDescription **/
function VkSubpassDescription(opts, byteOffset) {
if (new.target !== VkSubpassDescription) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSubpassDescription, STRUCT_CACHE_VkSubpassDescription);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSubpassDescription, STRUCT_CACHE_VkSubpassDescription);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSubpassDescription'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x48);
} else {
this.memoryBuffer = new ArrayBuffer(0x48);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x48);
}
this._pInputAttachments = null;
this._pInputAttachmentsNative = null;
this._pColorAttachments = null;
this._pColorAttachmentsNative = null;
this._pResolveAttachments = null;
this._pResolveAttachmentsNative = null;
this._pDepthStencilAttachment = null;
this._pPreserveAttachments = null;
if (typeof opts === "object") {
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.pipelineBindPoint !== void 0) this.pipelineBindPoint = opts.pipelineBindPoint;
if (opts.inputAttachmentCount !== void 0) this.inputAttachmentCount = opts.inputAttachmentCount;
if (opts.pInputAttachments !== void 0) this.pInputAttachments = opts.pInputAttachments;
if (opts.colorAttachmentCount !== void 0) this.colorAttachmentCount = opts.colorAttachmentCount;
if (opts.pColorAttachments !== void 0) this.pColorAttachments = opts.pColorAttachments;
if (opts.pResolveAttachments !== void 0) this.pResolveAttachments = opts.pResolveAttachments;
if (opts.pDepthStencilAttachment !== void 0) this.pDepthStencilAttachment = opts.pDepthStencilAttachment;
if (opts.preserveAttachmentCount !== void 0) this.preserveAttachmentCount = opts.preserveAttachmentCount;
if (opts.pPreserveAttachments !== void 0) this.pPreserveAttachments = opts.pPreserveAttachments;
}
};
Object.defineProperties(VkSubpassDescription.prototype, {
"flags": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubpassDescription.flags");
this.memoryView.setInt32(0x0, value, true);
}
},
"pipelineBindPoint": {
get() {
return this.memoryView.getInt32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubpassDescription.pipelineBindPoint");
if (!$VAL_R_VkPipelineBindPoint(value)) {
throw new RangeError("Invalid value for 'VkSubpassDescription.pipelineBindPoint': '" + value + "' is not a value of 'VkPipelineBindPoint'");
}
this.memoryView.setInt32(0x4, value, true);
}
},
"inputAttachmentCount": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubpassDescription.inputAttachmentCount");
this.memoryView.setUint32(0x8, value, true);
}
},
"pInputAttachments": {
get() {
if (this._pInputAttachments === null && this.memoryView.getBigInt64(0x10, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x10, true);
let array = decodeNativeArrayOfObjects(addr, this.inputAttachmentCount, VkAttachmentReference);
this._pInputAttachments = array;
return this.pInputAttachments;
} else {
return this._pInputAttachments;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pInputAttachments = value;
} else if (value === null) {
this._pInputAttachments = null;
} else {
throw new TypeError("Invalid type for 'VkSubpassDescription.pInputAttachments': Expected 'Array VkAttachmentReference' but got '" + typeToString(value) + "'");
}
}
},
"colorAttachmentCount": {
get() {
return this.memoryView.getUint32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubpassDescription.colorAttachmentCount");
this.memoryView.setUint32(0x18, value, true);
}
},
"pColorAttachments": {
get() {
if (this._pColorAttachments === null && this.memoryView.getBigInt64(0x20, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x20, true);
let array = decodeNativeArrayOfObjects(addr, this.colorAttachmentCount, VkAttachmentReference);
this._pColorAttachments = array;
return this.pColorAttachments;
} else {
return this._pColorAttachments;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pColorAttachments = value;
} else if (value === null) {
this._pColorAttachments = null;
} else {
throw new TypeError("Invalid type for 'VkSubpassDescription.pColorAttachments': Expected 'Array VkAttachmentReference' but got '" + typeToString(value) + "'");
}
}
},
"pResolveAttachments": {
get() {
if (this._pResolveAttachments === null && this.memoryView.getBigInt64(0x28, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x28, true);
let array = decodeNativeArrayOfObjects(addr, this.colorAttachmentCount, VkAttachmentReference);
this._pResolveAttachments = array;
return this.pResolveAttachments;
} else {
return this._pResolveAttachments;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pResolveAttachments = value;
} else if (value === null) {
this._pResolveAttachments = null;
} else {
throw new TypeError("Invalid type for 'VkSubpassDescription.pResolveAttachments': Expected 'Array VkAttachmentReference' but got '" + typeToString(value) + "'");
}
}
},
"pDepthStencilAttachment": {
get() {
if (this._pDepthStencilAttachment === null && this.memoryView.getBigInt64(0x30, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x30, true);
let buffer = getArrayBufferFromAddress(addr, BigInt(VkAttachmentReference.byteLength));
this._pDepthStencilAttachment = new VkAttachmentReference({ $memoryBuffer: buffer, $memoryOffset: 0x0 });
this.memoryView.setBigInt64(0x30, this._pDepthStencilAttachment.memoryAddress, true);
return this.pDepthStencilAttachment;
} else {
return this._pDepthStencilAttachment;
}
},
set(value) {
if (value !== null && value.constructor === VkAttachmentReference) {
value.flush();
this._pDepthStencilAttachment = value;
this.memoryView.setBigInt64(0x30, value.memoryAddress, true);
} else if (value === null) {
this._pDepthStencilAttachment = null;
this.memoryView.setBigInt64(0x30, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkSubpassDescription.pDepthStencilAttachment': Expected 'VkAttachmentReference' but got '" + typeToString(value) + "'");
}
}
},
"preserveAttachmentCount": {
get() {
return this.memoryView.getUint32(0x38, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubpassDescription.preserveAttachmentCount");
this.memoryView.setUint32(0x38, value, true);
}
},
"pPreserveAttachments": {
get() {
return this._pPreserveAttachments;
},
set(value) {
if (value !== null && value.constructor === Uint32Array) {
this._pPreserveAttachments = value;
this.memoryView.setBigInt64(0x40, getAddressFromArrayBuffer(value.buffer), true);
} else if (value === null) {
this._pPreserveAttachments = null;
this.memoryView.setBigInt64(0x40, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkSubpassDescription.pPreserveAttachments': Expected 'Uint32Array' but got '" + typeToString(value) + "'");
}
}
},
});
VkSubpassDescription.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x48);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x48"], 0x0);
this._pInputAttachments = null;
this._pInputAttachmentsNative = null;
this._pColorAttachments = null;
this._pColorAttachmentsNative = null;
this._pResolveAttachments = null;
this._pResolveAttachmentsNative = null;
this._pDepthStencilAttachment = null;
this._pPreserveAttachments = null;
if (typeof opts === "object") {
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.pipelineBindPoint !== void 0) this.pipelineBindPoint = opts.pipelineBindPoint;
if (opts.inputAttachmentCount !== void 0) this.inputAttachmentCount = opts.inputAttachmentCount;
if (opts.pInputAttachments !== void 0) this.pInputAttachments = opts.pInputAttachments;
if (opts.colorAttachmentCount !== void 0) this.colorAttachmentCount = opts.colorAttachmentCount;
if (opts.pColorAttachments !== void 0) this.pColorAttachments = opts.pColorAttachments;
if (opts.pResolveAttachments !== void 0) this.pResolveAttachments = opts.pResolveAttachments;
if (opts.pDepthStencilAttachment !== void 0) this.pDepthStencilAttachment = opts.pDepthStencilAttachment;
if (opts.preserveAttachmentCount !== void 0) this.preserveAttachmentCount = opts.preserveAttachmentCount;
if (opts.pPreserveAttachments !== void 0) this.pPreserveAttachments = opts.pPreserveAttachments;
}
};
VkSubpassDescription.prototype.flush = function flush() {
if (this._pInputAttachments !== null) {
let array = this._pInputAttachments;
if (array.length !== this.inputAttachmentCount) {
throw new RangeError("Invalid array length, expected length of 'inputAttachmentCount' for 'VkSubpassDescription.pInputAttachments'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkAttachmentReference)) {
throw new TypeError("Invalid type for 'VkSubpassDescription.pInputAttachments[" + ii + "]': Expected 'VkAttachmentReference' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pInputAttachmentsNative = nativeArray;
this.memoryView.setBigInt64(0x10, nativeArray.address, true);
} else {
this._pInputAttachmentsNative = null;
this.memoryView.setBigInt64(0x10, BI0, true);
}
}
if (this._pColorAttachments !== null) {
let array = this._pColorAttachments;
if (array.length !== this.colorAttachmentCount) {
throw new RangeError("Invalid array length, expected length of 'colorAttachmentCount' for 'VkSubpassDescription.pColorAttachments'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkAttachmentReference)) {
throw new TypeError("Invalid type for 'VkSubpassDescription.pColorAttachments[" + ii + "]': Expected 'VkAttachmentReference' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pColorAttachmentsNative = nativeArray;
this.memoryView.setBigInt64(0x20, nativeArray.address, true);
} else {
this._pColorAttachmentsNative = null;
this.memoryView.setBigInt64(0x20, BI0, true);
}
}
if (this._pResolveAttachments !== null) {
let array = this._pResolveAttachments;
if (array.length !== this.colorAttachmentCount) {
throw new RangeError("Invalid array length, expected length of 'colorAttachmentCount' for 'VkSubpassDescription.pResolveAttachments'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkAttachmentReference)) {
throw new TypeError("Invalid type for 'VkSubpassDescription.pResolveAttachments[" + ii + "]': Expected 'VkAttachmentReference' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pResolveAttachmentsNative = nativeArray;
this.memoryView.setBigInt64(0x28, nativeArray.address, true);
} else {
this._pResolveAttachmentsNative = null;
this.memoryView.setBigInt64(0x28, BI0, true);
}
}
return true;
};
VkSubpassDescription.prototype.reflect = function reflect(memoryAddress) {
};
VkSubpassDescription.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSubpassDescription();
copy.flags = original.flags;
copy.pipelineBindPoint = original.pipelineBindPoint;
copy.inputAttachmentCount = original.inputAttachmentCount;
if (original.pInputAttachments !== null) {
copy.pInputAttachments = [...Array(original.pInputAttachments.length)].map((v, i) => {
return original.pInputAttachments[i].constructor.createCopyFrom(original.pInputAttachments[i]);
});
}
copy.colorAttachmentCount = original.colorAttachmentCount;
if (original.pColorAttachments !== null) {
copy.pColorAttachments = [...Array(original.pColorAttachments.length)].map((v, i) => {
return original.pColorAttachments[i].constructor.createCopyFrom(original.pColorAttachments[i]);
});
}
if (original.pResolveAttachments !== null) {
copy.pResolveAttachments = [...Array(original.pResolveAttachments.length)].map((v, i) => {
return original.pResolveAttachments[i].constructor.createCopyFrom(original.pResolveAttachments[i]);
});
}
if (original.pDepthStencilAttachment !== null) {
copy.pDepthStencilAttachment = original.pDepthStencilAttachment.constructor.createCopyFrom(original.pDepthStencilAttachment);
}
copy.preserveAttachmentCount = original.preserveAttachmentCount;
if (original.pPreserveAttachments !== null) {
copy.pPreserveAttachments = new Uint32Array(original.pPreserveAttachments);
}
return copy;
};
VkSubpassDescription.byteLength = 0x48;
VkSubpassDescription.memoryLayout = {
flags: {
byteOffset: 0x0,
byteLength: 0x4
},
pipelineBindPoint: {
byteOffset: 0x4,
byteLength: 0x4
},
inputAttachmentCount: {
byteOffset: 0x8,
byteLength: 0x4
},
pInputAttachments: {
byteOffset: 0x10,
byteLength: 0x8
},
colorAttachmentCount: {
byteOffset: 0x18,
byteLength: 0x4
},
pColorAttachments: {
byteOffset: 0x20,
byteLength: 0x8
},
pResolveAttachments: {
byteOffset: 0x28,
byteLength: 0x8
},
pDepthStencilAttachment: {
byteOffset: 0x30,
byteLength: 0x8
},
preserveAttachmentCount: {
byteOffset: 0x38,
byteLength: 0x4
},
pPreserveAttachments: {
byteOffset: 0x40,
byteLength: 0x8
},
};
/** VkSubpassDependency **/
function VkSubpassDependency(opts, byteOffset) {
if (new.target !== VkSubpassDependency) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSubpassDependency, STRUCT_CACHE_VkSubpassDependency);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSubpassDependency, STRUCT_CACHE_VkSubpassDependency);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSubpassDependency'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x1C);
} else {
this.memoryBuffer = new ArrayBuffer(0x1C);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x1C);
}
if (typeof opts === "object") {
if (opts.srcSubpass !== void 0) this.srcSubpass = opts.srcSubpass;
if (opts.dstSubpass !== void 0) this.dstSubpass = opts.dstSubpass;
if (opts.srcStageMask !== void 0) this.srcStageMask = opts.srcStageMask;
if (opts.dstStageMask !== void 0) this.dstStageMask = opts.dstStageMask;
if (opts.srcAccessMask !== void 0) this.srcAccessMask = opts.srcAccessMask;
if (opts.dstAccessMask !== void 0) this.dstAccessMask = opts.dstAccessMask;
if (opts.dependencyFlags !== void 0) this.dependencyFlags = opts.dependencyFlags;
}
};
Object.defineProperties(VkSubpassDependency.prototype, {
"srcSubpass": {
get() {
return this.memoryView.getUint32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubpassDependency.srcSubpass");
this.memoryView.setUint32(0x0, value, true);
}
},
"dstSubpass": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubpassDependency.dstSubpass");
this.memoryView.setUint32(0x4, value, true);
}
},
"srcStageMask": {
get() {
return this.memoryView.getInt32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubpassDependency.srcStageMask");
this.memoryView.setInt32(0x8, value, true);
}
},
"dstStageMask": {
get() {
return this.memoryView.getInt32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubpassDependency.dstStageMask");
this.memoryView.setInt32(0xC, value, true);
}
},
"srcAccessMask": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubpassDependency.srcAccessMask");
this.memoryView.setInt32(0x10, value, true);
}
},
"dstAccessMask": {
get() {
return this.memoryView.getInt32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubpassDependency.dstAccessMask");
this.memoryView.setInt32(0x14, value, true);
}
},
"dependencyFlags": {
get() {
return this.memoryView.getInt32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubpassDependency.dependencyFlags");
this.memoryView.setInt32(0x18, value, true);
}
},
});
VkSubpassDependency.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x1C);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x1C"], 0x0);
if (typeof opts === "object") {
if (opts.srcSubpass !== void 0) this.srcSubpass = opts.srcSubpass;
if (opts.dstSubpass !== void 0) this.dstSubpass = opts.dstSubpass;
if (opts.srcStageMask !== void 0) this.srcStageMask = opts.srcStageMask;
if (opts.dstStageMask !== void 0) this.dstStageMask = opts.dstStageMask;
if (opts.srcAccessMask !== void 0) this.srcAccessMask = opts.srcAccessMask;
if (opts.dstAccessMask !== void 0) this.dstAccessMask = opts.dstAccessMask;
if (opts.dependencyFlags !== void 0) this.dependencyFlags = opts.dependencyFlags;
}
};
VkSubpassDependency.prototype.flush = function flush() {
return true;
};
VkSubpassDependency.prototype.reflect = function reflect(memoryAddress) {
};
VkSubpassDependency.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSubpassDependency();
copy.srcSubpass = original.srcSubpass;
copy.dstSubpass = original.dstSubpass;
copy.srcStageMask = original.srcStageMask;
copy.dstStageMask = original.dstStageMask;
copy.srcAccessMask = original.srcAccessMask;
copy.dstAccessMask = original.dstAccessMask;
copy.dependencyFlags = original.dependencyFlags;
return copy;
};
VkSubpassDependency.byteLength = 0x1C;
VkSubpassDependency.memoryLayout = {
srcSubpass: {
byteOffset: 0x0,
byteLength: 0x4
},
dstSubpass: {
byteOffset: 0x4,
byteLength: 0x4
},
srcStageMask: {
byteOffset: 0x8,
byteLength: 0x4
},
dstStageMask: {
byteOffset: 0xC,
byteLength: 0x4
},
srcAccessMask: {
byteOffset: 0x10,
byteLength: 0x4
},
dstAccessMask: {
byteOffset: 0x14,
byteLength: 0x4
},
dependencyFlags: {
byteOffset: 0x18,
byteLength: 0x4
},
};
/** VkRenderPassCreateInfo **/
function VkRenderPassCreateInfo(opts, byteOffset) {
if (new.target !== VkRenderPassCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkRenderPassCreateInfo, STRUCT_CACHE_VkRenderPassCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkRenderPassCreateInfo, STRUCT_CACHE_VkRenderPassCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkRenderPassCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x40);
} else {
this.memoryBuffer = new ArrayBuffer(0x40);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x40);
}
this._pNext = null;
this._pAttachments = null;
this._pAttachmentsNative = null;
this._pSubpasses = null;
this._pSubpassesNative = null;
this._pDependencies = null;
this._pDependenciesNative = null;
this.sType = 0x26;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.attachmentCount !== void 0) this.attachmentCount = opts.attachmentCount;
if (opts.pAttachments !== void 0) this.pAttachments = opts.pAttachments;
if (opts.subpassCount !== void 0) this.subpassCount = opts.subpassCount;
if (opts.pSubpasses !== void 0) this.pSubpasses = opts.pSubpasses;
if (opts.dependencyCount !== void 0) this.dependencyCount = opts.dependencyCount;
if (opts.pDependencies !== void 0) this.pDependencies = opts.pDependencies;
}
};
Object.defineProperties(VkRenderPassCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkRenderPassCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkRenderPassCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkRenderPassCreateInfo.pNext'");
switch (sType) {
case 0x3B9B9908:
case 0x3B9C9309:
case 0x3B9E1D92:
break;
default:
throw new TypeError("Invalid type for 'VkRenderPassCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkRenderPassCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkRenderPassCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"attachmentCount": {
get() {
return this.memoryView.getUint32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkRenderPassCreateInfo.attachmentCount");
this.memoryView.setUint32(0x14, value, true);
}
},
"pAttachments": {
get() {
if (this._pAttachments === null && this.memoryView.getBigInt64(0x18, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x18, true);
let array = decodeNativeArrayOfObjects(addr, this.attachmentCount, VkAttachmentDescription);
this._pAttachments = array;
return this.pAttachments;
} else {
return this._pAttachments;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pAttachments = value;
} else if (value === null) {
this._pAttachments = null;
} else {
throw new TypeError("Invalid type for 'VkRenderPassCreateInfo.pAttachments': Expected 'Array VkAttachmentDescription' but got '" + typeToString(value) + "'");
}
}
},
"subpassCount": {
get() {
return this.memoryView.getUint32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkRenderPassCreateInfo.subpassCount");
this.memoryView.setUint32(0x20, value, true);
}
},
"pSubpasses": {
get() {
if (this._pSubpasses === null && this.memoryView.getBigInt64(0x28, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x28, true);
let array = decodeNativeArrayOfObjects(addr, this.subpassCount, VkSubpassDescription);
this._pSubpasses = array;
return this.pSubpasses;
} else {
return this._pSubpasses;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pSubpasses = value;
} else if (value === null) {
this._pSubpasses = null;
} else {
throw new TypeError("Invalid type for 'VkRenderPassCreateInfo.pSubpasses': Expected 'Array VkSubpassDescription' but got '" + typeToString(value) + "'");
}
}
},
"dependencyCount": {
get() {
return this.memoryView.getUint32(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkRenderPassCreateInfo.dependencyCount");
this.memoryView.setUint32(0x30, value, true);
}
},
"pDependencies": {
get() {
if (this._pDependencies === null && this.memoryView.getBigInt64(0x38, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x38, true);
let array = decodeNativeArrayOfObjects(addr, this.dependencyCount, VkSubpassDependency);
this._pDependencies = array;
return this.pDependencies;
} else {
return this._pDependencies;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pDependencies = value;
} else if (value === null) {
this._pDependencies = null;
} else {
throw new TypeError("Invalid type for 'VkRenderPassCreateInfo.pDependencies': Expected 'Array VkSubpassDependency' but got '" + typeToString(value) + "'");
}
}
},
});
VkRenderPassCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x40);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x40"], 0x0);
this._pNext = null;
this._pAttachments = null;
this._pAttachmentsNative = null;
this._pSubpasses = null;
this._pSubpassesNative = null;
this._pDependencies = null;
this._pDependenciesNative = null;
this.sType = 0x26;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.attachmentCount !== void 0) this.attachmentCount = opts.attachmentCount;
if (opts.pAttachments !== void 0) this.pAttachments = opts.pAttachments;
if (opts.subpassCount !== void 0) this.subpassCount = opts.subpassCount;
if (opts.pSubpasses !== void 0) this.pSubpasses = opts.pSubpasses;
if (opts.dependencyCount !== void 0) this.dependencyCount = opts.dependencyCount;
if (opts.pDependencies !== void 0) this.pDependencies = opts.pDependencies;
}
};
VkRenderPassCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pAttachments !== null) {
let array = this._pAttachments;
if (array.length !== this.attachmentCount) {
throw new RangeError("Invalid array length, expected length of 'attachmentCount' for 'VkRenderPassCreateInfo.pAttachments'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkAttachmentDescription)) {
throw new TypeError("Invalid type for 'VkRenderPassCreateInfo.pAttachments[" + ii + "]': Expected 'VkAttachmentDescription' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pAttachmentsNative = nativeArray;
this.memoryView.setBigInt64(0x18, nativeArray.address, true);
} else {
this._pAttachmentsNative = null;
this.memoryView.setBigInt64(0x18, BI0, true);
}
}
if (this._pSubpasses !== null) {
let array = this._pSubpasses;
if (array.length !== this.subpassCount) {
throw new RangeError("Invalid array length, expected length of 'subpassCount' for 'VkRenderPassCreateInfo.pSubpasses'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSubpassDescription)) {
throw new TypeError("Invalid type for 'VkRenderPassCreateInfo.pSubpasses[" + ii + "]': Expected 'VkSubpassDescription' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pSubpassesNative = nativeArray;
this.memoryView.setBigInt64(0x28, nativeArray.address, true);
} else {
this._pSubpassesNative = null;
this.memoryView.setBigInt64(0x28, BI0, true);
}
}
if (this._pDependencies !== null) {
let array = this._pDependencies;
if (array.length !== this.dependencyCount) {
throw new RangeError("Invalid array length, expected length of 'dependencyCount' for 'VkRenderPassCreateInfo.pDependencies'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSubpassDependency)) {
throw new TypeError("Invalid type for 'VkRenderPassCreateInfo.pDependencies[" + ii + "]': Expected 'VkSubpassDependency' but got '" + typeToString(array[ii]) + "'");
return false;
}
if (!array[ii].flush()) return false;
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pDependenciesNative = nativeArray;
this.memoryView.setBigInt64(0x38, nativeArray.address, true);
} else {
this._pDependenciesNative = null;
this.memoryView.setBigInt64(0x38, BI0, true);
}
}
return true;
};
VkRenderPassCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkRenderPassCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkRenderPassCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.attachmentCount = original.attachmentCount;
if (original.pAttachments !== null) {
copy.pAttachments = [...Array(original.pAttachments.length)].map((v, i) => {
return original.pAttachments[i].constructor.createCopyFrom(original.pAttachments[i]);
});
}
copy.subpassCount = original.subpassCount;
if (original.pSubpasses !== null) {
copy.pSubpasses = [...Array(original.pSubpasses.length)].map((v, i) => {
return original.pSubpasses[i].constructor.createCopyFrom(original.pSubpasses[i]);
});
}
copy.dependencyCount = original.dependencyCount;
if (original.pDependencies !== null) {
copy.pDependencies = [...Array(original.pDependencies.length)].map((v, i) => {
return original.pDependencies[i].constructor.createCopyFrom(original.pDependencies[i]);
});
}
return copy;
};
VkRenderPassCreateInfo.byteLength = 0x40;
VkRenderPassCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
attachmentCount: {
byteOffset: 0x14,
byteLength: 0x4
},
pAttachments: {
byteOffset: 0x18,
byteLength: 0x8
},
subpassCount: {
byteOffset: 0x20,
byteLength: 0x4
},
pSubpasses: {
byteOffset: 0x28,
byteLength: 0x8
},
dependencyCount: {
byteOffset: 0x30,
byteLength: 0x4
},
pDependencies: {
byteOffset: 0x38,
byteLength: 0x8
},
};
/** VkEventCreateInfo **/
function VkEventCreateInfo(opts, byteOffset) {
if (new.target !== VkEventCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkEventCreateInfo, STRUCT_CACHE_VkEventCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkEventCreateInfo, STRUCT_CACHE_VkEventCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkEventCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._pNext = null;
this.sType = 0xA;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
}
};
Object.defineProperties(VkEventCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkEventCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkEventCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkEventCreateInfo.pNext' isn't allowed to be filled");
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkEventCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
});
VkEventCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._pNext = null;
this.sType = 0xA;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
}
};
VkEventCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkEventCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkEventCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkEventCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
return copy;
};
VkEventCreateInfo.byteLength = 0x18;
VkEventCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
};
/** VkFenceCreateInfo **/
function VkFenceCreateInfo(opts, byteOffset) {
if (new.target !== VkFenceCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkFenceCreateInfo, STRUCT_CACHE_VkFenceCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkFenceCreateInfo, STRUCT_CACHE_VkFenceCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkFenceCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._pNext = null;
this.sType = 0x8;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
}
};
Object.defineProperties(VkFenceCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkFenceCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkFenceCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkFenceCreateInfo.pNext'");
switch (sType) {
case 0x3B9C8368:
case 0x3B9C8751:
break;
default:
throw new TypeError("Invalid type for 'VkFenceCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkFenceCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkFenceCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
});
VkFenceCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._pNext = null;
this.sType = 0x8;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
}
};
VkFenceCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkFenceCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkFenceCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkFenceCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
return copy;
};
VkFenceCreateInfo.byteLength = 0x18;
VkFenceCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
};
/** VkPhysicalDeviceFeatures **/
function VkPhysicalDeviceFeatures(opts, byteOffset) {
if (new.target !== VkPhysicalDeviceFeatures) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPhysicalDeviceFeatures, STRUCT_CACHE_VkPhysicalDeviceFeatures);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPhysicalDeviceFeatures, STRUCT_CACHE_VkPhysicalDeviceFeatures);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPhysicalDeviceFeatures'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0xDC);
} else {
this.memoryBuffer = new ArrayBuffer(0xDC);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0xDC);
}
if (typeof opts === "object") {
if (opts.robustBufferAccess !== void 0) this.robustBufferAccess = opts.robustBufferAccess;
if (opts.fullDrawIndexUint32 !== void 0) this.fullDrawIndexUint32 = opts.fullDrawIndexUint32;
if (opts.imageCubeArray !== void 0) this.imageCubeArray = opts.imageCubeArray;
if (opts.independentBlend !== void 0) this.independentBlend = opts.independentBlend;
if (opts.geometryShader !== void 0) this.geometryShader = opts.geometryShader;
if (opts.tessellationShader !== void 0) this.tessellationShader = opts.tessellationShader;
if (opts.sampleRateShading !== void 0) this.sampleRateShading = opts.sampleRateShading;
if (opts.dualSrcBlend !== void 0) this.dualSrcBlend = opts.dualSrcBlend;
if (opts.logicOp !== void 0) this.logicOp = opts.logicOp;
if (opts.multiDrawIndirect !== void 0) this.multiDrawIndirect = opts.multiDrawIndirect;
if (opts.drawIndirectFirstInstance !== void 0) this.drawIndirectFirstInstance = opts.drawIndirectFirstInstance;
if (opts.depthClamp !== void 0) this.depthClamp = opts.depthClamp;
if (opts.depthBiasClamp !== void 0) this.depthBiasClamp = opts.depthBiasClamp;
if (opts.fillModeNonSolid !== void 0) this.fillModeNonSolid = opts.fillModeNonSolid;
if (opts.depthBounds !== void 0) this.depthBounds = opts.depthBounds;
if (opts.wideLines !== void 0) this.wideLines = opts.wideLines;
if (opts.largePoints !== void 0) this.largePoints = opts.largePoints;
if (opts.alphaToOne !== void 0) this.alphaToOne = opts.alphaToOne;
if (opts.multiViewport !== void 0) this.multiViewport = opts.multiViewport;
if (opts.samplerAnisotropy !== void 0) this.samplerAnisotropy = opts.samplerAnisotropy;
if (opts.textureCompressionETC2 !== void 0) this.textureCompressionETC2 = opts.textureCompressionETC2;
if (opts.textureCompressionASTC_LDR !== void 0) this.textureCompressionASTC_LDR = opts.textureCompressionASTC_LDR;
if (opts.textureCompressionBC !== void 0) this.textureCompressionBC = opts.textureCompressionBC;
if (opts.occlusionQueryPrecise !== void 0) this.occlusionQueryPrecise = opts.occlusionQueryPrecise;
if (opts.pipelineStatisticsQuery !== void 0) this.pipelineStatisticsQuery = opts.pipelineStatisticsQuery;
if (opts.vertexPipelineStoresAndAtomics !== void 0) this.vertexPipelineStoresAndAtomics = opts.vertexPipelineStoresAndAtomics;
if (opts.fragmentStoresAndAtomics !== void 0) this.fragmentStoresAndAtomics = opts.fragmentStoresAndAtomics;
if (opts.shaderTessellationAndGeometryPointSize !== void 0) this.shaderTessellationAndGeometryPointSize = opts.shaderTessellationAndGeometryPointSize;
if (opts.shaderImageGatherExtended !== void 0) this.shaderImageGatherExtended = opts.shaderImageGatherExtended;
if (opts.shaderStorageImageExtendedFormats !== void 0) this.shaderStorageImageExtendedFormats = opts.shaderStorageImageExtendedFormats;
if (opts.shaderStorageImageMultisample !== void 0) this.shaderStorageImageMultisample = opts.shaderStorageImageMultisample;
if (opts.shaderStorageImageReadWithoutFormat !== void 0) this.shaderStorageImageReadWithoutFormat = opts.shaderStorageImageReadWithoutFormat;
if (opts.shaderStorageImageWriteWithoutFormat !== void 0) this.shaderStorageImageWriteWithoutFormat = opts.shaderStorageImageWriteWithoutFormat;
if (opts.shaderUniformBufferArrayDynamicIndexing !== void 0) this.shaderUniformBufferArrayDynamicIndexing = opts.shaderUniformBufferArrayDynamicIndexing;
if (opts.shaderSampledImageArrayDynamicIndexing !== void 0) this.shaderSampledImageArrayDynamicIndexing = opts.shaderSampledImageArrayDynamicIndexing;
if (opts.shaderStorageBufferArrayDynamicIndexing !== void 0) this.shaderStorageBufferArrayDynamicIndexing = opts.shaderStorageBufferArrayDynamicIndexing;
if (opts.shaderStorageImageArrayDynamicIndexing !== void 0) this.shaderStorageImageArrayDynamicIndexing = opts.shaderStorageImageArrayDynamicIndexing;
if (opts.shaderClipDistance !== void 0) this.shaderClipDistance = opts.shaderClipDistance;
if (opts.shaderCullDistance !== void 0) this.shaderCullDistance = opts.shaderCullDistance;
if (opts.shaderFloat64 !== void 0) this.shaderFloat64 = opts.shaderFloat64;
if (opts.shaderInt64 !== void 0) this.shaderInt64 = opts.shaderInt64;
if (opts.shaderInt16 !== void 0) this.shaderInt16 = opts.shaderInt16;
if (opts.shaderResourceResidency !== void 0) this.shaderResourceResidency = opts.shaderResourceResidency;
if (opts.shaderResourceMinLod !== void 0) this.shaderResourceMinLod = opts.shaderResourceMinLod;
if (opts.sparseBinding !== void 0) this.sparseBinding = opts.sparseBinding;
if (opts.sparseResidencyBuffer !== void 0) this.sparseResidencyBuffer = opts.sparseResidencyBuffer;
if (opts.sparseResidencyImage2D !== void 0) this.sparseResidencyImage2D = opts.sparseResidencyImage2D;
if (opts.sparseResidencyImage3D !== void 0) this.sparseResidencyImage3D = opts.sparseResidencyImage3D;
if (opts.sparseResidency2Samples !== void 0) this.sparseResidency2Samples = opts.sparseResidency2Samples;
if (opts.sparseResidency4Samples !== void 0) this.sparseResidency4Samples = opts.sparseResidency4Samples;
if (opts.sparseResidency8Samples !== void 0) this.sparseResidency8Samples = opts.sparseResidency8Samples;
if (opts.sparseResidency16Samples !== void 0) this.sparseResidency16Samples = opts.sparseResidency16Samples;
if (opts.sparseResidencyAliased !== void 0) this.sparseResidencyAliased = opts.sparseResidencyAliased;
if (opts.variableMultisampleRate !== void 0) this.variableMultisampleRate = opts.variableMultisampleRate;
if (opts.inheritedQueries !== void 0) this.inheritedQueries = opts.inheritedQueries;
}
};
Object.defineProperties(VkPhysicalDeviceFeatures.prototype, {
"robustBufferAccess": {
get() {
return this.memoryView.getUint32(0x0, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x0, value | 0, true);
}
},
"fullDrawIndexUint32": {
get() {
return this.memoryView.getUint32(0x4, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x4, value | 0, true);
}
},
"imageCubeArray": {
get() {
return this.memoryView.getUint32(0x8, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x8, value | 0, true);
}
},
"independentBlend": {
get() {
return this.memoryView.getUint32(0xC, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xC, value | 0, true);
}
},
"geometryShader": {
get() {
return this.memoryView.getUint32(0x10, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x10, value | 0, true);
}
},
"tessellationShader": {
get() {
return this.memoryView.getUint32(0x14, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x14, value | 0, true);
}
},
"sampleRateShading": {
get() {
return this.memoryView.getUint32(0x18, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x18, value | 0, true);
}
},
"dualSrcBlend": {
get() {
return this.memoryView.getUint32(0x1C, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x1C, value | 0, true);
}
},
"logicOp": {
get() {
return this.memoryView.getUint32(0x20, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x20, value | 0, true);
}
},
"multiDrawIndirect": {
get() {
return this.memoryView.getUint32(0x24, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x24, value | 0, true);
}
},
"drawIndirectFirstInstance": {
get() {
return this.memoryView.getUint32(0x28, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x28, value | 0, true);
}
},
"depthClamp": {
get() {
return this.memoryView.getUint32(0x2C, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x2C, value | 0, true);
}
},
"depthBiasClamp": {
get() {
return this.memoryView.getUint32(0x30, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x30, value | 0, true);
}
},
"fillModeNonSolid": {
get() {
return this.memoryView.getUint32(0x34, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x34, value | 0, true);
}
},
"depthBounds": {
get() {
return this.memoryView.getUint32(0x38, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x38, value | 0, true);
}
},
"wideLines": {
get() {
return this.memoryView.getUint32(0x3C, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x3C, value | 0, true);
}
},
"largePoints": {
get() {
return this.memoryView.getUint32(0x40, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x40, value | 0, true);
}
},
"alphaToOne": {
get() {
return this.memoryView.getUint32(0x44, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x44, value | 0, true);
}
},
"multiViewport": {
get() {
return this.memoryView.getUint32(0x48, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x48, value | 0, true);
}
},
"samplerAnisotropy": {
get() {
return this.memoryView.getUint32(0x4C, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x4C, value | 0, true);
}
},
"textureCompressionETC2": {
get() {
return this.memoryView.getUint32(0x50, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x50, value | 0, true);
}
},
"textureCompressionASTC_LDR": {
get() {
return this.memoryView.getUint32(0x54, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x54, value | 0, true);
}
},
"textureCompressionBC": {
get() {
return this.memoryView.getUint32(0x58, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x58, value | 0, true);
}
},
"occlusionQueryPrecise": {
get() {
return this.memoryView.getUint32(0x5C, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x5C, value | 0, true);
}
},
"pipelineStatisticsQuery": {
get() {
return this.memoryView.getUint32(0x60, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x60, value | 0, true);
}
},
"vertexPipelineStoresAndAtomics": {
get() {
return this.memoryView.getUint32(0x64, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x64, value | 0, true);
}
},
"fragmentStoresAndAtomics": {
get() {
return this.memoryView.getUint32(0x68, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x68, value | 0, true);
}
},
"shaderTessellationAndGeometryPointSize": {
get() {
return this.memoryView.getUint32(0x6C, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x6C, value | 0, true);
}
},
"shaderImageGatherExtended": {
get() {
return this.memoryView.getUint32(0x70, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x70, value | 0, true);
}
},
"shaderStorageImageExtendedFormats": {
get() {
return this.memoryView.getUint32(0x74, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x74, value | 0, true);
}
},
"shaderStorageImageMultisample": {
get() {
return this.memoryView.getUint32(0x78, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x78, value | 0, true);
}
},
"shaderStorageImageReadWithoutFormat": {
get() {
return this.memoryView.getUint32(0x7C, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x7C, value | 0, true);
}
},
"shaderStorageImageWriteWithoutFormat": {
get() {
return this.memoryView.getUint32(0x80, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x80, value | 0, true);
}
},
"shaderUniformBufferArrayDynamicIndexing": {
get() {
return this.memoryView.getUint32(0x84, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x84, value | 0, true);
}
},
"shaderSampledImageArrayDynamicIndexing": {
get() {
return this.memoryView.getUint32(0x88, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x88, value | 0, true);
}
},
"shaderStorageBufferArrayDynamicIndexing": {
get() {
return this.memoryView.getUint32(0x8C, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x8C, value | 0, true);
}
},
"shaderStorageImageArrayDynamicIndexing": {
get() {
return this.memoryView.getUint32(0x90, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x90, value | 0, true);
}
},
"shaderClipDistance": {
get() {
return this.memoryView.getUint32(0x94, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x94, value | 0, true);
}
},
"shaderCullDistance": {
get() {
return this.memoryView.getUint32(0x98, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x98, value | 0, true);
}
},
"shaderFloat64": {
get() {
return this.memoryView.getUint32(0x9C, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0x9C, value | 0, true);
}
},
"shaderInt64": {
get() {
return this.memoryView.getUint32(0xA0, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xA0, value | 0, true);
}
},
"shaderInt16": {
get() {
return this.memoryView.getUint32(0xA4, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xA4, value | 0, true);
}
},
"shaderResourceResidency": {
get() {
return this.memoryView.getUint32(0xA8, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xA8, value | 0, true);
}
},
"shaderResourceMinLod": {
get() {
return this.memoryView.getUint32(0xAC, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xAC, value | 0, true);
}
},
"sparseBinding": {
get() {
return this.memoryView.getUint32(0xB0, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xB0, value | 0, true);
}
},
"sparseResidencyBuffer": {
get() {
return this.memoryView.getUint32(0xB4, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xB4, value | 0, true);
}
},
"sparseResidencyImage2D": {
get() {
return this.memoryView.getUint32(0xB8, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xB8, value | 0, true);
}
},
"sparseResidencyImage3D": {
get() {
return this.memoryView.getUint32(0xBC, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xBC, value | 0, true);
}
},
"sparseResidency2Samples": {
get() {
return this.memoryView.getUint32(0xC0, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xC0, value | 0, true);
}
},
"sparseResidency4Samples": {
get() {
return this.memoryView.getUint32(0xC4, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xC4, value | 0, true);
}
},
"sparseResidency8Samples": {
get() {
return this.memoryView.getUint32(0xC8, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xC8, value | 0, true);
}
},
"sparseResidency16Samples": {
get() {
return this.memoryView.getUint32(0xCC, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xCC, value | 0, true);
}
},
"sparseResidencyAliased": {
get() {
return this.memoryView.getUint32(0xD0, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xD0, value | 0, true);
}
},
"variableMultisampleRate": {
get() {
return this.memoryView.getUint32(0xD4, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xD4, value | 0, true);
}
},
"inheritedQueries": {
get() {
return this.memoryView.getUint32(0xD8, true) !== 0;
},
set(value) {
this.memoryView.setUint32(0xD8, value | 0, true);
}
},
});
VkPhysicalDeviceFeatures.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0xDC);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0xDC"], 0x0);
if (typeof opts === "object") {
if (opts.robustBufferAccess !== void 0) this.robustBufferAccess = opts.robustBufferAccess;
if (opts.fullDrawIndexUint32 !== void 0) this.fullDrawIndexUint32 = opts.fullDrawIndexUint32;
if (opts.imageCubeArray !== void 0) this.imageCubeArray = opts.imageCubeArray;
if (opts.independentBlend !== void 0) this.independentBlend = opts.independentBlend;
if (opts.geometryShader !== void 0) this.geometryShader = opts.geometryShader;
if (opts.tessellationShader !== void 0) this.tessellationShader = opts.tessellationShader;
if (opts.sampleRateShading !== void 0) this.sampleRateShading = opts.sampleRateShading;
if (opts.dualSrcBlend !== void 0) this.dualSrcBlend = opts.dualSrcBlend;
if (opts.logicOp !== void 0) this.logicOp = opts.logicOp;
if (opts.multiDrawIndirect !== void 0) this.multiDrawIndirect = opts.multiDrawIndirect;
if (opts.drawIndirectFirstInstance !== void 0) this.drawIndirectFirstInstance = opts.drawIndirectFirstInstance;
if (opts.depthClamp !== void 0) this.depthClamp = opts.depthClamp;
if (opts.depthBiasClamp !== void 0) this.depthBiasClamp = opts.depthBiasClamp;
if (opts.fillModeNonSolid !== void 0) this.fillModeNonSolid = opts.fillModeNonSolid;
if (opts.depthBounds !== void 0) this.depthBounds = opts.depthBounds;
if (opts.wideLines !== void 0) this.wideLines = opts.wideLines;
if (opts.largePoints !== void 0) this.largePoints = opts.largePoints;
if (opts.alphaToOne !== void 0) this.alphaToOne = opts.alphaToOne;
if (opts.multiViewport !== void 0) this.multiViewport = opts.multiViewport;
if (opts.samplerAnisotropy !== void 0) this.samplerAnisotropy = opts.samplerAnisotropy;
if (opts.textureCompressionETC2 !== void 0) this.textureCompressionETC2 = opts.textureCompressionETC2;
if (opts.textureCompressionASTC_LDR !== void 0) this.textureCompressionASTC_LDR = opts.textureCompressionASTC_LDR;
if (opts.textureCompressionBC !== void 0) this.textureCompressionBC = opts.textureCompressionBC;
if (opts.occlusionQueryPrecise !== void 0) this.occlusionQueryPrecise = opts.occlusionQueryPrecise;
if (opts.pipelineStatisticsQuery !== void 0) this.pipelineStatisticsQuery = opts.pipelineStatisticsQuery;
if (opts.vertexPipelineStoresAndAtomics !== void 0) this.vertexPipelineStoresAndAtomics = opts.vertexPipelineStoresAndAtomics;
if (opts.fragmentStoresAndAtomics !== void 0) this.fragmentStoresAndAtomics = opts.fragmentStoresAndAtomics;
if (opts.shaderTessellationAndGeometryPointSize !== void 0) this.shaderTessellationAndGeometryPointSize = opts.shaderTessellationAndGeometryPointSize;
if (opts.shaderImageGatherExtended !== void 0) this.shaderImageGatherExtended = opts.shaderImageGatherExtended;
if (opts.shaderStorageImageExtendedFormats !== void 0) this.shaderStorageImageExtendedFormats = opts.shaderStorageImageExtendedFormats;
if (opts.shaderStorageImageMultisample !== void 0) this.shaderStorageImageMultisample = opts.shaderStorageImageMultisample;
if (opts.shaderStorageImageReadWithoutFormat !== void 0) this.shaderStorageImageReadWithoutFormat = opts.shaderStorageImageReadWithoutFormat;
if (opts.shaderStorageImageWriteWithoutFormat !== void 0) this.shaderStorageImageWriteWithoutFormat = opts.shaderStorageImageWriteWithoutFormat;
if (opts.shaderUniformBufferArrayDynamicIndexing !== void 0) this.shaderUniformBufferArrayDynamicIndexing = opts.shaderUniformBufferArrayDynamicIndexing;
if (opts.shaderSampledImageArrayDynamicIndexing !== void 0) this.shaderSampledImageArrayDynamicIndexing = opts.shaderSampledImageArrayDynamicIndexing;
if (opts.shaderStorageBufferArrayDynamicIndexing !== void 0) this.shaderStorageBufferArrayDynamicIndexing = opts.shaderStorageBufferArrayDynamicIndexing;
if (opts.shaderStorageImageArrayDynamicIndexing !== void 0) this.shaderStorageImageArrayDynamicIndexing = opts.shaderStorageImageArrayDynamicIndexing;
if (opts.shaderClipDistance !== void 0) this.shaderClipDistance = opts.shaderClipDistance;
if (opts.shaderCullDistance !== void 0) this.shaderCullDistance = opts.shaderCullDistance;
if (opts.shaderFloat64 !== void 0) this.shaderFloat64 = opts.shaderFloat64;
if (opts.shaderInt64 !== void 0) this.shaderInt64 = opts.shaderInt64;
if (opts.shaderInt16 !== void 0) this.shaderInt16 = opts.shaderInt16;
if (opts.shaderResourceResidency !== void 0) this.shaderResourceResidency = opts.shaderResourceResidency;
if (opts.shaderResourceMinLod !== void 0) this.shaderResourceMinLod = opts.shaderResourceMinLod;
if (opts.sparseBinding !== void 0) this.sparseBinding = opts.sparseBinding;
if (opts.sparseResidencyBuffer !== void 0) this.sparseResidencyBuffer = opts.sparseResidencyBuffer;
if (opts.sparseResidencyImage2D !== void 0) this.sparseResidencyImage2D = opts.sparseResidencyImage2D;
if (opts.sparseResidencyImage3D !== void 0) this.sparseResidencyImage3D = opts.sparseResidencyImage3D;
if (opts.sparseResidency2Samples !== void 0) this.sparseResidency2Samples = opts.sparseResidency2Samples;
if (opts.sparseResidency4Samples !== void 0) this.sparseResidency4Samples = opts.sparseResidency4Samples;
if (opts.sparseResidency8Samples !== void 0) this.sparseResidency8Samples = opts.sparseResidency8Samples;
if (opts.sparseResidency16Samples !== void 0) this.sparseResidency16Samples = opts.sparseResidency16Samples;
if (opts.sparseResidencyAliased !== void 0) this.sparseResidencyAliased = opts.sparseResidencyAliased;
if (opts.variableMultisampleRate !== void 0) this.variableMultisampleRate = opts.variableMultisampleRate;
if (opts.inheritedQueries !== void 0) this.inheritedQueries = opts.inheritedQueries;
}
};
VkPhysicalDeviceFeatures.prototype.flush = function flush() {
return true;
};
VkPhysicalDeviceFeatures.prototype.reflect = function reflect(memoryAddress) {
};
VkPhysicalDeviceFeatures.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPhysicalDeviceFeatures();
copy.robustBufferAccess = original.robustBufferAccess;
copy.fullDrawIndexUint32 = original.fullDrawIndexUint32;
copy.imageCubeArray = original.imageCubeArray;
copy.independentBlend = original.independentBlend;
copy.geometryShader = original.geometryShader;
copy.tessellationShader = original.tessellationShader;
copy.sampleRateShading = original.sampleRateShading;
copy.dualSrcBlend = original.dualSrcBlend;
copy.logicOp = original.logicOp;
copy.multiDrawIndirect = original.multiDrawIndirect;
copy.drawIndirectFirstInstance = original.drawIndirectFirstInstance;
copy.depthClamp = original.depthClamp;
copy.depthBiasClamp = original.depthBiasClamp;
copy.fillModeNonSolid = original.fillModeNonSolid;
copy.depthBounds = original.depthBounds;
copy.wideLines = original.wideLines;
copy.largePoints = original.largePoints;
copy.alphaToOne = original.alphaToOne;
copy.multiViewport = original.multiViewport;
copy.samplerAnisotropy = original.samplerAnisotropy;
copy.textureCompressionETC2 = original.textureCompressionETC2;
copy.textureCompressionASTC_LDR = original.textureCompressionASTC_LDR;
copy.textureCompressionBC = original.textureCompressionBC;
copy.occlusionQueryPrecise = original.occlusionQueryPrecise;
copy.pipelineStatisticsQuery = original.pipelineStatisticsQuery;
copy.vertexPipelineStoresAndAtomics = original.vertexPipelineStoresAndAtomics;
copy.fragmentStoresAndAtomics = original.fragmentStoresAndAtomics;
copy.shaderTessellationAndGeometryPointSize = original.shaderTessellationAndGeometryPointSize;
copy.shaderImageGatherExtended = original.shaderImageGatherExtended;
copy.shaderStorageImageExtendedFormats = original.shaderStorageImageExtendedFormats;
copy.shaderStorageImageMultisample = original.shaderStorageImageMultisample;
copy.shaderStorageImageReadWithoutFormat = original.shaderStorageImageReadWithoutFormat;
copy.shaderStorageImageWriteWithoutFormat = original.shaderStorageImageWriteWithoutFormat;
copy.shaderUniformBufferArrayDynamicIndexing = original.shaderUniformBufferArrayDynamicIndexing;
copy.shaderSampledImageArrayDynamicIndexing = original.shaderSampledImageArrayDynamicIndexing;
copy.shaderStorageBufferArrayDynamicIndexing = original.shaderStorageBufferArrayDynamicIndexing;
copy.shaderStorageImageArrayDynamicIndexing = original.shaderStorageImageArrayDynamicIndexing;
copy.shaderClipDistance = original.shaderClipDistance;
copy.shaderCullDistance = original.shaderCullDistance;
copy.shaderFloat64 = original.shaderFloat64;
copy.shaderInt64 = original.shaderInt64;
copy.shaderInt16 = original.shaderInt16;
copy.shaderResourceResidency = original.shaderResourceResidency;
copy.shaderResourceMinLod = original.shaderResourceMinLod;
copy.sparseBinding = original.sparseBinding;
copy.sparseResidencyBuffer = original.sparseResidencyBuffer;
copy.sparseResidencyImage2D = original.sparseResidencyImage2D;
copy.sparseResidencyImage3D = original.sparseResidencyImage3D;
copy.sparseResidency2Samples = original.sparseResidency2Samples;
copy.sparseResidency4Samples = original.sparseResidency4Samples;
copy.sparseResidency8Samples = original.sparseResidency8Samples;
copy.sparseResidency16Samples = original.sparseResidency16Samples;
copy.sparseResidencyAliased = original.sparseResidencyAliased;
copy.variableMultisampleRate = original.variableMultisampleRate;
copy.inheritedQueries = original.inheritedQueries;
return copy;
};
VkPhysicalDeviceFeatures.byteLength = 0xDC;
VkPhysicalDeviceFeatures.memoryLayout = {
robustBufferAccess: {
byteOffset: 0x0,
byteLength: 0x4
},
fullDrawIndexUint32: {
byteOffset: 0x4,
byteLength: 0x4
},
imageCubeArray: {
byteOffset: 0x8,
byteLength: 0x4
},
independentBlend: {
byteOffset: 0xC,
byteLength: 0x4
},
geometryShader: {
byteOffset: 0x10,
byteLength: 0x4
},
tessellationShader: {
byteOffset: 0x14,
byteLength: 0x4
},
sampleRateShading: {
byteOffset: 0x18,
byteLength: 0x4
},
dualSrcBlend: {
byteOffset: 0x1C,
byteLength: 0x4
},
logicOp: {
byteOffset: 0x20,
byteLength: 0x4
},
multiDrawIndirect: {
byteOffset: 0x24,
byteLength: 0x4
},
drawIndirectFirstInstance: {
byteOffset: 0x28,
byteLength: 0x4
},
depthClamp: {
byteOffset: 0x2C,
byteLength: 0x4
},
depthBiasClamp: {
byteOffset: 0x30,
byteLength: 0x4
},
fillModeNonSolid: {
byteOffset: 0x34,
byteLength: 0x4
},
depthBounds: {
byteOffset: 0x38,
byteLength: 0x4
},
wideLines: {
byteOffset: 0x3C,
byteLength: 0x4
},
largePoints: {
byteOffset: 0x40,
byteLength: 0x4
},
alphaToOne: {
byteOffset: 0x44,
byteLength: 0x4
},
multiViewport: {
byteOffset: 0x48,
byteLength: 0x4
},
samplerAnisotropy: {
byteOffset: 0x4C,
byteLength: 0x4
},
textureCompressionETC2: {
byteOffset: 0x50,
byteLength: 0x4
},
textureCompressionASTC_LDR: {
byteOffset: 0x54,
byteLength: 0x4
},
textureCompressionBC: {
byteOffset: 0x58,
byteLength: 0x4
},
occlusionQueryPrecise: {
byteOffset: 0x5C,
byteLength: 0x4
},
pipelineStatisticsQuery: {
byteOffset: 0x60,
byteLength: 0x4
},
vertexPipelineStoresAndAtomics: {
byteOffset: 0x64,
byteLength: 0x4
},
fragmentStoresAndAtomics: {
byteOffset: 0x68,
byteLength: 0x4
},
shaderTessellationAndGeometryPointSize: {
byteOffset: 0x6C,
byteLength: 0x4
},
shaderImageGatherExtended: {
byteOffset: 0x70,
byteLength: 0x4
},
shaderStorageImageExtendedFormats: {
byteOffset: 0x74,
byteLength: 0x4
},
shaderStorageImageMultisample: {
byteOffset: 0x78,
byteLength: 0x4
},
shaderStorageImageReadWithoutFormat: {
byteOffset: 0x7C,
byteLength: 0x4
},
shaderStorageImageWriteWithoutFormat: {
byteOffset: 0x80,
byteLength: 0x4
},
shaderUniformBufferArrayDynamicIndexing: {
byteOffset: 0x84,
byteLength: 0x4
},
shaderSampledImageArrayDynamicIndexing: {
byteOffset: 0x88,
byteLength: 0x4
},
shaderStorageBufferArrayDynamicIndexing: {
byteOffset: 0x8C,
byteLength: 0x4
},
shaderStorageImageArrayDynamicIndexing: {
byteOffset: 0x90,
byteLength: 0x4
},
shaderClipDistance: {
byteOffset: 0x94,
byteLength: 0x4
},
shaderCullDistance: {
byteOffset: 0x98,
byteLength: 0x4
},
shaderFloat64: {
byteOffset: 0x9C,
byteLength: 0x4
},
shaderInt64: {
byteOffset: 0xA0,
byteLength: 0x4
},
shaderInt16: {
byteOffset: 0xA4,
byteLength: 0x4
},
shaderResourceResidency: {
byteOffset: 0xA8,
byteLength: 0x4
},
shaderResourceMinLod: {
byteOffset: 0xAC,
byteLength: 0x4
},
sparseBinding: {
byteOffset: 0xB0,
byteLength: 0x4
},
sparseResidencyBuffer: {
byteOffset: 0xB4,
byteLength: 0x4
},
sparseResidencyImage2D: {
byteOffset: 0xB8,
byteLength: 0x4
},
sparseResidencyImage3D: {
byteOffset: 0xBC,
byteLength: 0x4
},
sparseResidency2Samples: {
byteOffset: 0xC0,
byteLength: 0x4
},
sparseResidency4Samples: {
byteOffset: 0xC4,
byteLength: 0x4
},
sparseResidency8Samples: {
byteOffset: 0xC8,
byteLength: 0x4
},
sparseResidency16Samples: {
byteOffset: 0xCC,
byteLength: 0x4
},
sparseResidencyAliased: {
byteOffset: 0xD0,
byteLength: 0x4
},
variableMultisampleRate: {
byteOffset: 0xD4,
byteLength: 0x4
},
inheritedQueries: {
byteOffset: 0xD8,
byteLength: 0x4
},
};
/** VkPhysicalDeviceSparseProperties **/
function VkPhysicalDeviceSparseProperties(opts, byteOffset) {
if (new.target !== VkPhysicalDeviceSparseProperties) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPhysicalDeviceSparseProperties, STRUCT_CACHE_VkPhysicalDeviceSparseProperties);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPhysicalDeviceSparseProperties, STRUCT_CACHE_VkPhysicalDeviceSparseProperties);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPhysicalDeviceSparseProperties'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x14);
} else {
this.memoryBuffer = new ArrayBuffer(0x14);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x14);
}
if (typeof opts === "object") {
}
};
Object.defineProperties(VkPhysicalDeviceSparseProperties.prototype, {
"residencyStandard2DBlockShape": {
get() {
return this.memoryView.getUint32(0x0, true) !== 0;
},
},
"residencyStandard2DMultisampleBlockShape": {
get() {
return this.memoryView.getUint32(0x4, true) !== 0;
},
},
"residencyStandard3DBlockShape": {
get() {
return this.memoryView.getUint32(0x8, true) !== 0;
},
},
"residencyAlignedMipSize": {
get() {
return this.memoryView.getUint32(0xC, true) !== 0;
},
},
"residencyNonResidentStrict": {
get() {
return this.memoryView.getUint32(0x10, true) !== 0;
},
},
});
VkPhysicalDeviceSparseProperties.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x14);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x14"], 0x0);
if (typeof opts === "object") {
}
};
VkPhysicalDeviceSparseProperties.prototype.flush = function flush() {
return true;
};
VkPhysicalDeviceSparseProperties.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x14));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x14), 0x0);};
VkPhysicalDeviceSparseProperties.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPhysicalDeviceSparseProperties();
copy.residencyStandard2DBlockShape = original.residencyStandard2DBlockShape;
copy.residencyStandard2DMultisampleBlockShape = original.residencyStandard2DMultisampleBlockShape;
copy.residencyStandard3DBlockShape = original.residencyStandard3DBlockShape;
copy.residencyAlignedMipSize = original.residencyAlignedMipSize;
copy.residencyNonResidentStrict = original.residencyNonResidentStrict;
return copy;
};
VkPhysicalDeviceSparseProperties.byteLength = 0x14;
VkPhysicalDeviceSparseProperties.memoryLayout = {
residencyStandard2DBlockShape: {
byteOffset: 0x0,
byteLength: 0x4
},
residencyStandard2DMultisampleBlockShape: {
byteOffset: 0x4,
byteLength: 0x4
},
residencyStandard3DBlockShape: {
byteOffset: 0x8,
byteLength: 0x4
},
residencyAlignedMipSize: {
byteOffset: 0xC,
byteLength: 0x4
},
residencyNonResidentStrict: {
byteOffset: 0x10,
byteLength: 0x4
},
};
/** VkPhysicalDeviceLimits **/
function VkPhysicalDeviceLimits(opts, byteOffset) {
if (new.target !== VkPhysicalDeviceLimits) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkPhysicalDeviceLimits, STRUCT_CACHE_VkPhysicalDeviceLimits);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkPhysicalDeviceLimits, STRUCT_CACHE_VkPhysicalDeviceLimits);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkPhysicalDeviceLimits'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x1F8);
} else {
this.memoryBuffer = new ArrayBuffer(0x1F8);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x1F8);
}
this._maxComputeWorkGroupCount = [...Array(3)].fill(0x0);
this._maxComputeWorkGroupSize = [...Array(3)].fill(0x0);
this._maxViewportDimensions = [...Array(2)].fill(0x0);
this._viewportBoundsRange = [...Array(2)].fill(0x0);
this._pointSizeRange = [...Array(2)].fill(0x0);
this._lineWidthRange = [...Array(2)].fill(0x0);
if (typeof opts === "object") {
}
};
Object.defineProperties(VkPhysicalDeviceLimits.prototype, {
"maxImageDimension1D": {
get() {
return this.memoryView.getUint32(0x0, true);
},
},
"maxImageDimension2D": {
get() {
return this.memoryView.getUint32(0x4, true);
},
},
"maxImageDimension3D": {
get() {
return this.memoryView.getUint32(0x8, true);
},
},
"maxImageDimensionCube": {
get() {
return this.memoryView.getUint32(0xC, true);
},
},
"maxImageArrayLayers": {
get() {
return this.memoryView.getUint32(0x10, true);
},
},
"maxTexelBufferElements": {
get() {
return this.memoryView.getUint32(0x14, true);
},
},
"maxUniformBufferRange": {
get() {
return this.memoryView.getUint32(0x18, true);
},
},
"maxStorageBufferRange": {
get() {
return this.memoryView.getUint32(0x1C, true);
},
},
"maxPushConstantsSize": {
get() {
return this.memoryView.getUint32(0x20, true);
},
},
"maxMemoryAllocationCount": {
get() {
return this.memoryView.getUint32(0x24, true);
},
},
"maxSamplerAllocationCount": {
get() {
return this.memoryView.getUint32(0x28, true);
},
},
"bufferImageGranularity": {
get() {
return this.memoryView.getBigUint64(0x30, true);
},
},
"sparseAddressSpaceSize": {
get() {
return this.memoryView.getBigUint64(0x38, true);
},
},
"maxBoundDescriptorSets": {
get() {
return this.memoryView.getUint32(0x40, true);
},
},
"maxPerStageDescriptorSamplers": {
get() {
return this.memoryView.getUint32(0x44, true);
},
},
"maxPerStageDescriptorUniformBuffers": {
get() {
return this.memoryView.getUint32(0x48, true);
},
},
"maxPerStageDescriptorStorageBuffers": {
get() {
return this.memoryView.getUint32(0x4C, true);
},
},
"maxPerStageDescriptorSampledImages": {
get() {
return this.memoryView.getUint32(0x50, true);
},
},
"maxPerStageDescriptorStorageImages": {
get() {
return this.memoryView.getUint32(0x54, true);
},
},
"maxPerStageDescriptorInputAttachments": {
get() {
return this.memoryView.getUint32(0x58, true);
},
},
"maxPerStageResources": {
get() {
return this.memoryView.getUint32(0x5C, true);
},
},
"maxDescriptorSetSamplers": {
get() {
return this.memoryView.getUint32(0x60, true);
},
},
"maxDescriptorSetUniformBuffers": {
get() {
return this.memoryView.getUint32(0x64, true);
},
},
"maxDescriptorSetUniformBuffersDynamic": {
get() {
return this.memoryView.getUint32(0x68, true);
},
},
"maxDescriptorSetStorageBuffers": {
get() {
return this.memoryView.getUint32(0x6C, true);
},
},
"maxDescriptorSetStorageBuffersDynamic": {
get() {
return this.memoryView.getUint32(0x70, true);
},
},
"maxDescriptorSetSampledImages": {
get() {
return this.memoryView.getUint32(0x74, true);
},
},
"maxDescriptorSetStorageImages": {
get() {
return this.memoryView.getUint32(0x78, true);
},
},
"maxDescriptorSetInputAttachments": {
get() {
return this.memoryView.getUint32(0x7C, true);
},
},
"maxVertexInputAttributes": {
get() {
return this.memoryView.getUint32(0x80, true);
},
},
"maxVertexInputBindings": {
get() {
return this.memoryView.getUint32(0x84, true);
},
},
"maxVertexInputAttributeOffset": {
get() {
return this.memoryView.getUint32(0x88, true);
},
},
"maxVertexInputBindingStride": {
get() {
return this.memoryView.getUint32(0x8C, true);
},
},
"maxVertexOutputComponents": {
get() {
return this.memoryView.getUint32(0x90, true);
},
},
"maxTessellationGenerationLevel": {
get() {
return this.memoryView.getUint32(0x94, true);
},
},
"maxTessellationPatchSize": {
get() {
return this.memoryView.getUint32(0x98, true);
},
},
"maxTessellationControlPerVertexInputComponents": {
get() {
return this.memoryView.getUint32(0x9C, true);
},
},
"maxTessellationControlPerVertexOutputComponents": {
get() {
return this.memoryView.getUint32(0xA0, true);
},
},
"maxTessellationControlPerPatchOutputComponents": {
get() {
return this.memoryView.getUint32(0xA4, true);
},
},
"maxTessellationControlTotalOutputComponents": {
get() {
return this.memoryView.getUint32(0xA8, true);
},
},
"maxTessellationEvaluationInputComponents": {
get() {
return this.memoryView.getUint32(0xAC, true);
},
},
"maxTessellationEvaluationOutputComponents": {
get() {
return this.memoryView.getUint32(0xB0, true);
},
},
"maxGeometryShaderInvocations": {
get() {
return this.memoryView.getUint32(0xB4, true);
},
},
"maxGeometryInputComponents": {
get() {
return this.memoryView.getUint32(0xB8, true);
},
},
"maxGeometryOutputComponents": {
get() {
return this.memoryView.getUint32(0xBC, true);
},
},
"maxGeometryOutputVertices": {
get() {
return this.memoryView.getUint32(0xC0, true);
},
},
"maxGeometryTotalOutputComponents": {
get() {
return this.memoryView.getUint32(0xC4, true);
},
},
"maxFragmentInputComponents": {
get() {
return this.memoryView.getUint32(0xC8, true);
},
},
"maxFragmentOutputAttachments": {
get() {
return this.memoryView.getUint32(0xCC, true);
},
},
"maxFragmentDualSrcAttachments": {
get() {
return this.memoryView.getUint32(0xD0, true);
},
},
"maxFragmentCombinedOutputResources": {
get() {
return this.memoryView.getUint32(0xD4, true);
},
},
"maxComputeSharedMemorySize": {
get() {
return this.memoryView.getUint32(0xD8, true);
},
},
"maxComputeWorkGroupCount": {
get() {
return [
this.memoryView.getUint32(0xDC, true),
this.memoryView.getUint32(0xE0, true),
this.memoryView.getUint32(0xE4, true)
];
},
},
"maxComputeWorkGroupInvocations": {
get() {
return this.memoryView.getUint32(0xE8, true);
},
},
"maxComputeWorkGroupSize": {
get() {
return [
this.memoryView.getUint32(0xEC, true),
this.memoryView.getUint32(0xF0, true),
this.memoryView.getUint32(0xF4, true)
];
},
},
"subPixelPrecisionBits": {
get() {
return this.memoryView.getUint32(0xF8, true);
},
},
"subTexelPrecisionBits": {
get() {
return this.memoryView.getUint32(0xFC, true);
},
},
"mipmapPrecisionBits": {
get() {
return this.memoryView.getUint32(0x100, true);
},
},
"maxDrawIndexedIndexValue": {
get() {
return this.memoryView.getUint32(0x104, true);
},
},
"maxDrawIndirectCount": {
get() {
return this.memoryView.getUint32(0x108, true);
},
},
"maxSamplerLodBias": {
get() {
return this.memoryView.getFloat32(0x10C, true);
},
},
"maxSamplerAnisotropy": {
get() {
return this.memoryView.getFloat32(0x110, true);
},
},
"maxViewports": {
get() {
return this.memoryView.getUint32(0x114, true);
},
},
"maxViewportDimensions": {
get() {
return [
this.memoryView.getUint32(0x118, true),
this.memoryView.getUint32(0x11C, true)
];
},
},
"viewportBoundsRange": {
get() {
return [
this.memoryView.getFloat32(0x120, true),
this.memoryView.getFloat32(0x124, true)
];
},
},
"viewportSubPixelBits": {
get() {
return this.memoryView.getUint32(0x128, true);
},
},
"minMemoryMapAlignment": {
get() {
return this.memoryView.getBigInt64(0x130, true);
},
},
"minTexelBufferOffsetAlignment": {
get() {
return this.memoryView.getBigUint64(0x138, true);
},
},
"minUniformBufferOffsetAlignment": {
get() {
return this.memoryView.getBigUint64(0x140, true);
},
},
"minStorageBufferOffsetAlignment": {
get() {
return this.memoryView.getBigUint64(0x148, true);
},
},
"minTexelOffset": {
get() {
return this.memoryView.getInt32(0x150, true);
},
},
"maxTexelOffset": {
get() {
return this.memoryView.getUint32(0x154, true);
},
},
"minTexelGatherOffset": {
get() {
return this.memoryView.getInt32(0x158, true);
},
},
"maxTexelGatherOffset": {
get() {
return this.memoryView.getUint32(0x15C, true);
},
},
"minInterpolationOffset": {
get() {
return this.memoryView.getFloat32(0x160, true);
},
},
"maxInterpolationOffset": {
get() {
return this.memoryView.getFloat32(0x164, true);
},
},
"subPixelInterpolationOffsetBits": {
get() {
return this.memoryView.getUint32(0x168, true);
},
},
"maxFramebufferWidth": {
get() {
return this.memoryView.getUint32(0x16C, true);
},
},
"maxFramebufferHeight": {
get() {
return this.memoryView.getUint32(0x170, true);
},
},
"maxFramebufferLayers": {
get() {
return this.memoryView.getUint32(0x174, true);
},
},
"framebufferColorSampleCounts": {
get() {
return this.memoryView.getInt32(0x178, true);
},
},
"framebufferDepthSampleCounts": {
get() {
return this.memoryView.getInt32(0x17C, true);
},
},
"framebufferStencilSampleCounts": {
get() {
return this.memoryView.getInt32(0x180, true);
},
},
"framebufferNoAttachmentsSampleCounts": {
get() {
return this.memoryView.getInt32(0x184, true);
},
},
"maxColorAttachments": {
get() {
return this.memoryView.getUint32(0x188, true);
},
},
"sampledImageColorSampleCounts": {
get() {
return this.memoryView.getInt32(0x18C, true);
},
},
"sampledImageIntegerSampleCounts": {
get() {
return this.memoryView.getInt32(0x190, true);
},
},
"sampledImageDepthSampleCounts": {
get() {
return this.memoryView.getInt32(0x194, true);
},
},
"sampledImageStencilSampleCounts": {
get() {
return this.memoryView.getInt32(0x198, true);
},
},
"storageImageSampleCounts": {
get() {
return this.memoryView.getInt32(0x19C, true);
},
},
"maxSampleMaskWords": {
get() {
return this.memoryView.getUint32(0x1A0, true);
},
},
"timestampComputeAndGraphics": {
get() {
return this.memoryView.getUint32(0x1A4, true) !== 0;
},
},
"timestampPeriod": {
get() {
return this.memoryView.getFloat32(0x1A8, true);
},
},
"maxClipDistances": {
get() {
return this.memoryView.getUint32(0x1AC, true);
},
},
"maxCullDistances": {
get() {
return this.memoryView.getUint32(0x1B0, true);
},
},
"maxCombinedClipAndCullDistances": {
get() {
return this.memoryView.getUint32(0x1B4, true);
},
},
"discreteQueuePriorities": {
get() {
return this.memoryView.getUint32(0x1B8, true);
},
},
"pointSizeRange": {
get() {
return [
this.memoryView.getFloat32(0x1BC, true),
this.memoryView.getFloat32(0x1C0, true)
];
},
},
"lineWidthRange": {
get() {
return [
this.memoryView.getFloat32(0x1C4, true),
this.memoryView.getFloat32(0x1C8, true)
];
},
},
"pointSizeGranularity": {
get() {
return this.memoryView.getFloat32(0x1CC, true);
},
},
"lineWidthGranularity": {
get() {
return this.memoryView.getFloat32(0x1D0, true);
},
},
"strictLines": {
get() {
return this.memoryView.getUint32(0x1D4, true) !== 0;
},
},
"standardSampleLocations": {
get() {
return this.memoryView.getUint32(0x1D8, true) !== 0;
},
},
"optimalBufferCopyOffsetAlignment": {
get() {
return this.memoryView.getBigUint64(0x1E0, true);
},
},
"optimalBufferCopyRowPitchAlignment": {
get() {
return this.memoryView.getBigUint64(0x1E8, true);
},
},
"nonCoherentAtomSize": {
get() {
return this.memoryView.getBigUint64(0x1F0, true);
},
},
});
VkPhysicalDeviceLimits.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x1F8);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x1F8"], 0x0);
if (this._maxComputeWorkGroupCount !== null) this._maxComputeWorkGroupCount.fill(0x0);
else this._maxComputeWorkGroupCount = [...Array(3)].fill(0x0);
if (this._maxComputeWorkGroupSize !== null) this._maxComputeWorkGroupSize.fill(0x0);
else this._maxComputeWorkGroupSize = [...Array(3)].fill(0x0);
if (this._maxViewportDimensions !== null) this._maxViewportDimensions.fill(0x0);
else this._maxViewportDimensions = [...Array(2)].fill(0x0);
if (this._viewportBoundsRange !== null) this._viewportBoundsRange.fill(0x0);
else this._viewportBoundsRange = [...Array(2)].fill(0x0);
if (this._pointSizeRange !== null) this._pointSizeRange.fill(0x0);
else this._pointSizeRange = [...Array(2)].fill(0x0);
if (this._lineWidthRange !== null) this._lineWidthRange.fill(0x0);
else this._lineWidthRange = [...Array(2)].fill(0x0);
if (typeof opts === "object") {
}
};
VkPhysicalDeviceLimits.prototype.flush = function flush() {
return true;
};
VkPhysicalDeviceLimits.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x1F8));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x1F8), 0x0);};
VkPhysicalDeviceLimits.createCopyFrom = function createCopyFrom(original) {
let copy = new VkPhysicalDeviceLimits();
copy.maxImageDimension1D = original.maxImageDimension1D;
copy.maxImageDimension2D = original.maxImageDimension2D;
copy.maxImageDimension3D = original.maxImageDimension3D;
copy.maxImageDimensionCube = original.maxImageDimensionCube;
copy.maxImageArrayLayers = original.maxImageArrayLayers;
copy.maxTexelBufferElements = original.maxTexelBufferElements;
copy.maxUniformBufferRange = original.maxUniformBufferRange;
copy.maxStorageBufferRange = original.maxStorageBufferRange;
copy.maxPushConstantsSize = original.maxPushConstantsSize;
copy.maxMemoryAllocationCount = original.maxMemoryAllocationCount;
copy.maxSamplerAllocationCount = original.maxSamplerAllocationCount;
copy.bufferImageGranularity = original.bufferImageGranularity;
copy.sparseAddressSpaceSize = original.sparseAddressSpaceSize;
copy.maxBoundDescriptorSets = original.maxBoundDescriptorSets;
copy.maxPerStageDescriptorSamplers = original.maxPerStageDescriptorSamplers;
copy.maxPerStageDescriptorUniformBuffers = original.maxPerStageDescriptorUniformBuffers;
copy.maxPerStageDescriptorStorageBuffers = original.maxPerStageDescriptorStorageBuffers;
copy.maxPerStageDescriptorSampledImages = original.maxPerStageDescriptorSampledImages;
copy.maxPerStageDescriptorStorageImages = original.maxPerStageDescriptorStorageImages;
copy.maxPerStageDescriptorInputAttachments = original.maxPerStageDescriptorInputAttachments;
copy.maxPerStageResources = original.maxPerStageResources;
copy.maxDescriptorSetSamplers = original.maxDescriptorSetSamplers;
copy.maxDescriptorSetUniformBuffers = original.maxDescriptorSetUniformBuffers;
copy.maxDescriptorSetUniformBuffersDynamic = original.maxDescriptorSetUniformBuffersDynamic;
copy.maxDescriptorSetStorageBuffers = original.maxDescriptorSetStorageBuffers;
copy.maxDescriptorSetStorageBuffersDynamic = original.maxDescriptorSetStorageBuffersDynamic;
copy.maxDescriptorSetSampledImages = original.maxDescriptorSetSampledImages;
copy.maxDescriptorSetStorageImages = original.maxDescriptorSetStorageImages;
copy.maxDescriptorSetInputAttachments = original.maxDescriptorSetInputAttachments;
copy.maxVertexInputAttributes = original.maxVertexInputAttributes;
copy.maxVertexInputBindings = original.maxVertexInputBindings;
copy.maxVertexInputAttributeOffset = original.maxVertexInputAttributeOffset;
copy.maxVertexInputBindingStride = original.maxVertexInputBindingStride;
copy.maxVertexOutputComponents = original.maxVertexOutputComponents;
copy.maxTessellationGenerationLevel = original.maxTessellationGenerationLevel;
copy.maxTessellationPatchSize = original.maxTessellationPatchSize;
copy.maxTessellationControlPerVertexInputComponents = original.maxTessellationControlPerVertexInputComponents;
copy.maxTessellationControlPerVertexOutputComponents = original.maxTessellationControlPerVertexOutputComponents;
copy.maxTessellationControlPerPatchOutputComponents = original.maxTessellationControlPerPatchOutputComponents;
copy.maxTessellationControlTotalOutputComponents = original.maxTessellationControlTotalOutputComponents;
copy.maxTessellationEvaluationInputComponents = original.maxTessellationEvaluationInputComponents;
copy.maxTessellationEvaluationOutputComponents = original.maxTessellationEvaluationOutputComponents;
copy.maxGeometryShaderInvocations = original.maxGeometryShaderInvocations;
copy.maxGeometryInputComponents = original.maxGeometryInputComponents;
copy.maxGeometryOutputComponents = original.maxGeometryOutputComponents;
copy.maxGeometryOutputVertices = original.maxGeometryOutputVertices;
copy.maxGeometryTotalOutputComponents = original.maxGeometryTotalOutputComponents;
copy.maxFragmentInputComponents = original.maxFragmentInputComponents;
copy.maxFragmentOutputAttachments = original.maxFragmentOutputAttachments;
copy.maxFragmentDualSrcAttachments = original.maxFragmentDualSrcAttachments;
copy.maxFragmentCombinedOutputResources = original.maxFragmentCombinedOutputResources;
copy.maxComputeSharedMemorySize = original.maxComputeSharedMemorySize;
if (original.maxComputeWorkGroupCount !== null) {
copy.maxComputeWorkGroupCount = [...Array(original.maxComputeWorkGroupCount.length)].map((v, i) => {
return original.maxComputeWorkGroupCount[i];
});
}
copy.maxComputeWorkGroupInvocations = original.maxComputeWorkGroupInvocations;
if (original.maxComputeWorkGroupSize !== null) {
copy.maxComputeWorkGroupSize = [...Array(original.maxComputeWorkGroupSize.length)].map((v, i) => {
return original.maxComputeWorkGroupSize[i];
});
}
copy.subPixelPrecisionBits = original.subPixelPrecisionBits;
copy.subTexelPrecisionBits = original.subTexelPrecisionBits;
copy.mipmapPrecisionBits = original.mipmapPrecisionBits;
copy.maxDrawIndexedIndexValue = original.maxDrawIndexedIndexValue;
copy.maxDrawIndirectCount = original.maxDrawIndirectCount;
copy.maxSamplerLodBias = original.maxSamplerLodBias;
copy.maxSamplerAnisotropy = original.maxSamplerAnisotropy;
copy.maxViewports = original.maxViewports;
if (original.maxViewportDimensions !== null) {
copy.maxViewportDimensions = [...Array(original.maxViewportDimensions.length)].map((v, i) => {
return original.maxViewportDimensions[i];
});
}
if (original.viewportBoundsRange !== null) {
copy.viewportBoundsRange = [...Array(original.viewportBoundsRange.length)].map((v, i) => {
return original.viewportBoundsRange[i];
});
}
copy.viewportSubPixelBits = original.viewportSubPixelBits;
copy.minMemoryMapAlignment = original.minMemoryMapAlignment;
copy.minTexelBufferOffsetAlignment = original.minTexelBufferOffsetAlignment;
copy.minUniformBufferOffsetAlignment = original.minUniformBufferOffsetAlignment;
copy.minStorageBufferOffsetAlignment = original.minStorageBufferOffsetAlignment;
copy.minTexelOffset = original.minTexelOffset;
copy.maxTexelOffset = original.maxTexelOffset;
copy.minTexelGatherOffset = original.minTexelGatherOffset;
copy.maxTexelGatherOffset = original.maxTexelGatherOffset;
copy.minInterpolationOffset = original.minInterpolationOffset;
copy.maxInterpolationOffset = original.maxInterpolationOffset;
copy.subPixelInterpolationOffsetBits = original.subPixelInterpolationOffsetBits;
copy.maxFramebufferWidth = original.maxFramebufferWidth;
copy.maxFramebufferHeight = original.maxFramebufferHeight;
copy.maxFramebufferLayers = original.maxFramebufferLayers;
copy.framebufferColorSampleCounts = original.framebufferColorSampleCounts;
copy.framebufferDepthSampleCounts = original.framebufferDepthSampleCounts;
copy.framebufferStencilSampleCounts = original.framebufferStencilSampleCounts;
copy.framebufferNoAttachmentsSampleCounts = original.framebufferNoAttachmentsSampleCounts;
copy.maxColorAttachments = original.maxColorAttachments;
copy.sampledImageColorSampleCounts = original.sampledImageColorSampleCounts;
copy.sampledImageIntegerSampleCounts = original.sampledImageIntegerSampleCounts;
copy.sampledImageDepthSampleCounts = original.sampledImageDepthSampleCounts;
copy.sampledImageStencilSampleCounts = original.sampledImageStencilSampleCounts;
copy.storageImageSampleCounts = original.storageImageSampleCounts;
copy.maxSampleMaskWords = original.maxSampleMaskWords;
copy.timestampComputeAndGraphics = original.timestampComputeAndGraphics;
copy.timestampPeriod = original.timestampPeriod;
copy.maxClipDistances = original.maxClipDistances;
copy.maxCullDistances = original.maxCullDistances;
copy.maxCombinedClipAndCullDistances = original.maxCombinedClipAndCullDistances;
copy.discreteQueuePriorities = original.discreteQueuePriorities;
if (original.pointSizeRange !== null) {
copy.pointSizeRange = [...Array(original.pointSizeRange.length)].map((v, i) => {
return original.pointSizeRange[i];
});
}
if (original.lineWidthRange !== null) {
copy.lineWidthRange = [...Array(original.lineWidthRange.length)].map((v, i) => {
return original.lineWidthRange[i];
});
}
copy.pointSizeGranularity = original.pointSizeGranularity;
copy.lineWidthGranularity = original.lineWidthGranularity;
copy.strictLines = original.strictLines;
copy.standardSampleLocations = original.standardSampleLocations;
copy.optimalBufferCopyOffsetAlignment = original.optimalBufferCopyOffsetAlignment;
copy.optimalBufferCopyRowPitchAlignment = original.optimalBufferCopyRowPitchAlignment;
copy.nonCoherentAtomSize = original.nonCoherentAtomSize;
return copy;
};
VkPhysicalDeviceLimits.byteLength = 0x1F8;
VkPhysicalDeviceLimits.memoryLayout = {
maxImageDimension1D: {
byteOffset: 0x0,
byteLength: 0x4
},
maxImageDimension2D: {
byteOffset: 0x4,
byteLength: 0x4
},
maxImageDimension3D: {
byteOffset: 0x8,
byteLength: 0x4
},
maxImageDimensionCube: {
byteOffset: 0xC,
byteLength: 0x4
},
maxImageArrayLayers: {
byteOffset: 0x10,
byteLength: 0x4
},
maxTexelBufferElements: {
byteOffset: 0x14,
byteLength: 0x4
},
maxUniformBufferRange: {
byteOffset: 0x18,
byteLength: 0x4
},
maxStorageBufferRange: {
byteOffset: 0x1C,
byteLength: 0x4
},
maxPushConstantsSize: {
byteOffset: 0x20,
byteLength: 0x4
},
maxMemoryAllocationCount: {
byteOffset: 0x24,
byteLength: 0x4
},
maxSamplerAllocationCount: {
byteOffset: 0x28,
byteLength: 0x4
},
bufferImageGranularity: {
byteOffset: 0x30,
byteLength: 0x8
},
sparseAddressSpaceSize: {
byteOffset: 0x38,
byteLength: 0x8
},
maxBoundDescriptorSets: {
byteOffset: 0x40,
byteLength: 0x4
},
maxPerStageDescriptorSamplers: {
byteOffset: 0x44,
byteLength: 0x4
},
maxPerStageDescriptorUniformBuffers: {
byteOffset: 0x48,
byteLength: 0x4
},
maxPerStageDescriptorStorageBuffers: {
byteOffset: 0x4C,
byteLength: 0x4
},
maxPerStageDescriptorSampledImages: {
byteOffset: 0x50,
byteLength: 0x4
},
maxPerStageDescriptorStorageImages: {
byteOffset: 0x54,
byteLength: 0x4
},
maxPerStageDescriptorInputAttachments: {
byteOffset: 0x58,
byteLength: 0x4
},
maxPerStageResources: {
byteOffset: 0x5C,
byteLength: 0x4
},
maxDescriptorSetSamplers: {
byteOffset: 0x60,
byteLength: 0x4
},
maxDescriptorSetUniformBuffers: {
byteOffset: 0x64,
byteLength: 0x4
},
maxDescriptorSetUniformBuffersDynamic: {
byteOffset: 0x68,
byteLength: 0x4
},
maxDescriptorSetStorageBuffers: {
byteOffset: 0x6C,
byteLength: 0x4
},
maxDescriptorSetStorageBuffersDynamic: {
byteOffset: 0x70,
byteLength: 0x4
},
maxDescriptorSetSampledImages: {
byteOffset: 0x74,
byteLength: 0x4
},
maxDescriptorSetStorageImages: {
byteOffset: 0x78,
byteLength: 0x4
},
maxDescriptorSetInputAttachments: {
byteOffset: 0x7C,
byteLength: 0x4
},
maxVertexInputAttributes: {
byteOffset: 0x80,
byteLength: 0x4
},
maxVertexInputBindings: {
byteOffset: 0x84,
byteLength: 0x4
},
maxVertexInputAttributeOffset: {
byteOffset: 0x88,
byteLength: 0x4
},
maxVertexInputBindingStride: {
byteOffset: 0x8C,
byteLength: 0x4
},
maxVertexOutputComponents: {
byteOffset: 0x90,
byteLength: 0x4
},
maxTessellationGenerationLevel: {
byteOffset: 0x94,
byteLength: 0x4
},
maxTessellationPatchSize: {
byteOffset: 0x98,
byteLength: 0x4
},
maxTessellationControlPerVertexInputComponents: {
byteOffset: 0x9C,
byteLength: 0x4
},
maxTessellationControlPerVertexOutputComponents: {
byteOffset: 0xA0,
byteLength: 0x4
},
maxTessellationControlPerPatchOutputComponents: {
byteOffset: 0xA4,
byteLength: 0x4
},
maxTessellationControlTotalOutputComponents: {
byteOffset: 0xA8,
byteLength: 0x4
},
maxTessellationEvaluationInputComponents: {
byteOffset: 0xAC,
byteLength: 0x4
},
maxTessellationEvaluationOutputComponents: {
byteOffset: 0xB0,
byteLength: 0x4
},
maxGeometryShaderInvocations: {
byteOffset: 0xB4,
byteLength: 0x4
},
maxGeometryInputComponents: {
byteOffset: 0xB8,
byteLength: 0x4
},
maxGeometryOutputComponents: {
byteOffset: 0xBC,
byteLength: 0x4
},
maxGeometryOutputVertices: {
byteOffset: 0xC0,
byteLength: 0x4
},
maxGeometryTotalOutputComponents: {
byteOffset: 0xC4,
byteLength: 0x4
},
maxFragmentInputComponents: {
byteOffset: 0xC8,
byteLength: 0x4
},
maxFragmentOutputAttachments: {
byteOffset: 0xCC,
byteLength: 0x4
},
maxFragmentDualSrcAttachments: {
byteOffset: 0xD0,
byteLength: 0x4
},
maxFragmentCombinedOutputResources: {
byteOffset: 0xD4,
byteLength: 0x4
},
maxComputeSharedMemorySize: {
byteOffset: 0xD8,
byteLength: 0x4
},
maxComputeWorkGroupCount: {
byteOffset: 0xDC,
byteLength: 0xC
},
maxComputeWorkGroupInvocations: {
byteOffset: 0xE8,
byteLength: 0x4
},
maxComputeWorkGroupSize: {
byteOffset: 0xEC,
byteLength: 0xC
},
subPixelPrecisionBits: {
byteOffset: 0xF8,
byteLength: 0x4
},
subTexelPrecisionBits: {
byteOffset: 0xFC,
byteLength: 0x4
},
mipmapPrecisionBits: {
byteOffset: 0x100,
byteLength: 0x4
},
maxDrawIndexedIndexValue: {
byteOffset: 0x104,
byteLength: 0x4
},
maxDrawIndirectCount: {
byteOffset: 0x108,
byteLength: 0x4
},
maxSamplerLodBias: {
byteOffset: 0x10C,
byteLength: 0x4
},
maxSamplerAnisotropy: {
byteOffset: 0x110,
byteLength: 0x4
},
maxViewports: {
byteOffset: 0x114,
byteLength: 0x4
},
maxViewportDimensions: {
byteOffset: 0x118,
byteLength: 0x8
},
viewportBoundsRange: {
byteOffset: 0x120,
byteLength: 0x8
},
viewportSubPixelBits: {
byteOffset: 0x128,
byteLength: 0x4
},
minMemoryMapAlignment: {
byteOffset: 0x130,
byteLength: 0x8
},
minTexelBufferOffsetAlignment: {
byteOffset: 0x138,
byteLength: 0x8
},
minUniformBufferOffsetAlignment: {
byteOffset: 0x140,
byteLength: 0x8
},
minStorageBufferOffsetAlignment: {
byteOffset: 0x148,
byteLength: 0x8
},
minTexelOffset: {
byteOffset: 0x150,
byteLength: 0x4
},
maxTexelOffset: {
byteOffset: 0x154,
byteLength: 0x4
},
minTexelGatherOffset: {
byteOffset: 0x158,
byteLength: 0x4
},
maxTexelGatherOffset: {
byteOffset: 0x15C,
byteLength: 0x4
},
minInterpolationOffset: {
byteOffset: 0x160,
byteLength: 0x4
},
maxInterpolationOffset: {
byteOffset: 0x164,
byteLength: 0x4
},
subPixelInterpolationOffsetBits: {
byteOffset: 0x168,
byteLength: 0x4
},
maxFramebufferWidth: {
byteOffset: 0x16C,
byteLength: 0x4
},
maxFramebufferHeight: {
byteOffset: 0x170,
byteLength: 0x4
},
maxFramebufferLayers: {
byteOffset: 0x174,
byteLength: 0x4
},
framebufferColorSampleCounts: {
byteOffset: 0x178,
byteLength: 0x4
},
framebufferDepthSampleCounts: {
byteOffset: 0x17C,
byteLength: 0x4
},
framebufferStencilSampleCounts: {
byteOffset: 0x180,
byteLength: 0x4
},
framebufferNoAttachmentsSampleCounts: {
byteOffset: 0x184,
byteLength: 0x4
},
maxColorAttachments: {
byteOffset: 0x188,
byteLength: 0x4
},
sampledImageColorSampleCounts: {
byteOffset: 0x18C,
byteLength: 0x4
},
sampledImageIntegerSampleCounts: {
byteOffset: 0x190,
byteLength: 0x4
},
sampledImageDepthSampleCounts: {
byteOffset: 0x194,
byteLength: 0x4
},
sampledImageStencilSampleCounts: {
byteOffset: 0x198,
byteLength: 0x4
},
storageImageSampleCounts: {
byteOffset: 0x19C,
byteLength: 0x4
},
maxSampleMaskWords: {
byteOffset: 0x1A0,
byteLength: 0x4
},
timestampComputeAndGraphics: {
byteOffset: 0x1A4,
byteLength: 0x4
},
timestampPeriod: {
byteOffset: 0x1A8,
byteLength: 0x4
},
maxClipDistances: {
byteOffset: 0x1AC,
byteLength: 0x4
},
maxCullDistances: {
byteOffset: 0x1B0,
byteLength: 0x4
},
maxCombinedClipAndCullDistances: {
byteOffset: 0x1B4,
byteLength: 0x4
},
discreteQueuePriorities: {
byteOffset: 0x1B8,
byteLength: 0x4
},
pointSizeRange: {
byteOffset: 0x1BC,
byteLength: 0x8
},
lineWidthRange: {
byteOffset: 0x1C4,
byteLength: 0x8
},
pointSizeGranularity: {
byteOffset: 0x1CC,
byteLength: 0x4
},
lineWidthGranularity: {
byteOffset: 0x1D0,
byteLength: 0x4
},
strictLines: {
byteOffset: 0x1D4,
byteLength: 0x4
},
standardSampleLocations: {
byteOffset: 0x1D8,
byteLength: 0x4
},
optimalBufferCopyOffsetAlignment: {
byteOffset: 0x1E0,
byteLength: 0x8
},
optimalBufferCopyRowPitchAlignment: {
byteOffset: 0x1E8,
byteLength: 0x8
},
nonCoherentAtomSize: {
byteOffset: 0x1F0,
byteLength: 0x8
},
};
/** VkSemaphoreCreateInfo **/
function VkSemaphoreCreateInfo(opts, byteOffset) {
if (new.target !== VkSemaphoreCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSemaphoreCreateInfo, STRUCT_CACHE_VkSemaphoreCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSemaphoreCreateInfo, STRUCT_CACHE_VkSemaphoreCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSemaphoreCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._pNext = null;
this.sType = 0x9;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
}
};
Object.defineProperties(VkSemaphoreCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSemaphoreCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkSemaphoreCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkSemaphoreCreateInfo.pNext'");
switch (sType) {
case 0x3B9BF6C8:
case 0x3B9DF29A:
break;
default:
throw new TypeError("Invalid type for 'VkSemaphoreCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkSemaphoreCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSemaphoreCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
});
VkSemaphoreCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._pNext = null;
this.sType = 0x9;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
}
};
VkSemaphoreCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkSemaphoreCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkSemaphoreCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSemaphoreCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
return copy;
};
VkSemaphoreCreateInfo.byteLength = 0x18;
VkSemaphoreCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
};
/** VkQueryPoolCreateInfo **/
function VkQueryPoolCreateInfo(opts, byteOffset) {
if (new.target !== VkQueryPoolCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkQueryPoolCreateInfo, STRUCT_CACHE_VkQueryPoolCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkQueryPoolCreateInfo, STRUCT_CACHE_VkQueryPoolCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkQueryPoolCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x20);
} else {
this.memoryBuffer = new ArrayBuffer(0x20);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x20);
}
this._pNext = null;
this.sType = 0xB;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.queryType !== void 0) this.queryType = opts.queryType;
if (opts.queryCount !== void 0) this.queryCount = opts.queryCount;
if (opts.pipelineStatistics !== void 0) this.pipelineStatistics = opts.pipelineStatistics;
}
};
Object.defineProperties(VkQueryPoolCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkQueryPoolCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkQueryPoolCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkQueryPoolCreateInfo.pNext' isn't allowed to be filled");
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkQueryPoolCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"queryType": {
get() {
return this.memoryView.getInt32(0x14, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkQueryPoolCreateInfo.queryType");
if (!$VAL_R_VkQueryType(value)) {
throw new RangeError("Invalid value for 'VkQueryPoolCreateInfo.queryType': '" + value + "' is not a value of 'VkQueryType'");
}
this.memoryView.setInt32(0x14, value, true);
}
},
"queryCount": {
get() {
return this.memoryView.getUint32(0x18, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkQueryPoolCreateInfo.queryCount");
this.memoryView.setUint32(0x18, value, true);
}
},
"pipelineStatistics": {
get() {
return this.memoryView.getInt32(0x1C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkQueryPoolCreateInfo.pipelineStatistics");
this.memoryView.setInt32(0x1C, value, true);
}
},
});
VkQueryPoolCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x20);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x20"], 0x0);
this._pNext = null;
this.sType = 0xB;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.queryType !== void 0) this.queryType = opts.queryType;
if (opts.queryCount !== void 0) this.queryCount = opts.queryCount;
if (opts.pipelineStatistics !== void 0) this.pipelineStatistics = opts.pipelineStatistics;
}
};
VkQueryPoolCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
return true;
};
VkQueryPoolCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkQueryPoolCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkQueryPoolCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
copy.queryType = original.queryType;
copy.queryCount = original.queryCount;
copy.pipelineStatistics = original.pipelineStatistics;
return copy;
};
VkQueryPoolCreateInfo.byteLength = 0x20;
VkQueryPoolCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
queryType: {
byteOffset: 0x14,
byteLength: 0x4
},
queryCount: {
byteOffset: 0x18,
byteLength: 0x4
},
pipelineStatistics: {
byteOffset: 0x1C,
byteLength: 0x4
},
};
/** VkFramebufferCreateInfo **/
function VkFramebufferCreateInfo(opts, byteOffset) {
if (new.target !== VkFramebufferCreateInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkFramebufferCreateInfo, STRUCT_CACHE_VkFramebufferCreateInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkFramebufferCreateInfo, STRUCT_CACHE_VkFramebufferCreateInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkFramebufferCreateInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x40);
} else {
this.memoryBuffer = new ArrayBuffer(0x40);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x40);
}
this._pNext = null;
this._renderPass = null;
this._pAttachments = null;
this._pAttachmentsNative = null;
this.sType = 0x25;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.renderPass !== void 0) this.renderPass = opts.renderPass;
if (opts.attachmentCount !== void 0) this.attachmentCount = opts.attachmentCount;
if (opts.pAttachments !== void 0) this.pAttachments = opts.pAttachments;
if (opts.width !== void 0) this.width = opts.width;
if (opts.height !== void 0) this.height = opts.height;
if (opts.layers !== void 0) this.layers = opts.layers;
}
};
Object.defineProperties(VkFramebufferCreateInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkFramebufferCreateInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkFramebufferCreateInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkFramebufferCreateInfo.pNext'");
switch (sType) {
case 0x3B9C6FE1:
break;
default:
throw new TypeError("Invalid type for 'VkFramebufferCreateInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkFramebufferCreateInfo.pNext'");
}
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkFramebufferCreateInfo.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"renderPass": {
get() {
return this._renderPass;
},
set(value) {
if (value !== null && value.constructor === VkRenderPass) {
this._renderPass = value;
this.memoryView.setBigInt64(0x18, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._renderPass = null;
this.memoryView.setBigInt64(0x18, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkFramebufferCreateInfo.renderPass': Expected 'VkRenderPass' but got '" + typeToString(value) + "'");
}
}
},
"attachmentCount": {
get() {
return this.memoryView.getUint32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkFramebufferCreateInfo.attachmentCount");
this.memoryView.setUint32(0x20, value, true);
}
},
"pAttachments": {
get() {
if (this._pAttachments === null && this.memoryView.getBigInt64(0x28, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x28, true);
let array = decodeNativeArrayOfObjects(addr, this.attachmentCount, VkImageView);
this._pAttachments = array;
return this.pAttachments;
} else {
return this._pAttachments;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pAttachments = value;
} else if (value === null) {
this._pAttachments = null;
} else {
throw new TypeError("Invalid type for 'VkFramebufferCreateInfo.pAttachments': Expected 'Array VkImageView' but got '" + typeToString(value) + "'");
}
}
},
"width": {
get() {
return this.memoryView.getUint32(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkFramebufferCreateInfo.width");
this.memoryView.setUint32(0x30, value, true);
}
},
"height": {
get() {
return this.memoryView.getUint32(0x34, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkFramebufferCreateInfo.height");
this.memoryView.setUint32(0x34, value, true);
}
},
"layers": {
get() {
return this.memoryView.getUint32(0x38, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkFramebufferCreateInfo.layers");
this.memoryView.setUint32(0x38, value, true);
}
},
});
VkFramebufferCreateInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x40);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x40"], 0x0);
this._pNext = null;
this._renderPass = null;
this._pAttachments = null;
this._pAttachmentsNative = null;
this.sType = 0x25;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.renderPass !== void 0) this.renderPass = opts.renderPass;
if (opts.attachmentCount !== void 0) this.attachmentCount = opts.attachmentCount;
if (opts.pAttachments !== void 0) this.pAttachments = opts.pAttachments;
if (opts.width !== void 0) this.width = opts.width;
if (opts.height !== void 0) this.height = opts.height;
if (opts.layers !== void 0) this.layers = opts.layers;
}
};
VkFramebufferCreateInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pAttachments !== null) {
let array = this._pAttachments;
if (array.length !== this.attachmentCount) {
throw new RangeError("Invalid array length, expected length of 'attachmentCount' for 'VkFramebufferCreateInfo.pAttachments'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkImageView)) {
throw new TypeError("Invalid type for 'VkFramebufferCreateInfo.pAttachments[" + ii + "]': Expected 'VkImageView' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pAttachmentsNative = nativeArray;
this.memoryView.setBigInt64(0x28, nativeArray.address, true);
} else {
this._pAttachmentsNative = null;
this.memoryView.setBigInt64(0x28, BI0, true);
}
}
return true;
};
VkFramebufferCreateInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkFramebufferCreateInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkFramebufferCreateInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
if (original.renderPass !== null) {
copy.renderPass = original.renderPass.constructor.createCopyFrom(original.renderPass);
}
copy.attachmentCount = original.attachmentCount;
if (original.pAttachments !== null) {
copy.pAttachments = [...Array(original.pAttachments.length)].map((v, i) => {
return original.pAttachments[i].constructor.createCopyFrom(original.pAttachments[i]);
});
}
copy.width = original.width;
copy.height = original.height;
copy.layers = original.layers;
return copy;
};
VkFramebufferCreateInfo.byteLength = 0x40;
VkFramebufferCreateInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
renderPass: {
byteOffset: 0x18,
byteLength: 0x8
},
attachmentCount: {
byteOffset: 0x20,
byteLength: 0x4
},
pAttachments: {
byteOffset: 0x28,
byteLength: 0x8
},
width: {
byteOffset: 0x30,
byteLength: 0x4
},
height: {
byteOffset: 0x34,
byteLength: 0x4
},
layers: {
byteOffset: 0x38,
byteLength: 0x4
},
};
/** VkDrawIndirectCommand **/
function VkDrawIndirectCommand(opts, byteOffset) {
if (new.target !== VkDrawIndirectCommand) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDrawIndirectCommand, STRUCT_CACHE_VkDrawIndirectCommand);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDrawIndirectCommand, STRUCT_CACHE_VkDrawIndirectCommand);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDrawIndirectCommand'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x10);
} else {
this.memoryBuffer = new ArrayBuffer(0x10);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x10);
}
if (typeof opts === "object") {
if (opts.vertexCount !== void 0) this.vertexCount = opts.vertexCount;
if (opts.instanceCount !== void 0) this.instanceCount = opts.instanceCount;
if (opts.firstVertex !== void 0) this.firstVertex = opts.firstVertex;
if (opts.firstInstance !== void 0) this.firstInstance = opts.firstInstance;
}
};
Object.defineProperties(VkDrawIndirectCommand.prototype, {
"vertexCount": {
get() {
return this.memoryView.getUint32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDrawIndirectCommand.vertexCount");
this.memoryView.setUint32(0x0, value, true);
}
},
"instanceCount": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDrawIndirectCommand.instanceCount");
this.memoryView.setUint32(0x4, value, true);
}
},
"firstVertex": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDrawIndirectCommand.firstVertex");
this.memoryView.setUint32(0x8, value, true);
}
},
"firstInstance": {
get() {
return this.memoryView.getUint32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDrawIndirectCommand.firstInstance");
this.memoryView.setUint32(0xC, value, true);
}
},
});
VkDrawIndirectCommand.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x10);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x10"], 0x0);
if (typeof opts === "object") {
if (opts.vertexCount !== void 0) this.vertexCount = opts.vertexCount;
if (opts.instanceCount !== void 0) this.instanceCount = opts.instanceCount;
if (opts.firstVertex !== void 0) this.firstVertex = opts.firstVertex;
if (opts.firstInstance !== void 0) this.firstInstance = opts.firstInstance;
}
};
VkDrawIndirectCommand.prototype.flush = function flush() {
return true;
};
VkDrawIndirectCommand.prototype.reflect = function reflect(memoryAddress) {
};
VkDrawIndirectCommand.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDrawIndirectCommand();
copy.vertexCount = original.vertexCount;
copy.instanceCount = original.instanceCount;
copy.firstVertex = original.firstVertex;
copy.firstInstance = original.firstInstance;
return copy;
};
VkDrawIndirectCommand.byteLength = 0x10;
VkDrawIndirectCommand.memoryLayout = {
vertexCount: {
byteOffset: 0x0,
byteLength: 0x4
},
instanceCount: {
byteOffset: 0x4,
byteLength: 0x4
},
firstVertex: {
byteOffset: 0x8,
byteLength: 0x4
},
firstInstance: {
byteOffset: 0xC,
byteLength: 0x4
},
};
/** VkDrawIndexedIndirectCommand **/
function VkDrawIndexedIndirectCommand(opts, byteOffset) {
if (new.target !== VkDrawIndexedIndirectCommand) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDrawIndexedIndirectCommand, STRUCT_CACHE_VkDrawIndexedIndirectCommand);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDrawIndexedIndirectCommand, STRUCT_CACHE_VkDrawIndexedIndirectCommand);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDrawIndexedIndirectCommand'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x14);
} else {
this.memoryBuffer = new ArrayBuffer(0x14);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x14);
}
if (typeof opts === "object") {
if (opts.indexCount !== void 0) this.indexCount = opts.indexCount;
if (opts.instanceCount !== void 0) this.instanceCount = opts.instanceCount;
if (opts.firstIndex !== void 0) this.firstIndex = opts.firstIndex;
if (opts.vertexOffset !== void 0) this.vertexOffset = opts.vertexOffset;
if (opts.firstInstance !== void 0) this.firstInstance = opts.firstInstance;
}
};
Object.defineProperties(VkDrawIndexedIndirectCommand.prototype, {
"indexCount": {
get() {
return this.memoryView.getUint32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDrawIndexedIndirectCommand.indexCount");
this.memoryView.setUint32(0x0, value, true);
}
},
"instanceCount": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDrawIndexedIndirectCommand.instanceCount");
this.memoryView.setUint32(0x4, value, true);
}
},
"firstIndex": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDrawIndexedIndirectCommand.firstIndex");
this.memoryView.setUint32(0x8, value, true);
}
},
"vertexOffset": {
get() {
return this.memoryView.getInt32(0xC, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDrawIndexedIndirectCommand.vertexOffset");
this.memoryView.setInt32(0xC, value, true);
}
},
"firstInstance": {
get() {
return this.memoryView.getUint32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDrawIndexedIndirectCommand.firstInstance");
this.memoryView.setUint32(0x10, value, true);
}
},
});
VkDrawIndexedIndirectCommand.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x14);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x14"], 0x0);
if (typeof opts === "object") {
if (opts.indexCount !== void 0) this.indexCount = opts.indexCount;
if (opts.instanceCount !== void 0) this.instanceCount = opts.instanceCount;
if (opts.firstIndex !== void 0) this.firstIndex = opts.firstIndex;
if (opts.vertexOffset !== void 0) this.vertexOffset = opts.vertexOffset;
if (opts.firstInstance !== void 0) this.firstInstance = opts.firstInstance;
}
};
VkDrawIndexedIndirectCommand.prototype.flush = function flush() {
return true;
};
VkDrawIndexedIndirectCommand.prototype.reflect = function reflect(memoryAddress) {
};
VkDrawIndexedIndirectCommand.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDrawIndexedIndirectCommand();
copy.indexCount = original.indexCount;
copy.instanceCount = original.instanceCount;
copy.firstIndex = original.firstIndex;
copy.vertexOffset = original.vertexOffset;
copy.firstInstance = original.firstInstance;
return copy;
};
VkDrawIndexedIndirectCommand.byteLength = 0x14;
VkDrawIndexedIndirectCommand.memoryLayout = {
indexCount: {
byteOffset: 0x0,
byteLength: 0x4
},
instanceCount: {
byteOffset: 0x4,
byteLength: 0x4
},
firstIndex: {
byteOffset: 0x8,
byteLength: 0x4
},
vertexOffset: {
byteOffset: 0xC,
byteLength: 0x4
},
firstInstance: {
byteOffset: 0x10,
byteLength: 0x4
},
};
/** VkDispatchIndirectCommand **/
function VkDispatchIndirectCommand(opts, byteOffset) {
if (new.target !== VkDispatchIndirectCommand) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDispatchIndirectCommand, STRUCT_CACHE_VkDispatchIndirectCommand);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDispatchIndirectCommand, STRUCT_CACHE_VkDispatchIndirectCommand);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDispatchIndirectCommand'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0xC);
} else {
this.memoryBuffer = new ArrayBuffer(0xC);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0xC);
}
if (typeof opts === "object") {
if (opts.x !== void 0) this.x = opts.x;
if (opts.y !== void 0) this.y = opts.y;
if (opts.z !== void 0) this.z = opts.z;
}
};
Object.defineProperties(VkDispatchIndirectCommand.prototype, {
"x": {
get() {
return this.memoryView.getUint32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDispatchIndirectCommand.x");
this.memoryView.setUint32(0x0, value, true);
}
},
"y": {
get() {
return this.memoryView.getUint32(0x4, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDispatchIndirectCommand.y");
this.memoryView.setUint32(0x4, value, true);
}
},
"z": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDispatchIndirectCommand.z");
this.memoryView.setUint32(0x8, value, true);
}
},
});
VkDispatchIndirectCommand.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0xC);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0xC"], 0x0);
if (typeof opts === "object") {
if (opts.x !== void 0) this.x = opts.x;
if (opts.y !== void 0) this.y = opts.y;
if (opts.z !== void 0) this.z = opts.z;
}
};
VkDispatchIndirectCommand.prototype.flush = function flush() {
return true;
};
VkDispatchIndirectCommand.prototype.reflect = function reflect(memoryAddress) {
};
VkDispatchIndirectCommand.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDispatchIndirectCommand();
copy.x = original.x;
copy.y = original.y;
copy.z = original.z;
return copy;
};
VkDispatchIndirectCommand.byteLength = 0xC;
VkDispatchIndirectCommand.memoryLayout = {
x: {
byteOffset: 0x0,
byteLength: 0x4
},
y: {
byteOffset: 0x4,
byteLength: 0x4
},
z: {
byteOffset: 0x8,
byteLength: 0x4
},
};
/** VkSubmitInfo **/
function VkSubmitInfo(opts, byteOffset) {
if (new.target !== VkSubmitInfo) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkSubmitInfo, STRUCT_CACHE_VkSubmitInfo);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkSubmitInfo, STRUCT_CACHE_VkSubmitInfo);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkSubmitInfo'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x48);
} else {
this.memoryBuffer = new ArrayBuffer(0x48);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x48);
}
this._pNext = null;
this._pWaitSemaphores = null;
this._pWaitSemaphoresNative = null;
this._pWaitDstStageMask = null;
this._pCommandBuffers = null;
this._pCommandBuffersNative = null;
this._pSignalSemaphores = null;
this._pSignalSemaphoresNative = null;
this.sType = 0x4;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.waitSemaphoreCount !== void 0) this.waitSemaphoreCount = opts.waitSemaphoreCount;
if (opts.pWaitSemaphores !== void 0) this.pWaitSemaphores = opts.pWaitSemaphores;
if (opts.pWaitDstStageMask !== void 0) this.pWaitDstStageMask = opts.pWaitDstStageMask;
if (opts.commandBufferCount !== void 0) this.commandBufferCount = opts.commandBufferCount;
if (opts.pCommandBuffers !== void 0) this.pCommandBuffers = opts.pCommandBuffers;
if (opts.signalSemaphoreCount !== void 0) this.signalSemaphoreCount = opts.signalSemaphoreCount;
if (opts.pSignalSemaphores !== void 0) this.pSignalSemaphores = opts.pSignalSemaphores;
}
};
Object.defineProperties(VkSubmitInfo.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubmitInfo.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkSubmitInfo.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null && (value instanceof Object)) {
let {sType} = value;
if (sType <= -1) throw new TypeError("Invalid type for 'VkSubmitInfo.pNext'");
switch (sType) {
case 0x3B9BAC90:
case 0x3B9BEEF8:
case 0x3B9BFAB2:
case 0x3B9BB465:
case 0x3B9D0068:
case 0x3B9DF29B:
break;
default:
throw new TypeError("Invalid type for 'VkSubmitInfo.pNext'");
};
this._pNext = value;
this.memoryView.setBigInt64(0x8, value.memoryAddress, true);
} else if (value === null) {
this._pNext = null;
this.memoryView.setBigInt64(0x8, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkSubmitInfo.pNext'");
}
}
},
"waitSemaphoreCount": {
get() {
return this.memoryView.getUint32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubmitInfo.waitSemaphoreCount");
this.memoryView.setUint32(0x10, value, true);
}
},
"pWaitSemaphores": {
get() {
if (this._pWaitSemaphores === null && this.memoryView.getBigInt64(0x18, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x18, true);
let array = decodeNativeArrayOfObjects(addr, this.waitSemaphoreCount, VkSemaphore);
this._pWaitSemaphores = array;
return this.pWaitSemaphores;
} else {
return this._pWaitSemaphores;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pWaitSemaphores = value;
} else if (value === null) {
this._pWaitSemaphores = null;
} else {
throw new TypeError("Invalid type for 'VkSubmitInfo.pWaitSemaphores': Expected 'Array VkSemaphore' but got '" + typeToString(value) + "'");
}
}
},
"pWaitDstStageMask": {
get() {
return this._pWaitDstStageMask;
},
set(value) {
if (value !== null && value.constructor === Int32Array) {
this._pWaitDstStageMask = value;
this.memoryView.setBigInt64(0x20, getAddressFromArrayBuffer(value.buffer), true);
} else if (value === null) {
this._pWaitDstStageMask = null;
this.memoryView.setBigInt64(0x20, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkSubmitInfo.pWaitDstStageMask': Expected 'Int32Array' but got '" + typeToString(value) + "'");
}
}
},
"commandBufferCount": {
get() {
return this.memoryView.getUint32(0x28, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubmitInfo.commandBufferCount");
this.memoryView.setUint32(0x28, value, true);
}
},
"pCommandBuffers": {
get() {
if (this._pCommandBuffers === null && this.memoryView.getBigInt64(0x30, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x30, true);
let array = decodeNativeArrayOfObjects(addr, this.commandBufferCount, VkCommandBuffer);
this._pCommandBuffers = array;
return this.pCommandBuffers;
} else {
return this._pCommandBuffers;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pCommandBuffers = value;
} else if (value === null) {
this._pCommandBuffers = null;
} else {
throw new TypeError("Invalid type for 'VkSubmitInfo.pCommandBuffers': Expected 'Array VkCommandBuffer' but got '" + typeToString(value) + "'");
}
}
},
"signalSemaphoreCount": {
get() {
return this.memoryView.getUint32(0x38, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkSubmitInfo.signalSemaphoreCount");
this.memoryView.setUint32(0x38, value, true);
}
},
"pSignalSemaphores": {
get() {
if (this._pSignalSemaphores === null && this.memoryView.getBigInt64(0x40, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x40, true);
let array = decodeNativeArrayOfObjects(addr, this.signalSemaphoreCount, VkSemaphore);
this._pSignalSemaphores = array;
return this.pSignalSemaphores;
} else {
return this._pSignalSemaphores;
}
},
set(value) {
if (value !== null && value.constructor === Array) {
this._pSignalSemaphores = value;
} else if (value === null) {
this._pSignalSemaphores = null;
} else {
throw new TypeError("Invalid type for 'VkSubmitInfo.pSignalSemaphores': Expected 'Array VkSemaphore' but got '" + typeToString(value) + "'");
}
}
},
});
VkSubmitInfo.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x48);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x48"], 0x0);
this._pNext = null;
this._pWaitSemaphores = null;
this._pWaitSemaphoresNative = null;
this._pWaitDstStageMask = null;
this._pCommandBuffers = null;
this._pCommandBuffersNative = null;
this._pSignalSemaphores = null;
this._pSignalSemaphoresNative = null;
this.sType = 0x4;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.waitSemaphoreCount !== void 0) this.waitSemaphoreCount = opts.waitSemaphoreCount;
if (opts.pWaitSemaphores !== void 0) this.pWaitSemaphores = opts.pWaitSemaphores;
if (opts.pWaitDstStageMask !== void 0) this.pWaitDstStageMask = opts.pWaitDstStageMask;
if (opts.commandBufferCount !== void 0) this.commandBufferCount = opts.commandBufferCount;
if (opts.pCommandBuffers !== void 0) this.pCommandBuffers = opts.pCommandBuffers;
if (opts.signalSemaphoreCount !== void 0) this.signalSemaphoreCount = opts.signalSemaphoreCount;
if (opts.pSignalSemaphores !== void 0) this.pSignalSemaphores = opts.pSignalSemaphores;
}
};
VkSubmitInfo.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._pWaitSemaphores !== null) {
let array = this._pWaitSemaphores;
if (array.length !== this.waitSemaphoreCount) {
throw new RangeError("Invalid array length, expected length of 'waitSemaphoreCount' for 'VkSubmitInfo.pWaitSemaphores'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSemaphore)) {
throw new TypeError("Invalid type for 'VkSubmitInfo.pWaitSemaphores[" + ii + "]': Expected 'VkSemaphore' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pWaitSemaphoresNative = nativeArray;
this.memoryView.setBigInt64(0x18, nativeArray.address, true);
} else {
this._pWaitSemaphoresNative = null;
this.memoryView.setBigInt64(0x18, BI0, true);
}
}
if (this._pCommandBuffers !== null) {
let array = this._pCommandBuffers;
if (array.length !== this.commandBufferCount) {
throw new RangeError("Invalid array length, expected length of 'commandBufferCount' for 'VkSubmitInfo.pCommandBuffers'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkCommandBuffer)) {
throw new TypeError("Invalid type for 'VkSubmitInfo.pCommandBuffers[" + ii + "]': Expected 'VkCommandBuffer' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pCommandBuffersNative = nativeArray;
this.memoryView.setBigInt64(0x30, nativeArray.address, true);
} else {
this._pCommandBuffersNative = null;
this.memoryView.setBigInt64(0x30, BI0, true);
}
}
if (this._pSignalSemaphores !== null) {
let array = this._pSignalSemaphores;
if (array.length !== this.signalSemaphoreCount) {
throw new RangeError("Invalid array length, expected length of 'signalSemaphoreCount' for 'VkSubmitInfo.pSignalSemaphores'");
return false;
}
for (let ii = 0; ii < array.length; ++ii) {
if (!array[ii] || (array[ii].constructor !== VkSemaphore)) {
throw new TypeError("Invalid type for 'VkSubmitInfo.pSignalSemaphores[" + ii + "]': Expected 'VkSemaphore' but got '" + typeToString(array[ii]) + "'");
return false;
}
};
if (array.length > 0) {
let nativeArray = new NativeObjectArray(array);
this._pSignalSemaphoresNative = nativeArray;
this.memoryView.setBigInt64(0x40, nativeArray.address, true);
} else {
this._pSignalSemaphoresNative = null;
this.memoryView.setBigInt64(0x40, BI0, true);
}
}
return true;
};
VkSubmitInfo.prototype.reflect = function reflect(memoryAddress) {
};
VkSubmitInfo.createCopyFrom = function createCopyFrom(original) {
let copy = new VkSubmitInfo();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.waitSemaphoreCount = original.waitSemaphoreCount;
if (original.pWaitSemaphores !== null) {
copy.pWaitSemaphores = [...Array(original.pWaitSemaphores.length)].map((v, i) => {
return original.pWaitSemaphores[i].constructor.createCopyFrom(original.pWaitSemaphores[i]);
});
}
if (original.pWaitDstStageMask !== null) {
copy.pWaitDstStageMask = new Int32Array(original.pWaitDstStageMask);
}
copy.commandBufferCount = original.commandBufferCount;
if (original.pCommandBuffers !== null) {
copy.pCommandBuffers = [...Array(original.pCommandBuffers.length)].map((v, i) => {
return original.pCommandBuffers[i].constructor.createCopyFrom(original.pCommandBuffers[i]);
});
}
copy.signalSemaphoreCount = original.signalSemaphoreCount;
if (original.pSignalSemaphores !== null) {
copy.pSignalSemaphores = [...Array(original.pSignalSemaphores.length)].map((v, i) => {
return original.pSignalSemaphores[i].constructor.createCopyFrom(original.pSignalSemaphores[i]);
});
}
return copy;
};
VkSubmitInfo.byteLength = 0x48;
VkSubmitInfo.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
waitSemaphoreCount: {
byteOffset: 0x10,
byteLength: 0x4
},
pWaitSemaphores: {
byteOffset: 0x18,
byteLength: 0x8
},
pWaitDstStageMask: {
byteOffset: 0x20,
byteLength: 0x8
},
commandBufferCount: {
byteOffset: 0x28,
byteLength: 0x4
},
pCommandBuffers: {
byteOffset: 0x30,
byteLength: 0x8
},
signalSemaphoreCount: {
byteOffset: 0x38,
byteLength: 0x4
},
pSignalSemaphores: {
byteOffset: 0x40,
byteLength: 0x8
},
};
/** VkDisplayPropertiesKHR **/
function VkDisplayPropertiesKHR(opts, byteOffset) {
if (new.target !== VkDisplayPropertiesKHR) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDisplayPropertiesKHR, STRUCT_CACHE_VkDisplayPropertiesKHR);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDisplayPropertiesKHR, STRUCT_CACHE_VkDisplayPropertiesKHR);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDisplayPropertiesKHR'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x30);
} else {
this.memoryBuffer = new ArrayBuffer(0x30);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x30);
}
this._display = null;
this._displayName = null;
this._physicalDimensions = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x10 });
this._physicalResolution = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x18 });
if (typeof opts === "object") {
}
};
Object.defineProperties(VkDisplayPropertiesKHR.prototype, {
"display": {
get() {
return this._display;
},
},
"displayName": {
get() {
if (this._displayName !== null) {
let str = textDecoder.decode(this._displayName);
return str.substr(0, str.length - 1);
} else {
// native memory contains a string which we didn't reflect yet
if (this.memoryView.getBigInt64(0x8, true) !== BI0) {
let addr = this.memoryView.getBigInt64(0x8, true);
let length = findNullTerminatedUTF8StringLength(addr);
let buffer = getArrayBufferFromAddress(addr, BigInt(length));
this._displayName = buffer;
return this.displayName;
}
return null;
}
},
},
"physicalDimensions": {
get() {
return this._physicalDimensions;
},
},
"physicalResolution": {
get() {
return this._physicalResolution;
},
},
"supportedTransforms": {
get() {
return this.memoryView.getInt32(0x20, true);
},
},
"planeReorderPossible": {
get() {
return this.memoryView.getUint32(0x24, true) !== 0;
},
},
"persistentContent": {
get() {
return this.memoryView.getUint32(0x28, true) !== 0;
},
},
});
VkDisplayPropertiesKHR.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x30);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x30"], 0x0);
this._display = null;
this._displayName = null;
if (this._physicalDimensions !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._physicalDimensions.memoryBuffer) this._physicalDimensions = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x10 });
else this._physicalDimensions.reset();
}
if (this._physicalResolution !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._physicalResolution.memoryBuffer) this._physicalResolution = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x18 });
else this._physicalResolution.reset();
}
if (typeof opts === "object") {
}
};
VkDisplayPropertiesKHR.prototype.flush = function flush() {
return true;
};
VkDisplayPropertiesKHR.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x30));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x30), 0x0);};
VkDisplayPropertiesKHR.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDisplayPropertiesKHR();
if (original.display !== null) {
copy.display = original.display.constructor.createCopyFrom(original.display);
}
copy.displayName = original.displayName;
if (original.physicalDimensions !== null) {
copy.physicalDimensions = original.physicalDimensions.constructor.createCopyFrom(original.physicalDimensions);
}
if (original.physicalResolution !== null) {
copy.physicalResolution = original.physicalResolution.constructor.createCopyFrom(original.physicalResolution);
}
copy.supportedTransforms = original.supportedTransforms;
copy.planeReorderPossible = original.planeReorderPossible;
copy.persistentContent = original.persistentContent;
return copy;
};
VkDisplayPropertiesKHR.byteLength = 0x30;
VkDisplayPropertiesKHR.memoryLayout = {
display: {
byteOffset: 0x0,
byteLength: 0x8
},
displayName: {
byteOffset: 0x8,
byteLength: 0x8
},
physicalDimensions: {
byteOffset: 0x10,
byteLength: 0x8
},
physicalResolution: {
byteOffset: 0x18,
byteLength: 0x8
},
supportedTransforms: {
byteOffset: 0x20,
byteLength: 0x4
},
planeReorderPossible: {
byteOffset: 0x24,
byteLength: 0x4
},
persistentContent: {
byteOffset: 0x28,
byteLength: 0x4
},
};
/** VkDisplayPlanePropertiesKHR **/
function VkDisplayPlanePropertiesKHR(opts, byteOffset) {
if (new.target !== VkDisplayPlanePropertiesKHR) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDisplayPlanePropertiesKHR, STRUCT_CACHE_VkDisplayPlanePropertiesKHR);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDisplayPlanePropertiesKHR, STRUCT_CACHE_VkDisplayPlanePropertiesKHR);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDisplayPlanePropertiesKHR'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x10);
} else {
this.memoryBuffer = new ArrayBuffer(0x10);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x10);
}
this._currentDisplay = null;
if (typeof opts === "object") {
}
};
Object.defineProperties(VkDisplayPlanePropertiesKHR.prototype, {
"currentDisplay": {
get() {
return this._currentDisplay;
},
},
"currentStackIndex": {
get() {
return this.memoryView.getUint32(0x8, true);
},
},
});
VkDisplayPlanePropertiesKHR.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x10);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x10"], 0x0);
this._currentDisplay = null;
if (typeof opts === "object") {
}
};
VkDisplayPlanePropertiesKHR.prototype.flush = function flush() {
return true;
};
VkDisplayPlanePropertiesKHR.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x10));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x10), 0x0);};
VkDisplayPlanePropertiesKHR.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDisplayPlanePropertiesKHR();
if (original.currentDisplay !== null) {
copy.currentDisplay = original.currentDisplay.constructor.createCopyFrom(original.currentDisplay);
}
copy.currentStackIndex = original.currentStackIndex;
return copy;
};
VkDisplayPlanePropertiesKHR.byteLength = 0x10;
VkDisplayPlanePropertiesKHR.memoryLayout = {
currentDisplay: {
byteOffset: 0x0,
byteLength: 0x8
},
currentStackIndex: {
byteOffset: 0x8,
byteLength: 0x4
},
};
/** VkDisplayModeParametersKHR **/
function VkDisplayModeParametersKHR(opts, byteOffset) {
if (new.target !== VkDisplayModeParametersKHR) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDisplayModeParametersKHR, STRUCT_CACHE_VkDisplayModeParametersKHR);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDisplayModeParametersKHR, STRUCT_CACHE_VkDisplayModeParametersKHR);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDisplayModeParametersKHR'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0xC);
} else {
this.memoryBuffer = new ArrayBuffer(0xC);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0xC);
}
this._visibleRegion = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
if (typeof opts === "object") {
if (opts.visibleRegion !== void 0) this.visibleRegion = opts.visibleRegion;
if (opts.refreshRate !== void 0) this.refreshRate = opts.refreshRate;
}
};
Object.defineProperties(VkDisplayModeParametersKHR.prototype, {
"visibleRegion": {
get() {
return this._visibleRegion;
},
set(value) {
if (value !== null && value.constructor === VkExtent2D) {
value.flush();
this._visibleRegion = value;
} else if (value === null) {
this._visibleRegion = null;
} else {
throw new TypeError("Invalid type for 'VkDisplayModeParametersKHR.visibleRegion': Expected 'VkExtent2D' but got '" + typeToString(value) + "'");
}
}
},
"refreshRate": {
get() {
return this.memoryView.getUint32(0x8, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDisplayModeParametersKHR.refreshRate");
this.memoryView.setUint32(0x8, value, true);
}
},
});
VkDisplayModeParametersKHR.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0xC);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0xC"], 0x0);
if (this._visibleRegion !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._visibleRegion.memoryBuffer) this._visibleRegion = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x0 });
else this._visibleRegion.reset();
}
if (typeof opts === "object") {
if (opts.visibleRegion !== void 0) this.visibleRegion = opts.visibleRegion;
if (opts.refreshRate !== void 0) this.refreshRate = opts.refreshRate;
}
};
VkDisplayModeParametersKHR.prototype.flush = function flush() {
if (this._visibleRegion !== null) {
let visibleRegion = this._visibleRegion;
visibleRegion.flush();
if (this.memoryBuffer !== visibleRegion.memoryBuffer) {
let srcView = new Uint8Array(visibleRegion.memoryBuffer, visibleRegion.$memoryOffset, 0x8);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x0);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkDisplayModeParametersKHR.visibleRegion' isn't used as shared-memory");
}
}
return true;
};
VkDisplayModeParametersKHR.prototype.reflect = function reflect(memoryAddress) {
};
VkDisplayModeParametersKHR.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDisplayModeParametersKHR();
if (original.visibleRegion !== null) {
copy.visibleRegion = original.visibleRegion.constructor.createCopyFrom(original.visibleRegion);
}
copy.refreshRate = original.refreshRate;
return copy;
};
VkDisplayModeParametersKHR.byteLength = 0xC;
VkDisplayModeParametersKHR.memoryLayout = {
visibleRegion: {
byteOffset: 0x0,
byteLength: 0x8
},
refreshRate: {
byteOffset: 0x8,
byteLength: 0x4
},
};
/** VkDisplayModePropertiesKHR **/
function VkDisplayModePropertiesKHR(opts, byteOffset) {
if (new.target !== VkDisplayModePropertiesKHR) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDisplayModePropertiesKHR, STRUCT_CACHE_VkDisplayModePropertiesKHR);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDisplayModePropertiesKHR, STRUCT_CACHE_VkDisplayModePropertiesKHR);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDisplayModePropertiesKHR'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x18);
} else {
this.memoryBuffer = new ArrayBuffer(0x18);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x18);
}
this._displayMode = null;
this._parameters = new VkDisplayModeParametersKHR({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x8 });
if (typeof opts === "object") {
}
};
Object.defineProperties(VkDisplayModePropertiesKHR.prototype, {
"displayMode": {
get() {
return this._displayMode;
},
},
"parameters": {
get() {
return this._parameters;
},
},
});
VkDisplayModePropertiesKHR.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x18);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x18"], 0x0);
this._displayMode = null;
if (this._parameters !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._parameters.memoryBuffer) this._parameters = new VkDisplayModeParametersKHR({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x8 });
else this._parameters.reset();
}
if (typeof opts === "object") {
}
};
VkDisplayModePropertiesKHR.prototype.flush = function flush() {
return true;
};
VkDisplayModePropertiesKHR.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x18));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x18), 0x0);};
VkDisplayModePropertiesKHR.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDisplayModePropertiesKHR();
if (original.displayMode !== null) {
copy.displayMode = original.displayMode.constructor.createCopyFrom(original.displayMode);
}
if (original.parameters !== null) {
copy.parameters = original.parameters.constructor.createCopyFrom(original.parameters);
}
return copy;
};
VkDisplayModePropertiesKHR.byteLength = 0x18;
VkDisplayModePropertiesKHR.memoryLayout = {
displayMode: {
byteOffset: 0x0,
byteLength: 0x8
},
parameters: {
byteOffset: 0x8,
byteLength: 0xC
},
};
/** VkDisplayModeCreateInfoKHR **/
function VkDisplayModeCreateInfoKHR(opts, byteOffset) {
if (new.target !== VkDisplayModeCreateInfoKHR) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDisplayModeCreateInfoKHR, STRUCT_CACHE_VkDisplayModeCreateInfoKHR);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDisplayModeCreateInfoKHR, STRUCT_CACHE_VkDisplayModeCreateInfoKHR);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDisplayModeCreateInfoKHR'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x20);
} else {
this.memoryBuffer = new ArrayBuffer(0x20);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x20);
}
this._pNext = null;
this._parameters = new VkDisplayModeParametersKHR({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x14 });
this.sType = 0x3B9AD1D0;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.parameters !== void 0) this.parameters = opts.parameters;
}
};
Object.defineProperties(VkDisplayModeCreateInfoKHR.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDisplayModeCreateInfoKHR.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkDisplayModeCreateInfoKHR.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkDisplayModeCreateInfoKHR.pNext' isn't allowed to be filled");
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDisplayModeCreateInfoKHR.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"parameters": {
get() {
return this._parameters;
},
set(value) {
if (value !== null && value.constructor === VkDisplayModeParametersKHR) {
value.flush();
this._parameters = value;
} else if (value === null) {
this._parameters = null;
} else {
throw new TypeError("Invalid type for 'VkDisplayModeCreateInfoKHR.parameters': Expected 'VkDisplayModeParametersKHR' but got '" + typeToString(value) + "'");
}
}
},
});
VkDisplayModeCreateInfoKHR.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x20);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x20"], 0x0);
this._pNext = null;
if (this._parameters !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._parameters.memoryBuffer) this._parameters = new VkDisplayModeParametersKHR({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x14 });
else this._parameters.reset();
}
this.sType = 0x3B9AD1D0;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.parameters !== void 0) this.parameters = opts.parameters;
}
};
VkDisplayModeCreateInfoKHR.prototype.flush = function flush() {
if (this._pNext !== null) {
if (!this._pNext.flush()) return false;
}
if (this._parameters !== null) {
let parameters = this._parameters;
parameters.flush();
if (this.memoryBuffer !== parameters.memoryBuffer) {
let srcView = new Uint8Array(parameters.memoryBuffer, parameters.$memoryOffset, 0xC);
let dstView = new Uint8Array(this.memoryBuffer);
dstView.set(srcView, 0x14);
if (ENABLE_SHARED_MEMORY_HINTS) console.warn("'VkDisplayModeCreateInfoKHR.parameters' isn't used as shared-memory");
}
}
return true;
};
VkDisplayModeCreateInfoKHR.prototype.reflect = function reflect(memoryAddress) {
};
VkDisplayModeCreateInfoKHR.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDisplayModeCreateInfoKHR();
copy.sType = original.sType;
if (original.pNext !== null) {
copy.pNext = original.pNext.constructor.createCopyFrom(original.pNext);
}
copy.flags = original.flags;
if (original.parameters !== null) {
copy.parameters = original.parameters.constructor.createCopyFrom(original.parameters);
}
return copy;
};
VkDisplayModeCreateInfoKHR.byteLength = 0x20;
VkDisplayModeCreateInfoKHR.memoryLayout = {
sType: {
byteOffset: 0x0,
byteLength: 0x4
},
pNext: {
byteOffset: 0x8,
byteLength: 0x8
},
flags: {
byteOffset: 0x10,
byteLength: 0x4
},
parameters: {
byteOffset: 0x14,
byteLength: 0xC
},
};
/** VkDisplayPlaneCapabilitiesKHR **/
function VkDisplayPlaneCapabilitiesKHR(opts, byteOffset) {
if (new.target !== VkDisplayPlaneCapabilitiesKHR) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDisplayPlaneCapabilitiesKHR, STRUCT_CACHE_VkDisplayPlaneCapabilitiesKHR);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDisplayPlaneCapabilitiesKHR, STRUCT_CACHE_VkDisplayPlaneCapabilitiesKHR);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDisplayPlaneCapabilitiesKHR'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x44);
} else {
this.memoryBuffer = new ArrayBuffer(0x44);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x44);
}
this._minSrcPosition = new VkOffset2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x4 });
this._maxSrcPosition = new VkOffset2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0xC });
this._minSrcExtent = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x14 });
this._maxSrcExtent = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x1C });
this._minDstPosition = new VkOffset2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x24 });
this._maxDstPosition = new VkOffset2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x2C });
this._minDstExtent = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x34 });
this._maxDstExtent = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x3C });
if (typeof opts === "object") {
}
};
Object.defineProperties(VkDisplayPlaneCapabilitiesKHR.prototype, {
"supportedAlpha": {
get() {
return this.memoryView.getInt32(0x0, true);
},
},
"minSrcPosition": {
get() {
return this._minSrcPosition;
},
},
"maxSrcPosition": {
get() {
return this._maxSrcPosition;
},
},
"minSrcExtent": {
get() {
return this._minSrcExtent;
},
},
"maxSrcExtent": {
get() {
return this._maxSrcExtent;
},
},
"minDstPosition": {
get() {
return this._minDstPosition;
},
},
"maxDstPosition": {
get() {
return this._maxDstPosition;
},
},
"minDstExtent": {
get() {
return this._minDstExtent;
},
},
"maxDstExtent": {
get() {
return this._maxDstExtent;
},
},
});
VkDisplayPlaneCapabilitiesKHR.prototype.reset = function reset(opts) {
if (this.resetMemoryView === null) {
this.resetMemoryView = new Uint8Array(this.memoryBuffer, this.$memoryOffset, 0x44);
}
this.resetMemoryView.set(STRUCT_RESET_CACHE["0x44"], 0x0);
if (this._minSrcPosition !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._minSrcPosition.memoryBuffer) this._minSrcPosition = new VkOffset2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x4 });
else this._minSrcPosition.reset();
}
if (this._maxSrcPosition !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._maxSrcPosition.memoryBuffer) this._maxSrcPosition = new VkOffset2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0xC });
else this._maxSrcPosition.reset();
}
if (this._minSrcExtent !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._minSrcExtent.memoryBuffer) this._minSrcExtent = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x14 });
else this._minSrcExtent.reset();
}
if (this._maxSrcExtent !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._maxSrcExtent.memoryBuffer) this._maxSrcExtent = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x1C });
else this._maxSrcExtent.reset();
}
if (this._minDstPosition !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._minDstPosition.memoryBuffer) this._minDstPosition = new VkOffset2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x24 });
else this._minDstPosition.reset();
}
if (this._maxDstPosition !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._maxDstPosition.memoryBuffer) this._maxDstPosition = new VkOffset2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x2C });
else this._maxDstPosition.reset();
}
if (this._minDstExtent !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._minDstExtent.memoryBuffer) this._minDstExtent = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x34 });
else this._minDstExtent.reset();
}
if (this._maxDstExtent !== null) {
// TODO: optimize this
if (this.memoryBuffer !== this._maxDstExtent.memoryBuffer) this._maxDstExtent = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x3C });
else this._maxDstExtent.reset();
}
if (typeof opts === "object") {
}
};
VkDisplayPlaneCapabilitiesKHR.prototype.flush = function flush() {
return true;
};
VkDisplayPlaneCapabilitiesKHR.prototype.reflect = function reflect(memoryAddress) {
let srcBuffer = getArrayBufferFromAddress(memoryAddress, BigInt(0x44));
let dstBuffer = this.memoryBuffer;
let srcView = new Uint8Array(srcBuffer);
let dstView = new Uint8Array(dstBuffer);
dstView.set(srcView.subarray(0x0, 0x44), 0x0);};
VkDisplayPlaneCapabilitiesKHR.createCopyFrom = function createCopyFrom(original) {
let copy = new VkDisplayPlaneCapabilitiesKHR();
copy.supportedAlpha = original.supportedAlpha;
if (original.minSrcPosition !== null) {
copy.minSrcPosition = original.minSrcPosition.constructor.createCopyFrom(original.minSrcPosition);
}
if (original.maxSrcPosition !== null) {
copy.maxSrcPosition = original.maxSrcPosition.constructor.createCopyFrom(original.maxSrcPosition);
}
if (original.minSrcExtent !== null) {
copy.minSrcExtent = original.minSrcExtent.constructor.createCopyFrom(original.minSrcExtent);
}
if (original.maxSrcExtent !== null) {
copy.maxSrcExtent = original.maxSrcExtent.constructor.createCopyFrom(original.maxSrcExtent);
}
if (original.minDstPosition !== null) {
copy.minDstPosition = original.minDstPosition.constructor.createCopyFrom(original.minDstPosition);
}
if (original.maxDstPosition !== null) {
copy.maxDstPosition = original.maxDstPosition.constructor.createCopyFrom(original.maxDstPosition);
}
if (original.minDstExtent !== null) {
copy.minDstExtent = original.minDstExtent.constructor.createCopyFrom(original.minDstExtent);
}
if (original.maxDstExtent !== null) {
copy.maxDstExtent = original.maxDstExtent.constructor.createCopyFrom(original.maxDstExtent);
}
return copy;
};
VkDisplayPlaneCapabilitiesKHR.byteLength = 0x44;
VkDisplayPlaneCapabilitiesKHR.memoryLayout = {
supportedAlpha: {
byteOffset: 0x0,
byteLength: 0x4
},
minSrcPosition: {
byteOffset: 0x4,
byteLength: 0x8
},
maxSrcPosition: {
byteOffset: 0xC,
byteLength: 0x8
},
minSrcExtent: {
byteOffset: 0x14,
byteLength: 0x8
},
maxSrcExtent: {
byteOffset: 0x1C,
byteLength: 0x8
},
minDstPosition: {
byteOffset: 0x24,
byteLength: 0x8
},
maxDstPosition: {
byteOffset: 0x2C,
byteLength: 0x8
},
minDstExtent: {
byteOffset: 0x34,
byteLength: 0x8
},
maxDstExtent: {
byteOffset: 0x3C,
byteLength: 0x8
},
};
/** VkDisplaySurfaceCreateInfoKHR **/
function VkDisplaySurfaceCreateInfoKHR(opts, byteOffset) {
if (new.target !== VkDisplaySurfaceCreateInfoKHR) {
if (typeof opts === "string") {
// opts contains our stack byteOffset
// byteOffset is unused
let out = getStructFromStack(opts, VkDisplaySurfaceCreateInfoKHR, STRUCT_CACHE_VkDisplaySurfaceCreateInfoKHR);
out.reset();
return out;
} else if (typeof opts === "object" && byteOffset !== void 0) {
// opts contains our initialization data
// byteOffset contains the stack byteOffset
let out = getStructFromStack(byteOffset, VkDisplaySurfaceCreateInfoKHR, STRUCT_CACHE_VkDisplaySurfaceCreateInfoKHR);
out.reset(opts);
return out;
} else {
throw new Error(`Invalid Signature for 'VkDisplaySurfaceCreateInfoKHR'`);
}
}
this.memoryBuffer = null;
this.memoryAddress = BI0;
this.$memoryOffset = 0x0;
this.resetMemoryView = null;
if (typeof opts === "object" && opts.$memoryOffset !== void 0) {
this.memoryBuffer = opts.$memoryBuffer;
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer) + BigInt(opts.$memoryOffset);
this.$memoryOffset = opts.$memoryOffset | 0;
this.memoryView = new DataView(this.memoryBuffer, opts.$memoryOffset, 0x40);
} else {
this.memoryBuffer = new ArrayBuffer(0x40);
this.memoryAddress = getAddressFromArrayBuffer(this.memoryBuffer);
this.memoryView = new DataView(this.memoryBuffer, 0x0, 0x40);
}
this._pNext = null;
this._displayMode = null;
this._imageExtent = new VkExtent2D({ $memoryBuffer: this.memoryBuffer, $memoryOffset: this.$memoryOffset + 0x34 });
this.sType = 0x3B9AD1D1;
if (typeof opts === "object") {
if (opts.sType !== void 0) this.sType = opts.sType;
if (opts.pNext !== void 0) this.pNext = opts.pNext;
if (opts.flags !== void 0) this.flags = opts.flags;
if (opts.displayMode !== void 0) this.displayMode = opts.displayMode;
if (opts.planeIndex !== void 0) this.planeIndex = opts.planeIndex;
if (opts.planeStackIndex !== void 0) this.planeStackIndex = opts.planeStackIndex;
if (opts.transform !== void 0) this.transform = opts.transform;
if (opts.globalAlpha !== void 0) this.globalAlpha = opts.globalAlpha;
if (opts.alphaMode !== void 0) this.alphaMode = opts.alphaMode;
if (opts.imageExtent !== void 0) this.imageExtent = opts.imageExtent;
}
};
Object.defineProperties(VkDisplaySurfaceCreateInfoKHR.prototype, {
"sType": {
get() {
return this.memoryView.getInt32(0x0, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDisplaySurfaceCreateInfoKHR.sType");
if (!$VAL_R_VkStructureType(value)) {
throw new RangeError("Invalid value for 'VkDisplaySurfaceCreateInfoKHR.sType': '" + value + "' is not a value of 'VkStructureType'");
}
this.memoryView.setInt32(0x0, value, true);
}
},
"pNext": {
get() {
return this._pNext;
},
set(value) {
if (value !== null) throw new TypeError("'VkDisplaySurfaceCreateInfoKHR.pNext' isn't allowed to be filled");
}
},
"flags": {
get() {
return this.memoryView.getInt32(0x10, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDisplaySurfaceCreateInfoKHR.flags");
this.memoryView.setInt32(0x10, value, true);
}
},
"displayMode": {
get() {
return this._displayMode;
},
set(value) {
if (value !== null && value.constructor === VkDisplayModeKHR) {
this._displayMode = value;
this.memoryView.setBigInt64(0x18, value.memoryView.getBigInt64(0x0, true), true);
} else if (value === null) {
this._displayMode = null;
this.memoryView.setBigInt64(0x18, BI0, true);
} else {
throw new TypeError("Invalid type for 'VkDisplaySurfaceCreateInfoKHR.displayMode': Expected 'VkDisplayModeKHR' but got '" + typeToString(value) + "'");
}
}
},
"planeIndex": {
get() {
return this.memoryView.getUint32(0x20, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDisplaySurfaceCreateInfoKHR.planeIndex");
this.memoryView.setUint32(0x20, value, true);
}
},
"planeStackIndex": {
get() {
return this.memoryView.getUint32(0x24, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDisplaySurfaceCreateInfoKHR.planeStackIndex");
this.memoryView.setUint32(0x24, value, true);
}
},
"transform": {
get() {
return this.memoryView.getInt32(0x28, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDisplaySurfaceCreateInfoKHR.transform");
this.memoryView.setInt32(0x28, value, true);
}
},
"globalAlpha": {
get() {
return this.memoryView.getFloat32(0x2C, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDisplaySurfaceCreateInfoKHR.globalAlpha");
this.memoryView.setFloat32(0x2C, value, true);
}
},
"alphaMode": {
get() {
return this.memoryView.getInt32(0x30, true);
},
set(value) {
ASSERT_IS_NUMBER(value, "VkDisplaySurfaceCreateInfoKHR.alphaMode");
this.memoryView.setInt32(0x30, value, true);
}
},
"imageExtent": {
get() {
return this._imageExtent;
},
set(value) {
if (value !== null && value.constructor === VkExtent2D) {
value.flush();
this._imageExtent = value;
} else if (value === null) {
this._imageExtent = null;
} else {
throw new TypeError("Invalid type for 'VkDisplaySurfaceCreateInfoKHR.imageExtent': Expected 'VkExtent2D' but got '" + ty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment