Draw lines as wide as the game sets them.

The game's line width was dropped at the call and every line drawn 1 pixel wide; the game draws two lines a frame at 4.5 pixels into a 144x144 mask. The width is now recorded with the draw state and set as dynamic state for draws of the line topology class, held to the device's range. Only pipelines of that class list the new dynamic state, so the others keep their entries in the pipeline caches and the driver's. line_width = 0 draws every line 1 pixel wide as before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-12 09:31:04 -05:00
parent 322d7c0933
commit bd7d140a54
10 changed files with 75 additions and 14 deletions

View File

@@ -902,6 +902,13 @@ NVN_API(nvnCommandBufferSetPointSize) {
r->kind = 6;
memcpy(r->bytes, &s, sizeof s);
}
// void nvnCommandBufferSetLineWidth(NVNcommandBuffer *cmd, float width): bind-state kind 7, as the point size
NVN_API(nvnCommandBufferSetLineWidth) {
p_bind_state *r = REC(cmd_of(c), OP_BIND_STATE, p_bind_state);
float w = arg_s(c, 0);
r->kind = 7;
memcpy(r->bytes, &w, sizeof w);
}
// void nvnCommandBufferBindVertexAttribState(NVNcommandBuffer *cmd, int n, const NVNvertexAttribState *states)
NVN_API(nvnCommandBufferBindVertexAttribState) {
cmd_t *o = cmd_of(c);