summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-08-22 23:39:38 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:08 -0800
commit9f7654139bac6f886cc77fe8f6cde8e5df6ee14f (patch)
treefe6c00b3fe348b2dc539590a1f4ec9b32139b8f3
parentb2a5e1ebb34eae25ca03a62ae52c35fadf1ab8e5 (diff)
iris: use linear for 1D textures
This gets us the gen9 compact linear storage
-rw-r--r--src/gallium/drivers/iris/iris_resource.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 9eb5816d772..3f797ffbc94 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -248,6 +248,9 @@ iris_resource_create_with_modifiers(struct pipe_screen *pscreen,
if (modifiers_count == 0 || !modifiers) {
if (has_depth) {
modifier = I915_FORMAT_MOD_Y_TILED;
+ } else if (templ->target == PIPE_TEXTURE_1D ||
+ templ->target == PIPE_TEXTURE_1D_ARRAY) {
+ modifier = DRM_FORMAT_MOD_LINEAR;
} else if (templ->bind & PIPE_BIND_DISPLAY_TARGET) {
/* Display is X-tiled for historical reasons. */
modifier = I915_FORMAT_MOD_X_TILED;