Module: Mesa
Branch: main
Commit: 7b419215048d63b33d3693206a7319d933c075d8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b419215048d63b33d3693206a7319d933c075d8

Author: Karol Herbst <[email protected]>
Date:   Thu Nov  2 20:41:25 2023 +0100

nvc0: implement PIPE_CAP_TIMER_RESOLUTION

This allows rusticl to create profiling queues.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10042
Fixes: 660f2eabe11 ("gallium: add PIPE_CAP_TIMER_RESOLUTION")
Signed-off-by: Karol Herbst <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26016>

---

 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c 
b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index eb21b09558e..28a616a621f 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -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);

Reply via email to