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 bea7839c1e)
This commit is contained in:
Alyssa Rosenzweig 2021-01-29 14:33:08 -05:00 committed by Dylan Baker
parent 714e9a02d1
commit 25a9312d23
2 changed files with 6 additions and 1 deletions

View file

@ -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
},

View file

@ -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;