vk: Strip 'stencil' MSB when writing d24x8 data

- Seems to contains garbage in MSB when DEPTH aspect is read back
- TODO: Implement custom depth and stencil readback routine
This commit is contained in:
kd-11 2018-06-24 01:37:24 +03:00 committed by kd-11
parent 1e375e5210
commit df2137781d
1 changed files with 1 additions and 1 deletions

View File

@ -187,7 +187,7 @@ namespace vk
"\n"
"// Depth format conversions\n"
"#define d24x8_to_f32(bits) floatBitsToUint(float(bits >> 8) / 16777214.f)\n"
"#define d24x8_to_d24x8_swapped(bits) (bits & 0xFF00FF00) | (bits & 0xFF0000) >> 16 | (bits & 0xFF) << 16\n"
"#define d24x8_to_d24x8_swapped(bits) (bits & 0xFF00) | (bits & 0xFF0000) >> 16 | (bits & 0xFF) << 16\n"
"#define f32_to_d24x8_swapped(bits) d24x8_to_d24x8_swapped(uint(uintBitsToFloat(bits) * 16777214.f))\n"
"\n"
"void main()\n"