From 98c791b543c4ba86b8bb54488bd872b33b10b1aa Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Fri, 2 Jun 2006 22:47:31 +0000 Subject: implement arb_vertex_program in hw for r200. Code contains still some hacks, generic attribs cause a fallback, but otherwise it seems to work quite well. Passes all glean vertProg1 tests with the exception of the degnerated LIT case (which is a hw limitation), as well as runs the r200 render path of doom3/quake4 (1.1 patch needed for quake4). The code is heavily borrowed from the r300 driver as vertex programs encoding is almost identical. arb_vertex_program is not yet announced by default and still needs to be enabled via driconf. --- src/mesa/drivers/dri/r200/r200_context.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/r200/r200_context.c') diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 24f0ea5510..3e41d86314 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -62,6 +62,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "r200_tcl.h" #include "r200_vtxfmt.h" #include "r200_maos.h" +#include "r200_vertprog.h" #define need_GL_ARB_multisample #define need_GL_ARB_texture_compression @@ -76,7 +77,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define need_GL_NV_vertex_program #include "extension_helper.h" -#define DRIVER_DATE "20060327" +#define DRIVER_DATE "20060602" #include "vblank.h" #include "utils.h" @@ -310,6 +311,7 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual, r200InitIoctlFuncs(&functions); r200InitStateFuncs(&functions); r200InitTextureFuncs(&functions); + r200InitShaderFuncs(&functions); /* Allocate and initialize the Mesa context */ if (sharedContextPrivate) @@ -417,6 +419,12 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual, ctx->Const.MaxLineWidthAA = 10.0; ctx->Const.LineWidthGranularity = 0.0625; + ctx->Const.VertexProgram.MaxNativeInstructions = R200_VSF_MAX_INST; + ctx->Const.VertexProgram.MaxNativeAttribs = 12; + ctx->Const.VertexProgram.MaxNativeTemps = R200_VSF_MAX_TEMPS; + ctx->Const.VertexProgram.MaxNativeParameters = R200_VSF_MAX_PARAM; + ctx->Const.VertexProgram.MaxNativeAddressRegs = 1; + /* Initialize the software rasterizer and helper modules. */ _swrast_CreateContext( ctx ); -- cgit v1.2.3