aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/api_exec.c6
-rw-r--r--src/mesa/main/context.c4
-rw-r--r--src/mesa/main/extensions.c10
-rw-r--r--src/mesa/main/fbobject.c2
-rw-r--r--src/mesa/main/getstring.c2
-rw-r--r--src/mesa/main/mfeatures.h3
-rw-r--r--src/mesa/main/shaderapi.c16
-rw-r--r--src/mesa/main/shaderobj.c2
-rw-r--r--src/mesa/main/shared.c4
-rw-r--r--src/mesa/program/program.c6
10 files changed, 1 insertions, 54 deletions
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index e589701b32a..546273b989e 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -96,10 +96,8 @@
#if FEATURE_NV_vertex_program || FEATURE_NV_fragment_program
#include "nvprogram.h"
#endif
-#if FEATURE_ARB_shader_objects
#include "shaderapi.h"
#include "uniforms.h"
-#endif
#include "syncobj.h"
#include "main/dispatch.h"
@@ -371,10 +369,8 @@ _mesa_create_exec_table(struct gl_context *ctx)
SET_StencilMaskSeparate(exec, _mesa_StencilMaskSeparate);
SET_StencilOpSeparate(exec, _mesa_StencilOpSeparate);
-#if FEATURE_ARB_shader_objects
_mesa_init_shader_dispatch(exec);
_mesa_init_shader_uniform_dispatch(exec);
-#endif
/* 2. GL_EXT_blend_color */
#if 0
@@ -833,12 +829,10 @@ _mesa_create_exec_table(struct gl_context *ctx)
}
#endif
-#if FEATURE_ARB_geometry_shader4
if (ctx->API != API_OPENGLES2) {
SET_FramebufferTextureARB(exec, _mesa_FramebufferTextureARB);
SET_FramebufferTextureFaceARB(exec, _mesa_FramebufferTextureFaceARB);
}
-#endif
if (ctx->API != API_OPENGLES2) {
SET_ClampColorARB(exec, _mesa_ClampColorARB);
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 3caaf5f4101..1ec6c8e8773 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -605,9 +605,7 @@ _mesa_init_constants(struct gl_context *ctx)
#if FEATURE_ARB_fragment_program
init_program_limits(ctx, GL_FRAGMENT_PROGRAM_ARB, &ctx->Const.FragmentProgram);
#endif
-#if FEATURE_ARB_geometry_shader4
init_program_limits(ctx, MESA_GEOMETRY_PROGRAM, &ctx->Const.GeometryProgram);
-#endif
ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES;
ctx->Const.MaxProgramMatrixStackDepth = MAX_PROGRAM_MATRIX_STACK_DEPTH;
@@ -625,13 +623,11 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxVarying = MAX_VARYING;
-#if FEATURE_ARB_geometry_shader4
ctx->Const.MaxGeometryTextureImageUnits = MAX_GEOMETRY_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxVertexVaryingComponents = MAX_VERTEX_VARYING_COMPONENTS;
ctx->Const.MaxGeometryVaryingComponents = MAX_GEOMETRY_VARYING_COMPONENTS;
ctx->Const.MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES;
ctx->Const.MaxGeometryTotalOutputComponents = MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS;
-#endif
/* Shading language version */
if (_mesa_is_desktop_gl(ctx)) {
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 39f6630e4df..7d50167093c 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -405,8 +405,8 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
#if FEATURE_ARB_framebuffer_object
ctx->Extensions.ARB_framebuffer_object = GL_TRUE;
#endif
-#if FEATURE_ARB_geometry_shader4 && 0
/* XXX re-enable when GLSL compiler again supports geometry shaders */
+#if 0
ctx->Extensions.ARB_geometry_shader4 = GL_TRUE;
#endif
ctx->Extensions.ARB_half_float_pixel = GL_TRUE;
@@ -415,13 +415,9 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.ARB_occlusion_query = GL_TRUE;
ctx->Extensions.ARB_occlusion_query2 = GL_TRUE;
ctx->Extensions.ARB_point_sprite = GL_TRUE;
-#if FEATURE_ARB_shader_objects
ctx->Extensions.ARB_shader_objects = GL_TRUE;
ctx->Extensions.EXT_separate_shader_objects = GL_TRUE;
-#endif
-#if FEATURE_ARB_shading_language_100
ctx->Extensions.ARB_shading_language_100 = GL_TRUE;
-#endif
ctx->Extensions.ARB_shadow = GL_TRUE;
ctx->Extensions.ARB_texture_border_clamp = GL_TRUE;
ctx->Extensions.ARB_texture_cube_map = GL_TRUE;
@@ -583,12 +579,8 @@ _mesa_enable_2_0_extensions(struct gl_context *ctx)
ctx->Extensions.ARB_point_sprite = GL_TRUE;
ctx->Extensions.EXT_blend_equation_separate = GL_TRUE;
ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
-#if FEATURE_ARB_shader_objects
ctx->Extensions.ARB_shader_objects = GL_TRUE;
-#endif
-#if FEATURE_ARB_shading_language_100
ctx->Extensions.ARB_shading_language_100 = GL_TRUE;
-#endif
ctx->Extensions.EXT_stencil_two_side = GL_TRUE;
ctx->Extensions.ARB_vertex_shader = GL_TRUE;
}
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index abc9d83a648..be65e6bc6b7 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -3065,7 +3065,6 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
#endif /* FEATURE_EXT_framebuffer_blit */
-#if FEATURE_ARB_geometry_shader4
void GLAPIENTRY
_mesa_FramebufferTextureARB(GLenum target, GLenum attachment,
GLuint texture, GLint level)
@@ -3086,7 +3085,6 @@ _mesa_FramebufferTextureFaceARB(GLenum target, GLenum attachment,
"glFramebufferTextureFaceARB "
"not implemented!");
}
-#endif /* FEATURE_ARB_geometry_shader4 */
static void
invalidate_framebuffer_storage(GLenum target, GLsizei numAttachments,
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index e8a5930dd6c..24210c34bd8 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -131,12 +131,10 @@ _mesa_GetString( GLenum name )
return (const GLubyte *) 0;
}
return (const GLubyte *) ctx->Extensions.String;
-#if FEATURE_ARB_shading_language_100 || FEATURE_ES2
case GL_SHADING_LANGUAGE_VERSION:
if (ctx->API == API_OPENGLES)
break;
return shading_language_version(ctx);
-#endif
#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program || \
FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program
case GL_PROGRAM_ERROR_STRING_NV:
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index d9ec213101e..e0a40a629fd 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -86,9 +86,6 @@
#define FEATURE_ARB_fragment_program 1
#define FEATURE_ARB_vertex_program 1
-#define FEATURE_ARB_shader_objects 1
-#define FEATURE_ARB_shading_language_100 FEATURE_ARB_shader_objects
-#define FEATURE_ARB_geometry_shader4 FEATURE_ARB_shader_objects
#define FEATURE_ARB_framebuffer_object (FEATURE_GL && FEATURE_EXT_framebuffer_object)
#define FEATURE_ARB_map_buffer_range FEATURE_GL
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 393f5efc2c1..4ce02e6bf55 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -171,10 +171,8 @@ validate_shader_target(const struct gl_context *ctx, GLenum type)
return ctx->Extensions.ARB_fragment_shader;
case GL_VERTEX_SHADER:
return ctx->Extensions.ARB_vertex_shader;
-#if FEATURE_ARB_geometry_shader4
case GL_GEOMETRY_SHADER_ARB:
return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_geometry_shader4;
-#endif
default:
return false;
}
@@ -478,12 +476,10 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param
|| _mesa_is_gles3(ctx);
#endif
-#if FEATURE_ARB_geometry_shader4
/* Are geometry shaders available in this context?
*/
const bool has_gs =
_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_geometry_shader4;
-#endif
/* Are uniform buffer objects available in this context?
*/
@@ -555,7 +551,6 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param
*params = shProg->TransformFeedback.BufferMode;
return;
#endif
-#if FEATURE_ARB_geometry_shader4
case GL_GEOMETRY_VERTICES_OUT_ARB:
if (!has_gs)
break;
@@ -571,7 +566,6 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param
break;
*params = shProg->Geom.OutputType;
return;
-#endif
case GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH: {
unsigned i;
GLint max_len = 0;
@@ -863,7 +857,6 @@ use_shader_program(struct gl_context *ctx, GLenum type,
shProg = NULL;
}
break;
-#if FEATURE_ARB_geometry_shader4
case GL_GEOMETRY_SHADER_ARB:
target = &ctx->Shader.CurrentGeometryProgram;
if ((shProg == NULL)
@@ -871,7 +864,6 @@ use_shader_program(struct gl_context *ctx, GLenum type,
shProg = NULL;
}
break;
-#endif
case GL_FRAGMENT_SHADER:
target = &ctx->Shader.CurrentFragmentProgram;
if ((shProg == NULL)
@@ -894,11 +886,9 @@ use_shader_program(struct gl_context *ctx, GLenum type,
case GL_VERTEX_SHADER:
/* Empty for now. */
break;
-#if FEATURE_ARB_geometry_shader4
case GL_GEOMETRY_SHADER_ARB:
/* Empty for now. */
break;
-#endif
case GL_FRAGMENT_SHADER:
if (*target == ctx->Shader._CurrentFragmentProgram) {
_mesa_reference_shader_program(ctx,
@@ -1521,8 +1511,6 @@ _mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat,
#endif /* FEATURE_ES2 */
-#if FEATURE_ARB_geometry_shader4
-
void GLAPIENTRY
_mesa_ProgramParameteriARB(GLuint program, GLenum pname, GLint value)
{
@@ -1584,8 +1572,6 @@ _mesa_ProgramParameteriARB(GLuint program, GLenum pname, GLint value)
}
}
-#endif
-
void
_mesa_use_shader_program(struct gl_context *ctx, GLenum type,
struct gl_shader_program *shProg)
@@ -1745,9 +1731,7 @@ _mesa_init_shader_dispatch(struct _glapi_table *exec)
SET_GetActiveAttribARB(exec, _mesa_GetActiveAttribARB);
SET_GetAttribLocationARB(exec, _mesa_GetAttribLocationARB);
-#if FEATURE_ARB_geometry_shader4
SET_ProgramParameteriARB(exec, _mesa_ProgramParameteriARB);
-#endif
SET_UseShaderProgramEXT(exec, _mesa_UseShaderProgramEXT);
SET_ActiveProgramEXT(exec, _mesa_ActiveProgramEXT);
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index c7f45c88e72..1706cac55ff 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -243,11 +243,9 @@ _mesa_init_shader_program(struct gl_context *ctx, struct gl_shader_program *prog
prog->FragDataBindings = string_to_uint_map_ctor();
prog->FragDataIndexBindings = string_to_uint_map_ctor();
-#if FEATURE_ARB_geometry_shader4
prog->Geom.VerticesOut = 0;
prog->Geom.InputType = GL_TRIANGLES;
prog->Geom.OutputType = GL_TRIANGLE_STRIP;
-#endif
prog->InfoLog = ralloc_strdup(prog, "");
}
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index 58cbc525065..f8d66455a4e 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -87,9 +87,7 @@ _mesa_alloc_shared_state(struct gl_context *ctx)
shared->DefaultFragmentShader = _mesa_new_ati_fragment_shader(ctx, 0);
#endif
-#if FEATURE_ARB_shader_objects
shared->ShaderObjects = _mesa_NewHashTable();
-#endif
shared->BufferObjects = _mesa_NewHashTable();
@@ -321,11 +319,9 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared)
_mesa_HashDeleteAll(shared->DisplayList, delete_displaylist_cb, ctx);
_mesa_DeleteHashTable(shared->DisplayList);
-#if FEATURE_ARB_shader_objects
_mesa_HashWalk(shared->ShaderObjects, free_shader_program_data_cb, ctx);
_mesa_HashDeleteAll(shared->ShaderObjects, delete_shader_cb, ctx);
_mesa_DeleteHashTable(shared->ShaderObjects);
-#endif
_mesa_HashDeleteAll(shared->Programs, delete_program_cb, ctx);
_mesa_DeleteHashTable(shared->Programs);
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index 7d827b78b5b..939f3f89aaf 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -106,13 +106,11 @@ _mesa_init_program(struct gl_context *ctx)
ctx->FragmentProgram.Cache = _mesa_new_program_cache();
#endif
-#if FEATURE_ARB_geometry_shader4
ctx->GeometryProgram.Enabled = GL_FALSE;
/* right now by default we don't have a geometry program */
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current,
NULL);
ctx->GeometryProgram.Cache = _mesa_new_program_cache();
-#endif
/* XXX probably move this stuff */
#if FEATURE_ATI_fragment_shader
@@ -138,10 +136,8 @@ _mesa_free_program_data(struct gl_context *ctx)
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL);
_mesa_delete_shader_cache(ctx, ctx->FragmentProgram.Cache);
#endif
-#if FEATURE_ARB_geometry_shader4
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current, NULL);
_mesa_delete_program_cache(ctx, ctx->GeometryProgram.Cache);
-#endif
/* XXX probably move this stuff */
#if FEATURE_ATI_fragment_shader
if (ctx->ATIFragmentShader.Current) {
@@ -175,10 +171,8 @@ _mesa_update_default_objects_program(struct gl_context *ctx)
assert(ctx->FragmentProgram.Current);
#endif
-#if FEATURE_ARB_geometry_shader4
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current,
ctx->Shared->DefaultGeometryProgram);
-#endif
/* XXX probably move this stuff */
#if FEATURE_ATI_fragment_shader