I’m working on PSX emulator, and the PSX gpu’s pixels format is A1B5G5R5.
I looked at opengl, and there seem to be the format GL_UNSIGNED_SHORT_1_5_5_5_REV which does what I need.
Vulkan has more formats than opengl, it has 3 similar formats, but not exactly the same
Use VK_FORMAT_A1R5G5B5_UNORM_PACK16 and pretend red is blue. Route serious requests to GitHub. I don’t think this forum is really seriously monitored by insiders.
The problem with using blue for red is that I’m getting 16bit integer packed already, so I would need to transform the pixels manually if I go with this solution.
I tried using swizzle, but it does not work for rendering target. It only works for texturing.
In the end I used A1R5G5B5 , and then used swizzling to copy the whole image to another manually using graphics pipeline. I’m not sure but is there a way to blit image with component swizzle?