From 0afd2930fd3a929939bfbf098dacdc87ea002d14 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 2 Nov 2023 20:41:25 +0100 Subject: [PATCH] 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 Part-of: (cherry picked from commit 7b419215048d63b33d3693206a7319d933c075d8) --- .pick_status.json | 2 +- src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index e89512f62ff..ff929b93f95 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 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);