iris: linear staging buffers - fast CPU access...
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 23 Apr 2018 04:44:46 +0000 (21:44 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:06 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_resource.c

index 3934f82350498997184f95b82e45f9340be25a0d..2268f5e3b8cdd6acab9a6346dcaa37ce15c01d0c 100644 (file)
@@ -221,7 +221,7 @@ iris_resource_create_with_modifiers(struct pipe_screen *pscreen,
       /* XXX: make sure this doesn't do stupid things for internal textures */
    }
 
-   if (templ->target == PIPE_BUFFER)
+   if (templ->target == PIPE_BUFFER || templ->usage == PIPE_USAGE_STAGING)
       modifier = DRM_FORMAT_MOD_LINEAR;
 
    if (templ->bind & (PIPE_BIND_LINEAR | PIPE_BIND_CURSOR))