@@ -277,68 +277,68 @@ case VK_FORMAT_ASTC_12x10_SRGB_BLOCK: return createDFDCompressed(c_ASTC, 12, 10,
277277case VK_FORMAT_ASTC_12x12_UNORM_BLOCK: return createDFDCompressed(c_ASTC, 12 , 12 , 1 , s_UNORM);
278278case VK_FORMAT_ASTC_12x12_SRGB_BLOCK: return createDFDCompressed(c_ASTC, 12 , 12 , 1 , s_SRGB);
279279case VK_FORMAT_G8B8G8R8_422_UNORM: {
280- int channels[] = {0 , 1 , 0 , 2 }; int bits[] = {8 , 8 , 8 , 8 }; int paddings [] = {0 , 0 , 0 , 0 };
280+ int channels[] = {0 , 1 , 0 , 2 }; int bits[] = {8 , 8 , 8 , 8 }; int shiftBits [] = {0 , 0 , 0 , 0 };
281281 int position_xs[] = {64 , 64 , 192 , 64 }; int position_ys[] = {128 , 128 , 128 , 128 };
282- return createDFD422 (0 , 4 , bits, paddings , channels, position_xs, position_ys, s_UNORM);
282+ return createDFD422 (0 , 4 , bits, shiftBits , channels, position_xs, position_ys, s_UNORM);
283283}
284284case VK_FORMAT_B8G8R8G8_422_UNORM: {
285- int channels[] = {1 , 0 , 2 , 0 }; int bits[] = {8 , 8 , 8 , 8 }; int paddings [] = {0 , 0 , 0 , 0 };
285+ int channels[] = {1 , 0 , 2 , 0 }; int bits[] = {8 , 8 , 8 , 8 }; int shiftBits [] = {0 , 0 , 0 , 0 };
286286 int position_xs[] = {64 , 64 , 64 , 192 }; int position_ys[] = {128 , 128 , 128 , 128 };
287- return createDFD422 (0 , 4 , bits, paddings , channels, position_xs, position_ys, s_UNORM);
287+ return createDFD422 (0 , 4 , bits, shiftBits , channels, position_xs, position_ys, s_UNORM);
288288}
289289case VK_FORMAT_R10X6_UNORM_PACK16: {
290- int channels[] = {0 }; int bits[] = {10 }; int paddings [] = {6 };
291- return createDFDPackedPadded (0 , 1 , bits, paddings , channels, s_UNORM);
290+ int channels[] = {0 }; int bits[] = {10 }; int shiftBits [] = {6 };
291+ return createDFDPackedShifted (0 , 1 , bits, shiftBits , channels, s_UNORM);
292292}
293293case VK_FORMAT_R10X6G10X6_UNORM_2PACK16: {
294- int channels[] = {0 , 1 }; int bits[] = {10 , 10 }; int paddings [] = {6 , 6 };
295- return createDFDPackedPadded (0 , 2 , bits, paddings , channels, s_UNORM);
294+ int channels[] = {0 , 1 }; int bits[] = {10 , 10 }; int shiftBits [] = {6 , 6 };
295+ return createDFDPackedShifted (0 , 2 , bits, shiftBits , channels, s_UNORM);
296296}
297297case VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16: {
298- int channels[] = {0 , 1 , 2 , 3 }; int bits[] = {10 , 10 , 10 , 10 }; int paddings [] = {6 , 6 , 6 , 6 };
299- return createDFDPackedPadded (0 , 4 , bits, paddings , channels, s_UNORM);
298+ int channels[] = {0 , 1 , 2 , 3 }; int bits[] = {10 , 10 , 10 , 10 }; int shiftBits [] = {6 , 6 , 6 , 6 };
299+ return createDFDPackedShifted (0 , 4 , bits, shiftBits , channels, s_UNORM);
300300}
301301case VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16: {
302- int channels[] = {0 , 1 , 0 , 2 }; int bits[] = {10 , 10 , 10 , 10 }; int paddings [] = {6 , 6 , 6 , 6 };
302+ int channels[] = {0 , 1 , 0 , 2 }; int bits[] = {10 , 10 , 10 , 10 }; int shiftBits [] = {6 , 6 , 6 , 6 };
303303 int position_xs[] = {64 , 64 , 192 , 64 }; int position_ys[] = {128 , 128 , 128 , 128 };
304- return createDFD422 (0 , 4 , bits, paddings , channels, position_xs, position_ys, s_UNORM);
304+ return createDFD422 (0 , 4 , bits, shiftBits , channels, position_xs, position_ys, s_UNORM);
305305}
306306case VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16: {
307- int channels[] = {1 , 0 , 2 , 0 }; int bits[] = {10 , 10 , 10 , 10 }; int paddings [] = {6 , 6 , 6 , 6 };
307+ int channels[] = {1 , 0 , 2 , 0 }; int bits[] = {10 , 10 , 10 , 10 }; int shiftBits [] = {6 , 6 , 6 , 6 };
308308 int position_xs[] = {64 , 64 , 64 , 192 }; int position_ys[] = {128 , 128 , 128 , 128 };
309- return createDFD422 (0 , 4 , bits, paddings , channels, position_xs, position_ys, s_UNORM);
309+ return createDFD422 (0 , 4 , bits, shiftBits , channels, position_xs, position_ys, s_UNORM);
310310}
311311case VK_FORMAT_R12X4_UNORM_PACK16: {
312- int channels[] = {0 }; int bits[] = {12 }; int paddings [] = {4 };
313- return createDFDPackedPadded (0 , 1 , bits, paddings , channels, s_UNORM);
312+ int channels[] = {0 }; int bits[] = {12 }; int shiftBits [] = {4 };
313+ return createDFDPackedShifted (0 , 1 , bits, shiftBits , channels, s_UNORM);
314314}
315315case VK_FORMAT_R12X4G12X4_UNORM_2PACK16: {
316- int channels[] = {0 , 1 }; int bits[] = {12 , 12 }; int paddings [] = {4 , 4 };
317- return createDFDPackedPadded (0 , 2 , bits, paddings , channels, s_UNORM);
316+ int channels[] = {0 , 1 }; int bits[] = {12 , 12 }; int shiftBits [] = {4 , 4 };
317+ return createDFDPackedShifted (0 , 2 , bits, shiftBits , channels, s_UNORM);
318318}
319319case VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16: {
320- int channels[] = {0 , 1 , 2 , 3 }; int bits[] = {12 , 12 , 12 , 12 }; int paddings [] = {4 , 4 , 4 , 4 };
321- return createDFDPackedPadded (0 , 4 , bits, paddings , channels, s_UNORM);
320+ int channels[] = {0 , 1 , 2 , 3 }; int bits[] = {12 , 12 , 12 , 12 }; int shiftBits [] = {4 , 4 , 4 , 4 };
321+ return createDFDPackedShifted (0 , 4 , bits, shiftBits , channels, s_UNORM);
322322}
323323case VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16: {
324- int channels[] = {0 , 1 , 0 , 2 }; int bits[] = {12 , 12 , 12 , 12 }; int paddings [] = {4 , 4 , 4 , 4 };
324+ int channels[] = {0 , 1 , 0 , 2 }; int bits[] = {12 , 12 , 12 , 12 }; int shiftBits [] = {4 , 4 , 4 , 4 };
325325 int position_xs[] = {64 , 64 , 192 , 64 }; int position_ys[] = {128 , 128 , 128 , 128 };
326- return createDFD422 (0 , 4 , bits, paddings , channels, position_xs, position_ys, s_UNORM);
326+ return createDFD422 (0 , 4 , bits, shiftBits , channels, position_xs, position_ys, s_UNORM);
327327}
328328case VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16: {
329- int channels[] = {1 , 0 , 2 , 0 }; int bits[] = {12 , 12 , 12 , 12 }; int paddings [] = {4 , 4 , 4 , 4 };
329+ int channels[] = {1 , 0 , 2 , 0 }; int bits[] = {12 , 12 , 12 , 12 }; int shiftBits [] = {4 , 4 , 4 , 4 };
330330 int position_xs[] = {64 , 64 , 64 , 192 }; int position_ys[] = {128 , 128 , 128 , 128 };
331- return createDFD422 (0 , 4 , bits, paddings , channels, position_xs, position_ys, s_UNORM);
331+ return createDFD422 (0 , 4 , bits, shiftBits , channels, position_xs, position_ys, s_UNORM);
332332}
333333case VK_FORMAT_G16B16G16R16_422_UNORM: {
334- int channels[] = {0 , 1 , 0 , 2 }; int bits[] = {16 , 16 , 16 , 16 }; int paddings [] = {0 , 0 , 0 , 0 };
334+ int channels[] = {0 , 1 , 0 , 2 }; int bits[] = {16 , 16 , 16 , 16 }; int shiftBits [] = {0 , 0 , 0 , 0 };
335335 int position_xs[] = {64 , 64 , 192 , 64 }; int position_ys[] = {128 , 128 , 128 , 128 };
336- return createDFD422 (0 , 4 , bits, paddings , channels, position_xs, position_ys, s_UNORM);
336+ return createDFD422 (0 , 4 , bits, shiftBits , channels, position_xs, position_ys, s_UNORM);
337337}
338338case VK_FORMAT_B16G16R16G16_422_UNORM: {
339- int channels[] = {1 , 0 , 2 , 0 }; int bits[] = {16 , 16 , 16 , 16 }; int paddings [] = {0 , 0 , 0 , 0 };
339+ int channels[] = {1 , 0 , 2 , 0 }; int bits[] = {16 , 16 , 16 , 16 }; int shiftBits [] = {0 , 0 , 0 , 0 };
340340 int position_xs[] = {64 , 64 , 64 , 192 }; int position_ys[] = {128 , 128 , 128 , 128 };
341- return createDFD422 (0 , 4 , bits, paddings , channels, position_xs, position_ys, s_UNORM);
341+ return createDFD422 (0 , 4 , bits, shiftBits , channels, position_xs, position_ys, s_UNORM);
342342}
343343case VK_FORMAT_A4R4G4B4_UNORM_PACK16: {
344344 int channels[] = {2 ,1 ,0 ,3 }; int bits[] = {4 ,4 ,4 ,4 };
0 commit comments