etnaviv: only try to construct scanout resource when on KMS winsys
[mesa.git] / src / gallium / drivers / etnaviv / etnaviv_resource.c
index c7eedab74187cd3644b0d4b21d6b31ddd3ef434e..83179d3cd0880bf2da6486287aae9fbc958c02a3 100644 (file)
@@ -238,7 +238,7 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout,
    if (!screen->specs.use_blt && templat->target != PIPE_BUFFER)
       etna_adjust_rs_align(screen->specs.pixel_pipes, NULL, &paddingY);
 
-   if (templat->bind & PIPE_BIND_SCANOUT) {
+   if (templat->bind & PIPE_BIND_SCANOUT && screen->ro->kms_fd >= 0) {
       struct pipe_resource scanout_templat = *templat;
       struct renderonly_scanout *scanout;
       struct winsys_handle handle;