Mesa (master): gallium: don't use enum bitfields in p_video_state.h

Brian Paul brianp at kemper.freedesktop.org
Thu Jul 14 14:16:38 UTC 2011


Module: Mesa
Branch: master
Commit: e5f7e09210838376ba64c6c09b6270046b0feab1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e5f7e09210838376ba64c6c09b6270046b0feab1

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Jul 14 08:09:21 2011 -0600

gallium: don't use enum bitfields in p_video_state.h

Silences many warnings about "type of bit-field ‘field_select’ is a
GCC extension".

Since the field sizes were 8 and 16 bits, just use basic types.

---

 src/gallium/include/pipe/p_video_state.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h
index 4d8a241..2a64ffb 100644
--- a/src/gallium/include/pipe/p_video_state.h
+++ b/src/gallium/include/pipe/p_video_state.h
@@ -85,18 +85,18 @@ enum pipe_video_mv_weight
 struct pipe_motionvector
 {
    struct {
-      signed x:16, y:16;
-      enum pipe_video_field_select field_select:16;
-      enum pipe_video_mv_weight weight:16;
+      short x, y;
+      ushort field_select; /**< enum pipe_video_field_select */
+      ushort weight;  /**< enum pipe_video_mv_weight  */
    } top, bottom;
 };
 
 /* bitfields because this is used as a vertex buffer element */
 struct pipe_ycbcr_block
 {
-   unsigned x:8, y:8;
-   enum pipe_mpeg12_dct_intra intra:8;
-   enum pipe_mpeg12_dct_type coding:8;
+   ubyte x, y;
+   ubyte intra;  /**< enum pipe_mpeg12_dct_intra */
+   ubyte coding; /**< enum pipe_mpeg12_dct_type */
 };
 
 struct pipe_picture_desc




More information about the mesa-commit mailing list