#include "accum.h"
#include "api_loopback.h"
#include "api_exec.h"
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
#include "arbprogram.h"
-#endif
#include "atifragshader.h"
#include "attrib.h"
#include "blend.h"
/* ARB 26. GL_ARB_vertex_program */
/* ARB 27. GL_ARB_fragment_program */
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
/* glVertexAttrib1sARB aliases glVertexAttrib1sNV */
/* glVertexAttrib1fARB aliases glVertexAttrib1fNV */
/* glVertexAttrib1dARB aliases glVertexAttrib1dNV */
SET_GetProgramStringARB(exec, _mesa_GetProgramStringARB);
}
SET_GetProgramivARB(exec, _mesa_GetProgramivARB);
-#endif
/* ARB 28. GL_ARB_vertex_buffer_object */
_mesa_init_bufferobj_dispatch(ctx, exec);
#endif
/* GL_EXT_gpu_program_parameters */
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
if (ctx->API == API_OPENGL) {
SET_ProgramEnvParameters4fvEXT(exec, _mesa_ProgramEnvParameters4fvEXT);
SET_ProgramLocalParameters4fvEXT(exec, _mesa_ProgramLocalParameters4fvEXT);
}
-#endif
/* GL_MESA_texture_array / GL_EXT_texture_array */
if (ctx->API != API_OPENGLES2) {
ctx->Const.MaxUniformBlockSize = 16384;
ctx->Const.UniformBufferOffsetAlignment = 1;
-#if FEATURE_ARB_vertex_program
init_program_limits(ctx, GL_VERTEX_PROGRAM_ARB, &ctx->Const.VertexProgram);
-#endif
-#if FEATURE_ARB_fragment_program
init_program_limits(ctx, GL_FRAGMENT_PROGRAM_ARB, &ctx->Const.FragmentProgram);
-#endif
init_program_limits(ctx, MESA_GEOMETRY_PROGRAM, &ctx->Const.GeometryProgram);
+
ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES;
ctx->Const.MaxProgramMatrixStackDepth = MAX_PROGRAM_MATRIX_STACK_DEPTH;
#include "texstorage.h"
#include "mtypes.h"
#include "varray.h"
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
#include "arbprogram.h"
-#endif
#include "nvprogram.h"
#if FEATURE_EXT_transform_feedback
#include "transformfeedback.h"
free(n[3].data); /* parameter name */
n += InstSize[n[0].opcode];
break;
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
case OPCODE_PROGRAM_STRING_ARB:
free(n[4].data); /* program string */
n += InstSize[n[0].opcode];
break;
-#endif
case OPCODE_UNIFORM_1FV:
case OPCODE_UNIFORM_2FV:
case OPCODE_UNIFORM_3FV:
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
-
static void GLAPIENTRY
save_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
const GLvoid * string)
}
}
-#endif /* FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program */
-
static void GLAPIENTRY
save_BeginQueryARB(GLenum target, GLuint id)
case OPCODE_DEPTH_BOUNDS_EXT:
CALL_DepthBoundsEXT(ctx->Exec, (n[1].f, n[2].f));
break;
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
case OPCODE_PROGRAM_STRING_ARB:
CALL_ProgramStringARB(ctx->Exec,
(n[1].e, n[2].e, n[3].i, n[4].data));
break;
-#endif
case OPCODE_PROGRAM_ENV_PARAMETER_ARB:
CALL_ProgramEnvParameter4fARB(ctx->Exec, (n[1].e, n[2].ui, n[3].f,
n[4].f, n[5].f,
/* ARB 26. GL_ARB_vertex_program */
/* ARB 27. GL_ARB_fragment_program */
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
/* glVertexAttrib* functions alias the NV ones, handled elsewhere */
SET_VertexAttribPointerARB(table, _mesa_VertexAttribPointerARB);
SET_EnableVertexAttribArrayARB(table, _mesa_EnableVertexAttribArrayARB);
_mesa_GetProgramLocalParameterfvARB);
SET_GetProgramivARB(table, _mesa_GetProgramivARB);
SET_GetProgramStringARB(table, _mesa_GetProgramStringARB);
-#endif
/* ARB 28. GL_ARB_vertex_buffer_object */
/* None of the extension's functions get compiled */
SET_BlendEquationSeparateEXT(table, save_BlendEquationSeparateEXT);
/* GL_EXT_gpu_program_parameters */
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
SET_ProgramEnvParameters4fvEXT(table, save_ProgramEnvParameters4fvEXT);
SET_ProgramLocalParameters4fvEXT(table, save_ProgramLocalParameters4fvEXT);
-#endif
/* ARB 50. GL_ARB_map_buffer_range */
#if FEATURE_ARB_map_buffer_range
}
break;
-#if FEATURE_ARB_fragment_program
case GL_FRAGMENT_PROGRAM_ARB:
if (ctx->API != API_OPENGL)
goto invalid_enum_error;
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
ctx->FragmentProgram.Enabled = state;
break;
-#endif /* FEATURE_ARB_fragment_program */
/* GL_EXT_depth_bounds_test */
case GL_DEPTH_BOUNDS_TEST_EXT:
CHECK_EXTENSION(EXT_stencil_two_side);
return ctx->Stencil.TestTwoSide;
-#if FEATURE_ARB_fragment_program
case GL_FRAGMENT_PROGRAM_ARB:
if (ctx->API != API_OPENGL)
goto invalid_enum_error;
return ctx->FragmentProgram.Enabled;
-#endif /* FEATURE_ARB_fragment_program */
/* GL_EXT_depth_bounds_test */
case GL_DEPTH_BOUNDS_TEST_EXT:
ctx->Extensions.ARB_draw_instanced = GL_TRUE;
ctx->Extensions.ARB_explicit_attrib_location = GL_TRUE;
ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE;
-#if FEATURE_ARB_fragment_program
ctx->Extensions.ARB_fragment_program = GL_TRUE;
ctx->Extensions.ARB_fragment_program_shadow = GL_TRUE;
-#endif
ctx->Extensions.ARB_fragment_shader = GL_TRUE;
#if FEATURE_ARB_framebuffer_object
ctx->Extensions.ARB_framebuffer_object = GL_TRUE;
ctx->Extensions.ARB_texture_rg = GL_TRUE;
ctx->Extensions.ARB_texture_compression_rgtc = GL_TRUE;
ctx->Extensions.ARB_texture_storage = GL_TRUE;
-#if FEATURE_ARB_vertex_program
ctx->Extensions.ARB_vertex_program = GL_TRUE;
-#endif
ctx->Extensions.ARB_vertex_shader = GL_TRUE;
#if FEATURE_ARB_sync
ctx->Extensions.ARB_sync = GL_TRUE;
ctx->Extensions.NV_vertex_program1_1 = GL_TRUE;
ctx->Extensions.NV_fragment_program = GL_TRUE;
ctx->Extensions.NV_fragment_program_option = GL_TRUE;
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
-#endif
_mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1");
if (ctx->Mesa_DXTn) {
_mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
#define FEATURE_remap_table 0
#endif
-#define FEATURE_ARB_fragment_program 1
-#define FEATURE_ARB_vertex_program 1
-
#define FEATURE_ARB_framebuffer_object FEATURE_GL
#define FEATURE_ARB_map_buffer_range FEATURE_GL
#define FEATURE_ARB_pixel_buffer_object FEATURE_GL
shared->TexObjects = _mesa_NewHashTable();
shared->Programs = _mesa_NewHashTable();
-#if FEATURE_ARB_vertex_program
shared->DefaultVertexProgram =
gl_vertex_program(ctx->Driver.NewProgram(ctx,
GL_VERTEX_PROGRAM_ARB, 0));
-#endif
-
-#if FEATURE_ARB_fragment_program
shared->DefaultFragmentProgram =
gl_fragment_program(ctx->Driver.NewProgram(ctx,
GL_FRAGMENT_PROGRAM_ARB, 0));
-#endif
#if FEATURE_ATI_fragment_shader
shared->ATIShaders = _mesa_NewHashTable();
_mesa_HashDeleteAll(shared->Programs, delete_program_cb, ctx);
_mesa_DeleteHashTable(shared->Programs);
-#if FEATURE_ARB_vertex_program
_mesa_reference_vertprog(ctx, &shared->DefaultVertexProgram, NULL);
-#endif
-
-#if FEATURE_ARB_fragment_program
_mesa_reference_fragprog(ctx, &shared->DefaultFragmentProgram, NULL);
-#endif
#if FEATURE_ATI_fragment_shader
_mesa_HashDeleteAll(shared->ATIShaders, delete_fragshader_cb, ctx);
}
-#if FEATURE_ARB_vertex_program
/**
* Set a generic vertex attribute array.
* Note that these arrays DO NOT alias the conventional GL vertex arrays
legalTypes, 1, BGRA_OR_4,
size, type, stride, normalized, GL_FALSE, ptr);
}
-#endif
/**
SET_VertexAttrib3fvNV(tab, vfmt->VertexAttrib3fvNV);
SET_VertexAttrib4fNV(tab, vfmt->VertexAttrib4fNV);
SET_VertexAttrib4fvNV(tab, vfmt->VertexAttrib4fvNV);
-#if FEATURE_ARB_vertex_program
SET_VertexAttrib1fARB(tab, vfmt->VertexAttrib1fARB);
SET_VertexAttrib1fvARB(tab, vfmt->VertexAttrib1fvARB);
SET_VertexAttrib2fARB(tab, vfmt->VertexAttrib2fARB);
SET_VertexAttrib3fvARB(tab, vfmt->VertexAttrib3fvARB);
SET_VertexAttrib4fARB(tab, vfmt->VertexAttrib4fARB);
SET_VertexAttrib4fvARB(tab, vfmt->VertexAttrib4fvARB);
-#endif
/* GL_EXT_gpu_shader4 / OpenGL 3.0 */
SET_VertexAttribI1iEXT(tab, vfmt->VertexAttribI1i);