From 3416d30f2b8fac4f12bf73aa1f5d5102a07b7f83 Mon Sep 17 00:00:00 2001 From: "Francisco J. Solis" Date: Sun, 9 Jun 2024 14:15:05 -0600 Subject: [PATCH] pattern/dds: Fix bitfield PixelFormatFlags (#259) * Fix bitfield PixelFormatFlags The padding names should not repeat Comments should be added to each field for clarification Padding should be corrected for luminance. * Re-work of PixelFormatFlags Add more information considering current GIMP repository structure https://gitlab.gnome.org/GNOME/gimp/-/blame/master/plug-ins/file-dds/dds.h\#L145 --- patterns/dds.hexpat | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/patterns/dds.hexpat b/patterns/dds.hexpat index 4552a5d..a7c42a5 100644 --- a/patterns/dds.hexpat +++ b/patterns/dds.hexpat @@ -167,16 +167,26 @@ bitfield Caps2Flags { }; bitfield PixelFormatFlags { - alphaPixels : 1; - alpha : 1; - fourCC : 1; - padding : 3; - rgb : 1; // 0x40 - padding : 2; - yuv : 1; // 0x200 - padding : 3; - luminance : 1; // 0x20000 - padding : 17; + alphaPixels : 1; // DDPF_ALPHAPIXELS + alpha : 1; // DDPF_ALPHA + fourCC : 1; // DDPF_FOURCC + paletteIndexed4 : 1; // DDPF_PALETTEINDEXED4 + paletteIndexedTo8 : 1; // DDPF_PALETTEINDEXEDTO8 + paletteIndexed8 : 1; // DDPF_PALETTEINDEXED8 + rgb : 1; // DDPF_RGB + compressed : 1; // DDPF_COMPRESSED + rgbToYuv : 1; // DDPF_RGBTOYUV + yuv : 1; // DDPF_YUV + zBuffer : 1; // DDPF_ZBUFFER + paletteIndexed1 : 1; // DDPF_PALETTEINDEXED1 + paletteIndexed2 : 1; // DDPF_PALETTEINDEXED2 + zPixels : 1; // DDPF_ZPIXELS + stencilBuffer : 1; // DDPF_STENCILBUFFER + alphaResult : 1; // DDPF_ALPHARESULT + luminance : 1; // DDPF_LUMINANCE + bumpLuminance : 1; // DDPF_BUMPLUMINANCE + bumpDudv : 1; // DDPF_BUMPDUDV + padding : 13; // Padding bits to complete 32-bit structure }; enum DX10ResourceDimension : u32 {