mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 09:00:10 +01:00
pco: support render target/layer id intrinsic
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
parent
78062fbb75
commit
f4bc938a4d
2 changed files with 13 additions and 1 deletions
|
|
@ -1426,6 +1426,12 @@ static pco_instr *trans_intr(trans_ctx *tctx, nir_intrinsic_instr *intr)
|
||||||
pco_ref_hwreg(PCO_SR_SAMP_NUM, PCO_REG_CLASS_SPEC));
|
pco_ref_hwreg(PCO_SR_SAMP_NUM, PCO_REG_CLASS_SPEC));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case nir_intrinsic_load_layer_id:
|
||||||
|
instr = pco_mov(&tctx->b,
|
||||||
|
dest,
|
||||||
|
pco_ref_hwreg(PCO_SR_RENDER_TGT_ID, PCO_REG_CLASS_SPEC));
|
||||||
|
break;
|
||||||
|
|
||||||
case nir_intrinsic_load_face_ccw_pco:
|
case nir_intrinsic_load_face_ccw_pco:
|
||||||
instr = pco_mov(&tctx->b,
|
instr = pco_mov(&tctx->b,
|
||||||
dest,
|
dest,
|
||||||
|
|
|
||||||
|
|
@ -1751,7 +1751,13 @@ static void pvr_alloc_fs_sysvals(pco_data *data, nir_shader *nir)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear built-in sysvals. */
|
/* Clear built-in sysvals. */
|
||||||
BITSET_CLEAR(system_values_read, SYSTEM_VALUE_SAMPLE_ID);
|
gl_system_value builtin_sys_vals[] = {
|
||||||
|
SYSTEM_VALUE_SAMPLE_ID,
|
||||||
|
SYSTEM_VALUE_LAYER_ID,
|
||||||
|
};
|
||||||
|
|
||||||
|
for (unsigned u = 0; u < ARRAY_SIZE(builtin_sys_vals); ++u)
|
||||||
|
BITSET_CLEAR(system_values_read, builtin_sys_vals[u]);
|
||||||
|
|
||||||
assert(BITSET_IS_EMPTY(system_values_read));
|
assert(BITSET_IS_EMPTY(system_values_read));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue