Mesa (staging/21.1): panfrost: Fix shader texture count
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Apr 25 11:35:15 UTC 2021
Module: Mesa
Branch: staging/21.1
Commit: 184b01e7721b14b75755ff80af0657922ece3cb8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=184b01e7721b14b75755ff80af0657922ece3cb8
Author: Icecream95 <ixn at disroot.org>
Date: Thu Apr 22 07:13:39 2021 +1200
panfrost: Fix shader texture count
Instead of using num_textures, determine the texture count from the
last bit set in textures_used.
Fixes ADDR_RANGE_FAULTs when draw_textured_quad writes only stencil.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10422>
(cherry picked from commit c7076e03e51bc578f61286ac4f4b91635aa3667e)
---
.pick_status.json | 2 +-
src/panfrost/lib/pan_shader.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 7e97739512a..5df799d7eb7 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -211,7 +211,7 @@
"description": "panfrost: Fix shader texture count",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/panfrost/lib/pan_shader.c b/src/panfrost/lib/pan_shader.c
index 2f6e30f58a8..5994ff82a6b 100644
--- a/src/panfrost/lib/pan_shader.c
+++ b/src/panfrost/lib/pan_shader.c
@@ -234,5 +234,5 @@ pan_shader_compile(const struct panfrost_device *dev,
info->attribute_count += util_bitcount(s->info.images_used);
info->writes_global = s->info.writes_memory;
- info->sampler_count = info->texture_count = s->info.num_textures;
+ info->sampler_count = info->texture_count = BITSET_LAST_BIT(s->info.textures_used);
}
More information about the mesa-commit
mailing list