zink: implement PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS
authorKarol Herbst <kherbst@redhat.com>
Sat, 14 Oct 2023 22:10:06 +0000 (00:10 +0200)
committerMarge Bot <emma+marge@anholt.net>
Sat, 14 Oct 2023 22:14:34 +0000 (22:14 +0000)
We have to return at least 1.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25731>

src/gallium/drivers/zink/zink_screen.c

index 0a6137e..51ac14b 100644 (file)
@@ -464,9 +464,12 @@ zink_get_compute_param(struct pipe_screen *pscreen, enum pipe_shader_ir ir_type,
    case PIPE_COMPUTE_CAP_MAX_GLOBAL_SIZE:
       RET((uint64_t []) { screen->total_video_mem });
 
+   case PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS:
+      // no way in vulkan to retrieve this information.
+      RET((uint32_t []) { 1 });
+
    case PIPE_COMPUTE_CAP_MAX_SUBGROUPS:
    case PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY:
-   case PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS:
    case PIPE_COMPUTE_CAP_MAX_PRIVATE_SIZE:
    case PIPE_COMPUTE_CAP_MAX_INPUT_SIZE:
       // XXX: I think these are for Clover...