mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-03 19:30:26 +01:00
gallium/hud: initialize query
Most of the drivers don't set up the maximum value in the query info. So when later hud_pane_set_max_value() is invoked, we are using a rather "random" number. Turns out that in some 32bit cases, this random number is big enough that `leftmost_digit` is 0 because DIV_ROUND_UP() overflows, aborting with an assertion. Fixes:c91cf7d7d2("gallium: implement a heads-up display module") Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12181> (cherry picked from commit10541d1fad)
This commit is contained in:
parent
1d02d0743d
commit
a5dec10d83
2 changed files with 2 additions and 2 deletions
|
|
@ -112,7 +112,7 @@
|
|||
"description": "gallium/hud: initialize query",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "c91cf7d7d2c8cc377945c79be87799c31ce9ae59"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ hud_driver_query_install(struct hud_batch_query_context **pbq,
|
|||
struct hud_pane *pane, struct pipe_screen *screen,
|
||||
const char *name)
|
||||
{
|
||||
struct pipe_driver_query_info query;
|
||||
struct pipe_driver_query_info query = { 0 };
|
||||
unsigned num_queries, i;
|
||||
boolean found = FALSE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue