mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 02:30:18 +01:00
gallium/hud: Use do_once for one-time init
Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7644>
This commit is contained in:
parent
b4ad27a986
commit
2e81ec5e00
1 changed files with 5 additions and 2 deletions
|
|
@ -41,6 +41,7 @@
|
|||
#include "hud/hud_private.h"
|
||||
|
||||
#include "cso_cache/cso_context.h"
|
||||
#include "util/debug.h"
|
||||
#include "util/u_draw_quad.h"
|
||||
#include "util/format/u_format.h"
|
||||
#include "util/u_inlines.h"
|
||||
|
|
@ -1811,8 +1812,10 @@ hud_create(struct cso_context *cso, struct hud_context *share)
|
|||
|
||||
memset(&action, 0, sizeof(action));
|
||||
#endif
|
||||
huds_visible = debug_get_bool_option("GALLIUM_HUD_VISIBLE", TRUE);
|
||||
hud_scale = debug_get_num_option("GALLIUM_HUD_SCALE", 1);
|
||||
do_once {
|
||||
huds_visible = debug_get_bool_option("GALLIUM_HUD_VISIBLE", TRUE);
|
||||
hud_scale = debug_get_num_option("GALLIUM_HUD_SCALE", 1);
|
||||
}
|
||||
|
||||
if (!env || !*env)
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue