From fc606f7db9072d4f40081aea8f92f1d4489a5115 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Tue, 24 Oct 2006 22:37:51 +0000 Subject: fix (per-vertex) fog when using ARB_vp by incorporating fog factor computation into the vertex program (not yet fixed for swtnl). Simplify (and correct) the VTX_TCL_OUTPUT_VTXFMT handling when using vertex programs, turns out it's solely driven by the needs of the past-vertex stage of the pipeline, this should fix lockups with ill-specified applications using vertex programs (for instance applications enabling fog but not writing to fog coord output will now get (conformant) undefined results instead of lockups). --- src/mesa/drivers/dri/r200/r200_context.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/r200/r200_context.h') diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h index 0d252eceaf..07b6d6e12d 100644 --- a/src/mesa/drivers/dri/r200/r200_context.h +++ b/src/mesa/drivers/dri/r200/r200_context.h @@ -102,10 +102,14 @@ typedef void (*r200_point_func)( r200ContextPtr, struct r200_vertex_program { struct gl_vertex_program mesa_program; /* Must be first */ int translated; - VERTEX_SHADER_INSTRUCTION instr[R200_VSF_MAX_INST + 3]; + /* need excess instr: 1 for late loop checking, 2 for + additional instr due to instr/attr, 3 for fog */ + VERTEX_SHADER_INSTRUCTION instr[R200_VSF_MAX_INST + 6]; int pos_end; int inputs[VERT_ATTRIB_MAX]; int native; + int fogpidx; + int fogmode; }; struct r200_colorbuffer_state { -- cgit v1.2.3