mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
nak: Add printf_cb to nak_constant_offset_info
Reviewed-by: Mary Guillemard <mary@mary.zone> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40639>
This commit is contained in:
parent
aa782218e5
commit
701a2579fe
3 changed files with 8 additions and 2 deletions
|
|
@ -87,7 +87,12 @@ struct nak_constant_offset_info {
|
|||
uint32_t sample_masks_offset;
|
||||
|
||||
/**
|
||||
* The offset into cb0 for the printf buffer pointer.
|
||||
* The constant buffer index at which the printf buffer pointer lives.
|
||||
*/
|
||||
uint8_t printf_cb;
|
||||
|
||||
/**
|
||||
* The offset into printf_cb for the printf buffer pointer.
|
||||
*/
|
||||
uint32_t printf_buffer_offset;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -835,7 +835,7 @@ nak_nir_lower_printf_intrin(nir_builder *b, nir_intrinsic_instr *intrin,
|
|||
if (intrin->intrinsic == nir_intrinsic_load_printf_buffer_address) {
|
||||
nir_def *buffer_addr = nir_ldc_nv(
|
||||
b, 1, 64,
|
||||
nir_imm_int(b, 0),
|
||||
nir_imm_int(b, nak_const_offsets(nak, is_graphics)->printf_cb),
|
||||
nir_imm_int(b, nak_const_offsets(nak, is_graphics)->printf_buffer_offset));
|
||||
nir_def_replace(&intrin->def, buffer_addr);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ const struct nak_constant_offset_info nak_const_offsets_base = {
|
|||
.sample_info_cb = 0,
|
||||
.sample_locations_offset = nvk_root_descriptor_offset(draw.sample_locations),
|
||||
.sample_masks_offset = nvk_root_descriptor_offset(draw.sample_masks),
|
||||
.printf_cb = 0,
|
||||
.printf_buffer_offset = nvk_root_descriptor_offset(printf_buffer_addr),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue