mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
pvr: dynamic depth bias support
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
22c67a3c4e
commit
66d5815919
4 changed files with 24 additions and 0 deletions
|
|
@ -4156,6 +4156,11 @@ uint32_t *pvr_pds_coefficient_loading(
|
|||
else
|
||||
program->dout_src_offsets[iterator] = ~0u;
|
||||
|
||||
if (program->z_iterator == ~0u)
|
||||
program->dout_z_iterator_offset = ~0u;
|
||||
else if (program->z_iterator == iterator)
|
||||
program->dout_z_iterator_offset = constant;
|
||||
|
||||
/* Write the first iterator. */
|
||||
iterator_word =
|
||||
(uint64_t)program->FPU_iterators[iterator]
|
||||
|
|
|
|||
|
|
@ -272,6 +272,9 @@ struct pvr_pds_coeff_loading_program {
|
|||
BITSET_DECLARE(flat_iter_mask, PVR_MAXIMUM_ITERATIONS);
|
||||
uint32_t dout_src_offsets[PVR_MAXIMUM_ITERATIONS];
|
||||
|
||||
uint32_t z_iterator;
|
||||
uint32_t dout_z_iterator_offset;
|
||||
|
||||
uint32_t data_size;
|
||||
uint32_t code_size;
|
||||
|
||||
|
|
|
|||
|
|
@ -5132,6 +5132,19 @@ setup_pds_coeff_program(struct pvr_cmd_buffer *const cmd_buffer,
|
|||
&douti_src);
|
||||
}
|
||||
|
||||
if (program->dout_z_iterator_offset != ~0u) {
|
||||
struct ROGUE_PDSINST_DOUT_FIELDS_DOUTI_SRC douti_src;
|
||||
ROGUE_PDSINST_DOUT_FIELDS_DOUTI_SRC_unpack(
|
||||
&pds_coeff_program_buffer[program->dout_z_iterator_offset],
|
||||
&douti_src);
|
||||
|
||||
douti_src.depthbias = dynamic_state->rs.depth_bias.enable;
|
||||
|
||||
ROGUE_PDSINST_DOUT_FIELDS_DOUTI_SRC_pack(
|
||||
&pds_coeff_program_buffer[program->dout_z_iterator_offset],
|
||||
&douti_src);
|
||||
}
|
||||
|
||||
/* FIXME: Figure out the define for alignment of 16. */
|
||||
return pvr_cmd_buffer_upload_pds(
|
||||
cmd_buffer,
|
||||
|
|
|
|||
|
|
@ -1424,7 +1424,10 @@ static void pvr_graphics_pipeline_setup_fragment_coeff_program(
|
|||
douti_src.size = ROGUE_PDSINST_DOUTI_SIZE_1D;
|
||||
}
|
||||
|
||||
frag_coeff_program->z_iterator = fpu;
|
||||
frag_coeff_program->destination[fpu++] = dest++;
|
||||
} else {
|
||||
frag_coeff_program->z_iterator = ~0u;
|
||||
}
|
||||
|
||||
if (fs_data->uses.w) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue