mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
lvp: replace lower_ray_tracing_stack_base with inline_sysval
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Marek Olšák <maraeo@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36516>
This commit is contained in:
parent
a52cdc08b7
commit
1708230415
1 changed files with 3 additions and 15 deletions
|
|
@ -1025,19 +1025,6 @@ lvp_lower_ray_tracing_instr(nir_builder *b, nir_instr *instr, void *data)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
lvp_lower_ray_tracing_stack_base(nir_builder *b, nir_intrinsic_instr *instr, void *data)
|
||||
{
|
||||
if (instr->intrinsic != nir_intrinsic_load_ray_tracing_stack_base_lvp)
|
||||
return false;
|
||||
|
||||
b->cursor = nir_after_instr(&instr->instr);
|
||||
|
||||
nir_def_replace(&instr->def, nir_imm_int(b, b->shader->scratch_size));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
lvp_compile_ray_tracing_pipeline(struct lvp_pipeline *pipeline,
|
||||
const VkRayTracingPipelineCreateInfoKHR *create_info)
|
||||
|
|
@ -1109,8 +1096,9 @@ lvp_compile_ray_tracing_pipeline(struct lvp_pipeline *pipeline,
|
|||
NIR_PASS(_, b->shader, nir_lower_explicit_io, nir_var_shader_temp,
|
||||
nir_address_format_32bit_offset);
|
||||
|
||||
NIR_PASS(_, b->shader, nir_shader_intrinsics_pass, lvp_lower_ray_tracing_stack_base,
|
||||
nir_metadata_control_flow, NULL);
|
||||
NIR_PASS(_, b->shader, nir_inline_sysval,
|
||||
nir_intrinsic_load_ray_tracing_stack_base_lvp,
|
||||
b->shader->scratch_size);
|
||||
|
||||
/* We can not support dynamic stack sizes, assume the worst. */
|
||||
b->shader->scratch_size +=
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue