mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-28 21:30:45 +01:00
pan/compiler: Add formats to varyings info
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Acked-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
This commit is contained in:
parent
c995376a22
commit
264ef3a6fa
3 changed files with 20 additions and 0 deletions
|
|
@ -7067,6 +7067,15 @@ bifrost_compile_shader_nir(nir_shader *nir,
|
|||
info->stage = nir->info.stage;
|
||||
|
||||
pan_nir_collect_varyings(nir, info);
|
||||
if (nir->info.stage == MESA_SHADER_VERTEX) {
|
||||
assert(inputs->varying_layout);
|
||||
memcpy(&info->varyings.formats, inputs->varying_layout,
|
||||
sizeof(*inputs->varying_layout));
|
||||
} else if (nir->info.stage == MESA_SHADER_FRAGMENT) {
|
||||
pan_varying_collect_formats(&info->varyings.formats,
|
||||
nir, inputs->gpu_id,
|
||||
inputs->trust_varying_flat_highp_types, false);
|
||||
}
|
||||
|
||||
if (nir->info.stage == MESA_SHADER_VERTEX && info->vs.idvs) {
|
||||
/* On 5th Gen, IDVS is only in one binary */
|
||||
|
|
|
|||
|
|
@ -2983,6 +2983,15 @@ midgard_compile_shader_nir(nir_shader *nir,
|
|||
/* Collect varyings after lowering I/O */
|
||||
info->quirk_no_auto32 = (ctx->quirks & MIDGARD_NO_AUTO32);
|
||||
pan_nir_collect_varyings(nir, info);
|
||||
if (nir->info.stage == MESA_SHADER_VERTEX) {
|
||||
assert(inputs->varying_layout);
|
||||
memcpy(&info->varyings.formats, inputs->varying_layout,
|
||||
sizeof(*inputs->varying_layout));
|
||||
} else if (nir->info.stage == MESA_SHADER_FRAGMENT) {
|
||||
pan_varying_collect_formats(&info->varyings.formats,
|
||||
nir, inputs->gpu_id,
|
||||
inputs->trust_varying_flat_highp_types, false);
|
||||
}
|
||||
|
||||
/* Optimisation passes */
|
||||
optimise_nir(nir, ctx->quirks, inputs->is_blend);
|
||||
|
|
|
|||
|
|
@ -496,6 +496,8 @@ struct pan_shader_info {
|
|||
|
||||
/* Bitfield of special varyings. */
|
||||
uint32_t fixed_varyings;
|
||||
|
||||
struct pan_varying_layout formats;
|
||||
} varyings;
|
||||
|
||||
/* UBOs to push to Register Mapped Uniforms (Midgard) or Fast Access
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue