pixi.js
Version:
<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">
21 lines (19 loc) • 491 B
JavaScript
;
const vkFormatToGPUFormatMap = {
23: "rgb8unorm",
// VK_FORMAT_R8G8B8_UNORM
37: "rgba8unorm",
// VK_FORMAT_R8G8B8A8_UNORM
43: "rgba8unorm-srgb"
// VK_FORMAT_R8G8B8A8_SRGB
// TODO add more!
};
function vkFormatToGPUFormat(vkFormat) {
const format = vkFormatToGPUFormatMap[vkFormat];
if (format) {
return format;
}
throw new Error(`Unsupported VkFormat: ${vkFormat}`);
}
export { vkFormatToGPUFormat };
//# sourceMappingURL=vkFormatToGPUFormat.mjs.map