[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH 3/5] wined3d: Use bitfields in struct arbfp_blit_type.
From:       Henri Verbeet <hverbeet () gmail ! com>
Date:       2015-03-30 9:09:13
Message-ID: CAOsNvwz3eVzBsBeOu-d85xNU6z1Kv_cRrS9jJqEm93dUjOtq7g () mail ! gmail ! com
[Download RAW message or body]

On 28 March 2015 at 17:06, Stefan Dösinger <stefan@codeweavers.com> wrote:
>  struct arbfp_blit_type
>  {
> -    enum complex_fixup fixup;
> -    GLenum textype;
> +    enum complex_fixup fixup : 4;
> +    enum wined3d_ffp_texture_type textype : 3;
> +    unsigned padding : 1;
>  };
>
I don't keep a very close eye on arb_program_shader.c, but I suspect
this doesn't quite do what you think it does. The structure is going
to get aligned to the alignment of the largest scalar field (which
would be 32 bits in this case because of enum/unsigned), so you'll
have another 24 bits of padding after the "padding" field.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic