From 8e2badfc269082f4b52a82ac1c5b4350bef0d01b Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Sun, 5 Sep 2010 05:42:59 +0200 Subject: nvfx: add rewritten swtnl support The old swtnl code was broken by the new shader linkage support for GLSL. This is a rewrite of swtnl support, which should instead work properly, be faster and more closer to the much more tested hardware pipeline. --- src/gallium/drivers/nvfx/nvfx_context.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/gallium/drivers/nvfx/nvfx_context.h') diff --git a/src/gallium/drivers/nvfx/nvfx_context.h b/src/gallium/drivers/nvfx/nvfx_context.h index b837437c58..369c216388 100644 --- a/src/gallium/drivers/nvfx/nvfx_context.h +++ b/src/gallium/drivers/nvfx/nvfx_context.h @@ -151,14 +151,6 @@ struct nvfx_context { /* HW state derived from pipe states */ struct nvfx_state state; - struct { - struct nvfx_vertex_program *vertprog; - - unsigned nr_attribs; - unsigned hw[PIPE_MAX_SHADER_INPUTS]; - unsigned draw[PIPE_MAX_SHADER_INPUTS]; - unsigned emit[PIPE_MAX_SHADER_INPUTS]; - } swtnl; enum { HW, SWTNL, SWRAST @@ -170,7 +162,7 @@ struct nvfx_context { struct pipe_scissor_state scissor; unsigned stipple[32]; struct pipe_clip_state clip; - struct nvfx_vertex_program *vertprog; + struct nvfx_pipe_vertex_program *vertprog; struct nvfx_pipe_fragment_program *fragprog; struct pipe_resource *constbuf[PIPE_SHADER_TYPES]; unsigned constbuf_nr[PIPE_SHADER_TYPES]; @@ -208,6 +200,7 @@ struct nvfx_context { int hw_pointsprite_control; int hw_vp_output; struct nvfx_fragment_program* hw_fragprog; + struct nvfx_vertex_program* hw_vertprog; unsigned relocs_needed; }; @@ -326,6 +319,7 @@ extern void nvfx_init_transfer_functions(struct pipe_context *pipe); /* nvfx_vbo.c */ extern boolean nvfx_vbo_validate(struct nvfx_context *nvfx); +extern void nvfx_vbo_swtnl_validate(struct nvfx_context *nvfx); extern void nvfx_vbo_relocate(struct nvfx_context *nvfx); extern void nvfx_idxbuf_validate(struct nvfx_context* nvfx); extern void nvfx_idxbuf_relocate(struct nvfx_context* nvfx); -- cgit v1.2.3