From: Kenneth Graunke Date: Fri, 19 Jan 2018 23:09:05 +0000 (-0800) Subject: iris: linear resources X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=49896861ce81d15e248edb4c6f92819ab9f20c20;p=mesa.git iris: linear resources --- diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 65985747d00..b141d0de8b3 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -212,12 +212,6 @@ iris_resource_create_with_modifiers(struct pipe_screen *pscreen, uint64_t modifier = DRM_FORMAT_MOD_INVALID; - if (templ->target == PIPE_BUFFER) - modifier = DRM_FORMAT_MOD_LINEAR; - - if (templ->bind & (PIPE_BIND_LINEAR | PIPE_BIND_CURSOR)) - modifier = DRM_FORMAT_MOD_LINEAR; - if (modifiers_count == 0) { /* Display is X-tiled for historical reasons. */ modifier = (templ->bind & PIPE_BIND_DISPLAY_TARGET) ? @@ -225,6 +219,12 @@ 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) + modifier = DRM_FORMAT_MOD_LINEAR; + + if (templ->bind & (PIPE_BIND_LINEAR | PIPE_BIND_CURSOR)) + modifier = DRM_FORMAT_MOD_LINEAR; + if (modifier == DRM_FORMAT_MOD_INVALID) { /* User requested specific modifiers */ modifier = select_best_modifier(devinfo, modifiers, modifiers_count);