diff options
author | Kenneth Graunke <[email protected]> | 2018-01-19 15:09:05 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:05 -0800 |
commit | 49896861ce81d15e248edb4c6f92819ab9f20c20 (patch) | |
tree | 08cd9fc3cee5c11e93630a9ff864b4eabd0c10c6 | |
parent | c820f5a4bd7d7f3be8f7879433ac4db12e06e56b (diff) |
iris: linear resources
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.c | 12 |
1 files changed, 6 insertions, 6 deletions
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); |