We will use this for implementing deferred flushes in the next commit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3802>
va_end(args);
}
+static void
+iris_detect_kernel_features(struct iris_screen *screen)
+{
+ /* Kernel 5.2+ */
+ if (gen_gem_supports_syncobj_wait(screen->fd))
+ screen->kernel_features |= KERNEL_HAS_WAIT_FOR_SUBMIT;
+}
+
struct pipe_screen *
iris_screen_create(int fd, const struct pipe_screen_config *config)
{
iris_getparam_integer(screen->fd, I915_PARAM_SUBSLICE_TOTAL);
assert(screen->subslice_total >= 1);
+ iris_detect_kernel_features(screen);
+
struct pipe_screen *pscreen = &screen->base;
iris_init_screen_fence_functions(pscreen);
bool always_flush_cache;
} driconf;
+ /** Does the kernel support various features (KERNEL_HAS_* bitfield)? */
+ unsigned kernel_features;
+#define KERNEL_HAS_WAIT_FOR_SUBMIT (1<<0)
+
unsigned subslice_total;
uint64_t aperture_bytes;