tgsi: bump tgsi_opcode_info::output_mode size to 4 bits
authorBrian Paul <brianp@vmware.com>
Fri, 17 Nov 2017 16:51:10 +0000 (09:51 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 17 Nov 2017 23:09:39 +0000 (16:09 -0700)
To avoid problems with MSVC.  And verify size with ASSERT_BITFIELD_SIZE().

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_info.c
src/gallium/auxiliary/tgsi/tgsi_info.h

index c39de0edfcd962578af9e215175a38212ab20072..2baed5be356bb8c56aacebec07d9af7ab1dbb5e3 100644 (file)
@@ -56,6 +56,8 @@ tgsi_get_opcode_info( uint opcode )
    static boolean firsttime = 1;
 
    ASSERT_BITFIELD_SIZE(struct tgsi_opcode_info, opcode, TGSI_OPCODE_LAST - 1);
+   ASSERT_BITFIELD_SIZE(struct tgsi_opcode_info, output_mode,
+                        TGSI_OUTPUT_OTHER);
 
    if (firsttime) {
       unsigned i;
index 8d32f4774be890ef0978301fb300c7b810a7886f..bbd86c6b9698ff7726f066e3e2ba63f6a63c11bb 100644 (file)
@@ -78,7 +78,7 @@ struct tgsi_opcode_info
    unsigned is_branch:1;
    unsigned pre_dedent:1;
    unsigned post_indent:1;
-   enum tgsi_output_mode output_mode:3;
+   enum tgsi_output_mode output_mode:4;
    unsigned opcode:8;
 };