summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2021-01-29 14:33:08 -0500
committerDylan Baker <dylan.c.baker@intel.com>2021-02-18 14:07:21 -0800
commit25a9312d23390d1d653592da2f628ca3060334c6 (patch)
tree99796a0a31d31b2ef6b9e086fae94f0fe4e00970
parent714e9a02d1d9a4c48d9e479d4628a5710fcf4ed8 (diff)
panfrost: Set tiler descriptor sampler pattern
Bifrost requires this to match the framebuffer descriptor's sample pattern, but we were leaving the default (single-sampled) unconditionally, leading to undefined behaviour. It is unknown if this fixes any user-visible bugs, but without the commit the descriptor is likely out-of-spec. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Cc: 21.0 <mesa-stable@lists.freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774> (cherry picked from commit bea7839c1ea2ffb190a083a0399806bf032de37d)
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/panfrost/pan_job.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index c8b87c241fd..ff78137d93d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2965,7 +2965,7 @@
"description": "panfrost: Set tiler descriptor sampler pattern",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 27e589f1b01..e175a0658c2 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -35,6 +35,7 @@
#include "util/format/u_format.h"
#include "util/u_pack_color.h"
#include "util/rounding.h"
+#include "util/u_framebuffer.h"
#include "pan_util.h"
#include "pan_blending.h"
#include "pan_cmdstream.h"
@@ -696,6 +697,10 @@ panfrost_batch_get_bifrost_tiler(struct panfrost_batch *batch, unsigned vertex_c
tiler.fb_width = batch->key.width;
tiler.fb_height = batch->key.height;
tiler.heap = heap;
+
+ /* Must match framebuffer descriptor */
+ unsigned samples = util_framebuffer_get_num_samples(&batch->key);
+ tiler.sample_pattern = panfrost_sample_pattern(samples);
}
batch->tiler_meta = t.gpu;