GLfloat _ModelViewInvScale;
GLboolean _NeedEyeCoords;
GLboolean _ForceEyeCoords;
- GLenum _CurrentProgram; /**< currently executing program */
GLuint TextureStateTimestamp; /**< detect changes to shared state */
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
- if (!ctx->_CurrentProgram)
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
if (target == GL_FRAGMENT_PROGRAM_ARB
&& ctx->Extensions.ARB_fragment_program) {
struct gl_program *prog;
GET_CURRENT_CONTEXT(ctx);
- if (!ctx->_CurrentProgram)
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
if (target == GL_VERTEX_PROGRAM_ARB
&& ctx->Extensions.ARB_vertex_program) {
char *dst = (char *) string;
GET_CURRENT_CONTEXT(ctx);
- if (!ctx->_CurrentProgram)
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
if (target == GL_VERTEX_PROGRAM_ARB) {
prog = &(ctx->VertexProgram.Current->Base);
struct gl_program *prog;
GET_CURRENT_CONTEXT(ctx);
- if (!ctx->_CurrentProgram)
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
prog = _mesa_lookup_program(ctx, id);
if (!prog) {
struct gl_program *prog;
GET_CURRENT_CONTEXT(ctx);
- if (!ctx->_CurrentProgram)
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
if (pname != GL_PROGRAM_STRING_NV) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramStringNV(pname)");
GET_CURRENT_CONTEXT(ctx);
- if (!ctx->_CurrentProgram)
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
prog = _mesa_lookup_program(ctx, id);
if (!prog || prog->Target != GL_FRAGMENT_PROGRAM_NV) {
/* incoming colors should be floats */
ASSERT(span->array->ChanType == GL_FLOAT);
- ctx->_CurrentProgram = GL_FRAGMENT_SHADER_ATI;
-
for (i = 0; i < span->end; i++) {
if (span->array->mask[i]) {
init_machine(ctx, &machine, shader, span, i);
}
}
}
-
- ctx->_CurrentProgram = 0;
}
ASSERT(span->array->ChanType == GL_FLOAT);
}
- ctx->_CurrentProgram = GL_FRAGMENT_PROGRAM_ARB; /* or NV, doesn't matter */
-
run_program(ctx, span, 0, span->end);
if (program->Base.OutputsWritten & (1 << FRAG_RESULT_COLOR)) {
span->interpMask &= ~SPAN_Z;
span->arrayMask |= SPAN_Z;
}
-
- ctx->_CurrentProgram = 0;
}