mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
util/tgsi: use ASSERT_BITFIELD_SIZE() to check opcode field size
I've noticed at least two places where we store the TGSI opcode in an unsigned:8 bitfield. We're at 249 opcodes now. If we hit 256 we'll need to grow those bitfields. Use the new ASSERT_BITFIELD_SIZE() macro to detect that. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
d4726b1318
commit
940fba68c9
1 changed files with 2 additions and 0 deletions
|
|
@ -55,6 +55,8 @@ tgsi_get_opcode_info( uint opcode )
|
|||
{
|
||||
static boolean firsttime = 1;
|
||||
|
||||
ASSERT_BITFIELD_SIZE(struct tgsi_opcode_info, opcode, TGSI_OPCODE_LAST - 1);
|
||||
|
||||
if (firsttime) {
|
||||
unsigned i;
|
||||
firsttime = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue