mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
panfrost: Add MULTISAMPLED sysval
To be used with Bifrost coverage mask updates. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
This commit is contained in:
parent
9f55657366
commit
97a85c1071
2 changed files with 13 additions and 1 deletions
|
|
@ -915,6 +915,14 @@ panfrost_upload_sample_positions_sysval(struct panfrost_batch *batch,
|
|||
uniform->du[0] = panfrost_sample_positions(dev, panfrost_sample_pattern(samples));
|
||||
}
|
||||
|
||||
static void
|
||||
panfrost_upload_multisampled_sysval(struct panfrost_batch *batch,
|
||||
struct sysval_uniform *uniform)
|
||||
{
|
||||
unsigned samples = util_framebuffer_get_num_samples(&batch->key);
|
||||
uniform->u[0] = samples > 1;
|
||||
}
|
||||
|
||||
static void
|
||||
panfrost_upload_sysvals(struct panfrost_batch *batch, void *buf,
|
||||
struct panfrost_shader_state *ss,
|
||||
|
|
@ -970,7 +978,10 @@ panfrost_upload_sysvals(struct panfrost_batch *batch, void *buf,
|
|||
panfrost_upload_sample_positions_sysval(batch,
|
||||
&uniforms[i]);
|
||||
break;
|
||||
|
||||
case PAN_SYSVAL_MULTISAMPLED:
|
||||
panfrost_upload_multisampled_sysval(batch,
|
||||
&uniforms[i]);
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ enum {
|
|||
PAN_SYSVAL_WORK_DIM = 9,
|
||||
PAN_SYSVAL_IMAGE_SIZE = 10,
|
||||
PAN_SYSVAL_SAMPLE_POSITIONS = 11,
|
||||
PAN_SYSVAL_MULTISAMPLED = 12,
|
||||
};
|
||||
|
||||
#define PAN_TXS_SYSVAL_ID(texidx, dim, is_array) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue