nvc0: implement PIPE_CAP_TIMER_RESOLUTION

This allows rusticl to create profiling queues.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10042
Fixes: 660f2eabe1 ("gallium: add PIPE_CAP_TIMER_RESOLUTION")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26016>
(cherry picked from commit 7b41921504)
This commit is contained in:
Karol Herbst 2023-11-02 20:41:25 +01:00 committed by Eric Engestrom
parent 4cbcc74d8f
commit 0afd2930fd
2 changed files with 4 additions and 1 deletions

View file

@ -884,7 +884,7 @@
"description": "nvc0: implement PIPE_CAP_TIMER_RESOLUTION",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "660f2eabe116972b82f2b6fcdf4869962f641d6d",
"notes": null

View file

@ -207,6 +207,9 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_MAX_TEXTURE_MB:
return 0; /* TODO: use 1/2 of VRAM for this? */
case PIPE_CAP_TIMER_RESOLUTION:
return 1000;
case PIPE_CAP_SUPPORTED_PRIM_MODES_WITH_RESTART:
case PIPE_CAP_SUPPORTED_PRIM_MODES:
return BITFIELD_MASK(MESA_PRIM_COUNT);