summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_arbprogram.c
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2006-02-13 11:23:36 +0000
committerMichal Krol <[email protected]>2006-02-13 11:23:36 +0000
commita2ea606377ed5679dc513eabcf2d398216b47d61 (patch)
treebd50c1ae07d521b8b1aada83973f81faa291f697 /src/mesa/tnl/t_vb_arbprogram.c
parent2363fff347a064b9584ecb8e26d80d421cafbbbd (diff)
Add ARB_vertex_shader stage just before render stage.
If enabled, all other stages, except render, are disabled.
Diffstat (limited to 'src/mesa/tnl/t_vb_arbprogram.c')
-rw-r--r--src/mesa/tnl/t_vb_arbprogram.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c
index 121fc2ec1ec..3206892d5be 100644
--- a/src/mesa/tnl/t_vb_arbprogram.c
+++ b/src/mesa/tnl/t_vb_arbprogram.c
@@ -1257,15 +1257,17 @@ static INLINE void call_func( struct tnl_compiled_program *p,
static GLboolean
run_arb_vertex_program(GLcontext *ctx, struct tnl_pipeline_stage *stage)
{
- struct vertex_program *program = (ctx->VertexProgram._Enabled ?
- ctx->VertexProgram.Current :
- ctx->_TnlProgram);
+ struct vertex_program *program;
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
struct arb_vp_machine *m = ARB_VP_MACHINE(stage);
struct tnl_compiled_program *p;
GLuint i, j;
GLbitfield outputs;
+ if (ctx->ShaderObjects.CurrentProgram != NULL)
+ return GL_TRUE;
+
+ program = (ctx->VertexProgram._Enabled ? ctx->VertexProgram.Current : ctx->_TnlProgram);
if (!program || program->IsNVProgram)
return GL_TRUE;
@@ -1408,9 +1410,12 @@ static void
validate_vertex_program( GLcontext *ctx, struct tnl_pipeline_stage *stage )
{
struct arb_vp_machine *m = ARB_VP_MACHINE(stage);
- struct vertex_program *program =
- (ctx->VertexProgram._Enabled ? ctx->VertexProgram.Current : 0);
+ struct vertex_program *program;
+
+ if (ctx->ShaderObjects.CurrentProgram != NULL)
+ return;
+ program = (ctx->VertexProgram._Enabled ? ctx->VertexProgram.Current : 0);
if (!program && ctx->_MaintainTnlProgram) {
program = ctx->_TnlProgram;
}