#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"
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
}
#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);
#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;
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)) {
#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;
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;
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;
}
#endif /* FEATURE_EXT_framebuffer_blit */
-#if FEATURE_ARB_geometry_shader4
void GLAPIENTRY
_mesa_FramebufferTextureARB(GLenum target, GLenum attachment,
GLuint texture, GLint level)
"glFramebufferTextureFaceARB "
"not implemented!");
}
-#endif /* FEATURE_ARB_geometry_shader4 */
static void
invalidate_framebuffer_storage(GLenum target, GLsizei numAttachments,
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:
#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
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;
}
|| _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?
*/
*params = shProg->TransformFeedback.BufferMode;
return;
#endif
-#if FEATURE_ARB_geometry_shader4
case GL_GEOMETRY_VERTICES_OUT_ARB:
if (!has_gs)
break;
break;
*params = shProg->Geom.OutputType;
return;
-#endif
case GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH: {
unsigned i;
GLint max_len = 0;
shProg = NULL;
}
break;
-#if FEATURE_ARB_geometry_shader4
case GL_GEOMETRY_SHADER_ARB:
target = &ctx->Shader.CurrentGeometryProgram;
if ((shProg == NULL)
shProg = NULL;
}
break;
-#endif
case GL_FRAGMENT_SHADER:
target = &ctx->Shader.CurrentFragmentProgram;
if ((shProg == NULL)
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,
#endif /* FEATURE_ES2 */
-#if FEATURE_ARB_geometry_shader4
-
void GLAPIENTRY
_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)
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);
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, "");
}
shared->DefaultFragmentShader = _mesa_new_ati_fragment_shader(ctx, 0);
#endif
-#if FEATURE_ARB_shader_objects
shared->ShaderObjects = _mesa_NewHashTable();
-#endif
shared->BufferObjects = _mesa_NewHashTable();
_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);
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
_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) {
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