mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-20 05:50:27 +01:00
Revert "tgsi: Fix helgrind complaint about one-time init"
This reverts commit d91fe7d1c6.
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7760>
This commit is contained in:
parent
8da98beb5d
commit
f57f040f13
1 changed files with 4 additions and 1 deletions
|
|
@ -53,12 +53,15 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
|
|||
const struct tgsi_opcode_info *
|
||||
tgsi_get_opcode_info(enum tgsi_opcode 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);
|
||||
|
||||
do_once {
|
||||
if (firsttime) {
|
||||
unsigned i;
|
||||
firsttime = 0;
|
||||
for (i = 0; i < ARRAY_SIZE(opcode_info); i++)
|
||||
assert(opcode_info[i].opcode == i);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue