diff options
author | Brian <brian@yutani.localnet.net> | 2007-04-16 10:36:28 -0600 |
---|---|---|
committer | Brian <brian@yutani.localnet.net> | 2007-04-16 10:36:28 -0600 |
commit | 64e8088667d000a70beff93e8c300ac0bd261a60 (patch) | |
tree | e7433aabf469052dfc47d1daf2c537e4c550bd2d | |
parent | 3dfcd48469b63c601010ea43e0d5e9ea1dc5dfab (diff) |
Use generic program limits instead of NV-specific ones to init program constants.
Previously, this limited us to 12 temp regs for vertex programs. Many vertex
shaders could exceed that. This forces us to stop using t_vb_arbprogram.c
for now because of its particular register indexing scheme. Need to increase
bits allocated for register indexing, etc.
-rw-r--r-- | src/mesa/main/context.c | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_arbprogram.c | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 2041d26299..93442b91aa 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -805,10 +805,10 @@ _mesa_init_constants(GLcontext *ctx) ctx->Const.VertexProgram.MaxTexInstructions = 0; ctx->Const.VertexProgram.MaxTexIndirections = 0; ctx->Const.VertexProgram.MaxAttribs = MAX_NV_VERTEX_PROGRAM_INPUTS; - ctx->Const.VertexProgram.MaxTemps = MAX_NV_VERTEX_PROGRAM_TEMPS; + ctx->Const.VertexProgram.MaxTemps = MAX_PROGRAM_TEMPS; ctx->Const.VertexProgram.MaxParameters = MAX_NV_VERTEX_PROGRAM_PARAMS; ctx->Const.VertexProgram.MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS; - ctx->Const.VertexProgram.MaxEnvParams = MAX_NV_VERTEX_PROGRAM_PARAMS; + ctx->Const.VertexProgram.MaxEnvParams = MAX_PROGRAM_ENV_PARAMS; ctx->Const.VertexProgram.MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS; ctx->Const.VertexProgram.MaxUniformComponents = 4 * MAX_UNIFORMS; init_natives(&ctx->Const.VertexProgram); @@ -820,10 +820,10 @@ _mesa_init_constants(GLcontext *ctx) ctx->Const.FragmentProgram.MaxTexInstructions = MAX_FRAGMENT_PROGRAM_TEX_INSTRUCTIONS; ctx->Const.FragmentProgram.MaxTexIndirections = MAX_FRAGMENT_PROGRAM_TEX_INDIRECTIONS; ctx->Const.FragmentProgram.MaxAttribs = MAX_NV_FRAGMENT_PROGRAM_INPUTS; - ctx->Const.FragmentProgram.MaxTemps = MAX_NV_FRAGMENT_PROGRAM_TEMPS; + ctx->Const.FragmentProgram.MaxTemps = MAX_PROGRAM_TEMPS; ctx->Const.FragmentProgram.MaxParameters = MAX_NV_FRAGMENT_PROGRAM_PARAMS; ctx->Const.FragmentProgram.MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS; - ctx->Const.FragmentProgram.MaxEnvParams = MAX_NV_FRAGMENT_PROGRAM_PARAMS; + ctx->Const.FragmentProgram.MaxEnvParams = MAX_PROGRAM_ENV_PARAMS; ctx->Const.FragmentProgram.MaxAddressRegs = MAX_FRAGMENT_PROGRAM_ADDRESS_REGS; ctx->Const.FragmentProgram.MaxUniformComponents = 4 * MAX_UNIFORMS; init_natives(&ctx->Const.FragmentProgram); diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c index 2edb1c5ac4..58c82cf715 100644 --- a/src/mesa/tnl/t_vb_arbprogram.c +++ b/src/mesa/tnl/t_vb_arbprogram.c @@ -1477,8 +1477,11 @@ validate_vertex_program( GLcontext *ctx, struct tnl_pipeline_stage *stage ) struct arb_vp_machine *m = ARB_VP_MACHINE(stage); struct gl_vertex_program *program = ctx->VertexProgram._Current; + /* don't use this module since it only handles 12 temp regs */ + /* Need to allocate more bits for register indexes, etc. */ +#define FORCE_OLD 1 #if FORCE_OLD - if (0 &&program) { + if (0) { #else if (program) { #endif |