render3d: the pipeline cache grows in gvk_pipe_build alone
gvk_pipeline_fast's miss (the build and the six cache pushes) is its own function, so the fence can
declare it: @alloc_ok("pipeline cache: one per variant the game draws") once lang/memory-fence's
compiler is merged (the annotation is not known on this base). Compiled.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
df6ea046c3
commit
03a8ee443d
1 changed files with 5 additions and 0 deletions
|
|
@ -1971,6 +1971,11 @@ function gvk_pipeline_fast(render3d_st: mut Render3dState, p: int, m: Mesh, st:
|
|||
}
|
||||
# a pipeline the driver refused is remembered as 0 too: retried on every draw, each try built its
|
||||
# key and its create structs again and gave none of them back
|
||||
return gvk_pipe_build(render3d_st, p, m, st, n_color, color_fmt, depth_fmt, samples, layout, state, bias, pass)
|
||||
}
|
||||
# The one place the pipeline cache grows: once per variant the game draws (program, vertex layout,
|
||||
# render state, formats), kept for the program's life - the fence's declared warm-up (plan 25.2)
|
||||
function gvk_pipe_build(render3d_st: mut Render3dState, p: int, m: Mesh, st: GvkState, n_color: int, color_fmt: int, depth_fmt: int, samples: int, layout: int, state: int, bias: int, pass: int) -> long {
|
||||
let pipe = gvk_pipeline(render3d_st, p, m, st, n_color, color_fmt, depth_fmt, samples)
|
||||
push(render3d_st.gvk_pc_prog, p); push(render3d_st.gvk_pc_layout, layout); push(render3d_st.gvk_pc_state, state)
|
||||
push(render3d_st.gvk_pc_bias, bias); push(render3d_st.gvk_pc_pass, pass); push(render3d_st.gvk_pc_pipe, pipe)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue