summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arbprogram.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-01-16 16:20:38 -0800
committerEric Anholt <[email protected]>2013-01-21 21:26:47 -0800
commita9754793dab4b24c09cae21c29f902ce0e53319a (patch)
treee8bba535d85fecc8f1608c40d24e1e26da73520e /src/mesa/main/arbprogram.c
parentc572251417ef20d1d560b849931321a42b1be578 (diff)
mesa: Drop manual checks for outside begin/end.
We now have a separate dispatch table for begin/end that prevent these functions from being entered during that time. The ASSERT_OUTSIDE_BEGIN_END_WITH_RETVALs are left because I don't want to change any return values or introduce new error-only stubs at this point. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/arbprogram.c')
-rw-r--r--src/mesa/main/arbprogram.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/mesa/main/arbprogram.c b/src/mesa/main/arbprogram.c
index 8150b5f4ec1..5730ea49586 100644
--- a/src/mesa/main/arbprogram.c
+++ b/src/mesa/main/arbprogram.c
@@ -50,7 +50,6 @@ _mesa_BindProgramARB(GLenum target, GLuint id)
{
struct gl_program *curProg, *newProg;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
/* Error-check target and get curProg */
if (target == GL_VERTEX_PROGRAM_ARB && ctx->Extensions.ARB_vertex_program) {
@@ -136,7 +135,8 @@ _mesa_DeleteProgramsARB(GLsizei n, const GLuint *ids)
{
GLint i;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_VERTICES(ctx, 0);
if (n < 0) {
_mesa_error( ctx, GL_INVALID_VALUE, "glDeleteProgramsNV" );
@@ -190,7 +190,6 @@ _mesa_GenProgramsARB(GLsizei n, GLuint *ids)
GLuint first;
GLuint i;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (n < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGenPrograms");
@@ -304,7 +303,6 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
{
struct gl_program *base;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
@@ -385,7 +383,6 @@ _mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index,
GLfloat *param;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
@@ -408,7 +405,6 @@ _mesa_ProgramEnvParameter4fvARB(GLenum target, GLuint index,
GLfloat *param;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
@@ -425,7 +421,6 @@ _mesa_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
{
GET_CURRENT_CONTEXT(ctx);
GLfloat * dest;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
@@ -480,8 +475,6 @@ _mesa_GetProgramEnvParameterfvARB(GLenum target, GLuint index,
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (get_env_param_pointer(ctx, "glGetProgramEnvParameterfv",
target, index, &param)) {
COPY_4V(params, param);
@@ -495,7 +488,6 @@ _mesa_ProgramLocalParameter4fARB(GLenum target, GLuint index,
{
GET_CURRENT_CONTEXT(ctx);
GLfloat *param;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
@@ -522,7 +514,6 @@ _mesa_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
{
GET_CURRENT_CONTEXT(ctx);
GLfloat *dest;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
@@ -581,7 +572,6 @@ _mesa_GetProgramLocalParameterfvARB(GLenum target, GLuint index,
{
GLfloat *param;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (get_local_param_pointer(ctx, "glProgramLocalParameters4fvEXT",
target, index, &param)) {
@@ -596,7 +586,6 @@ _mesa_GetProgramLocalParameterdvARB(GLenum target, GLuint index,
{
GLfloat *param;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
if (get_local_param_pointer(ctx, "glProgramLocalParameters4fvEXT",
target, index, &param)) {
@@ -612,8 +601,6 @@ _mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params)
struct gl_program *prog;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (target == GL_VERTEX_PROGRAM_ARB
&& ctx->Extensions.ARB_vertex_program) {
prog = &(ctx->VertexProgram.Current->Base);
@@ -796,8 +783,6 @@ _mesa_GetProgramStringARB(GLenum target, GLenum pname, GLvoid *string)
char *dst = (char *) string;
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
if (target == GL_VERTEX_PROGRAM_ARB) {
prog = &(ctx->VertexProgram.Current->Base);
}