mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 17:29:57 -04:00
Read ahead for mesh draws too, and let a mesh draw wait for its fast link like a vertex draw.
The look-ahead of a submission passed over mesh draws, as their pipelines had no stage libraries. Where they have them now, a mesh draw the scan reaches is looked up with its mesh and task stages and its state is named to the pipeline hints, so the library of its task and mesh stages, the one that takes longest to make, is building before the replay gets to the draw. Never with the mesh fallback, which draws through vertex pipelines of its own. A mesh draw that waits for a fast link was cut off once its pipeline had been building for 8 ms, since no link could come. That rule now holds only for a mesh pipeline without stage libraries: with them the draw waits as a vertex draw does, the few milliseconds of pipe_link_draw_ms from its pipeline's first miss. A one-shot mesh draw keeps its 8 ms: when the caches lack the task and mesh library, making it is as long a compile as the whole pipeline was, and the frame's wait pool is not spent on that. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -1543,9 +1543,10 @@ static void evo_resume(VkExec *ex) {
|
||||
// a shader not in memory is queued for its disk read or translation by the lookup itself. The draws then find their
|
||||
// libraries built, or building on several workers at once.
|
||||
// What the scan does not follow: the op stream past a wait for another queue's signal (what follows may be held), a
|
||||
// change of the texture pool, mesh draws (their pipelines have no libraries), and whatever would take it past
|
||||
// AHEAD_NS. Render targets are read from their descriptors (format, view format, sample count), which is what the
|
||||
// replay resolves them to unless a target is left out; a guess that misses costs two libraries at most.
|
||||
// change of the texture pool, mesh draws where their pipelines have no stage libraries (vk_pipeline_mesh_libs), and
|
||||
// whatever would take it past AHEAD_NS. Render targets are read from their descriptors (format, view format, sample
|
||||
// count), which is what the replay resolves them to unless a target is left out; a guess that misses costs two
|
||||
// libraries at most.
|
||||
#define AHEAD_NS 3000000ull
|
||||
#define AHEAD_OPS 400000u
|
||||
static struct {
|
||||
@@ -1621,7 +1622,7 @@ void vk_exec_ahead(VkExec *ex) {
|
||||
case OP_DEPTH_CLAMP: sx.pipe.depth_clamp = ((const p_flag *)a)->value != 0; break;
|
||||
case OP_RASTER_DISCARD: sx.pipe.raster_discard = ((const p_flag *)a)->value != 0; break;
|
||||
case OP_BIND_PROGRAM: case OP_BIND_STATE: case OP_BIND_VATTR: case OP_BIND_VSTREAM: case OP_BIND_TEX: case OP_BIND_IMG:
|
||||
case OP_DRAW: case OP_DRAW_IDX: case OP_DRAW_IDX_IND:
|
||||
case OP_DRAW: case OP_DRAW_IDX: case OP_DRAW_IDX_IND: case OP_DRAW_MESH: case OP_DRAW_MESH_IND:
|
||||
vk_exec_ahead_op(&sx, h->op, a);
|
||||
break;
|
||||
default: break;
|
||||
|
||||
Reference in New Issue
Block a user