mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
cogl: Remove unused CoglPipelineProgramType
There is only GLSL. https://gitlab.gnome.org/GNOME/mutter/merge_requests/819
This commit is contained in:
parent
23e9fd3dfa
commit
8cac82318f
@ -249,8 +249,6 @@ struct _CoglContext
|
|||||||
/* Fragment processing programs */
|
/* Fragment processing programs */
|
||||||
CoglHandle current_program;
|
CoglHandle current_program;
|
||||||
|
|
||||||
CoglPipelineProgramType current_fragment_program_type;
|
|
||||||
CoglPipelineProgramType current_vertex_program_type;
|
|
||||||
GLuint current_gl_program;
|
GLuint current_gl_program;
|
||||||
|
|
||||||
gboolean current_gl_dither_enabled;
|
gboolean current_gl_dither_enabled;
|
||||||
|
@ -299,8 +299,6 @@ cogl_context_new (CoglDisplay *display,
|
|||||||
context->max_texture_units = -1;
|
context->max_texture_units = -1;
|
||||||
context->max_activateable_texture_units = -1;
|
context->max_activateable_texture_units = -1;
|
||||||
|
|
||||||
context->current_fragment_program_type = COGL_PIPELINE_PROGRAM_TYPE_GLSL;
|
|
||||||
context->current_vertex_program_type = COGL_PIPELINE_PROGRAM_TYPE_GLSL;
|
|
||||||
context->current_gl_program = 0;
|
context->current_gl_program = 0;
|
||||||
|
|
||||||
context->current_gl_dither_enabled = TRUE;
|
context->current_gl_dither_enabled = TRUE;
|
||||||
|
@ -481,11 +481,6 @@ typedef struct
|
|||||||
void (* pre_paint) (CoglPipeline *pipeline, CoglFramebuffer *framebuffer);
|
void (* pre_paint) (CoglPipeline *pipeline, CoglFramebuffer *framebuffer);
|
||||||
} CoglPipelineProgend;
|
} CoglPipelineProgend;
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
COGL_PIPELINE_PROGRAM_TYPE_GLSL = 1,
|
|
||||||
} CoglPipelineProgramType;
|
|
||||||
|
|
||||||
extern const CoglPipelineFragend *
|
extern const CoglPipelineFragend *
|
||||||
_cogl_pipeline_fragends[COGL_PIPELINE_N_FRAGENDS];
|
_cogl_pipeline_fragends[COGL_PIPELINE_N_FRAGENDS];
|
||||||
extern const CoglPipelineVertend *
|
extern const CoglPipelineVertend *
|
||||||
@ -618,10 +613,7 @@ typedef struct _CoglPipelineFlushOptions
|
|||||||
} CoglPipelineFlushOptions;
|
} CoglPipelineFlushOptions;
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_use_fragment_program (GLuint gl_program, CoglPipelineProgramType type);
|
cogl_use_program (GLuint gl_program);
|
||||||
|
|
||||||
void
|
|
||||||
_cogl_use_vertex_program (GLuint gl_program, CoglPipelineProgramType type);
|
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
_cogl_get_n_args_for_combine_func (CoglPipelineCombineFunc func);
|
_cogl_get_n_args_for_combine_func (CoglPipelineCombineFunc func);
|
||||||
|
@ -238,8 +238,8 @@ _cogl_pipeline_texture_storage_change_notify (CoglTexture *texture)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
set_glsl_program (GLuint gl_program)
|
cogl_use_program (GLuint gl_program)
|
||||||
{
|
{
|
||||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||||
|
|
||||||
@ -257,94 +257,6 @@ set_glsl_program (GLuint gl_program)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_cogl_use_fragment_program (GLuint gl_program, CoglPipelineProgramType type)
|
|
||||||
{
|
|
||||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
|
||||||
|
|
||||||
/* If we're changing program type... */
|
|
||||||
if (type != ctx->current_fragment_program_type)
|
|
||||||
{
|
|
||||||
/* ... disable the old type */
|
|
||||||
switch (ctx->current_fragment_program_type)
|
|
||||||
{
|
|
||||||
case COGL_PIPELINE_PROGRAM_TYPE_GLSL:
|
|
||||||
/* If the program contains a vertex shader then we shouldn't
|
|
||||||
disable it */
|
|
||||||
if (ctx->current_vertex_program_type !=
|
|
||||||
COGL_PIPELINE_PROGRAM_TYPE_GLSL)
|
|
||||||
set_glsl_program (0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ... and enable the new type */
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case COGL_PIPELINE_PROGRAM_TYPE_GLSL:
|
|
||||||
/* don't need to to anything */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type == COGL_PIPELINE_PROGRAM_TYPE_GLSL)
|
|
||||||
{
|
|
||||||
#ifdef COGL_PIPELINE_FRAGEND_GLSL
|
|
||||||
set_glsl_program (gl_program);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
g_warning ("Unexpected use of GLSL fragend!");
|
|
||||||
|
|
||||||
#endif /* COGL_PIPELINE_FRAGEND_GLSL */
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx->current_fragment_program_type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_cogl_use_vertex_program (GLuint gl_program, CoglPipelineProgramType type)
|
|
||||||
{
|
|
||||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
|
||||||
|
|
||||||
/* If we're changing program type... */
|
|
||||||
if (type != ctx->current_vertex_program_type)
|
|
||||||
{
|
|
||||||
/* ... disable the old type */
|
|
||||||
switch (ctx->current_vertex_program_type)
|
|
||||||
{
|
|
||||||
case COGL_PIPELINE_PROGRAM_TYPE_GLSL:
|
|
||||||
/* If the program contains a fragment shader then we shouldn't
|
|
||||||
disable it */
|
|
||||||
if (ctx->current_fragment_program_type !=
|
|
||||||
COGL_PIPELINE_PROGRAM_TYPE_GLSL)
|
|
||||||
set_glsl_program (0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ... and enable the new type */
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case COGL_PIPELINE_PROGRAM_TYPE_GLSL:
|
|
||||||
/* don't need to to anything */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type == COGL_PIPELINE_PROGRAM_TYPE_GLSL)
|
|
||||||
{
|
|
||||||
#ifdef COGL_PIPELINE_VERTEND_GLSL
|
|
||||||
set_glsl_program (gl_program);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
g_warning ("Unexpected use of GLSL vertend!");
|
|
||||||
|
|
||||||
#endif /* COGL_PIPELINE_VERTEND_GLSL */
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx->current_vertex_program_type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
|
#if defined(HAVE_COGL_GLES2) || defined(HAVE_COGL_GL)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -773,8 +773,7 @@ _cogl_pipeline_progend_glsl_end (CoglPipeline *pipeline,
|
|||||||
|
|
||||||
gl_program = program_state->program;
|
gl_program = program_state->program;
|
||||||
|
|
||||||
_cogl_use_fragment_program (gl_program, COGL_PIPELINE_PROGRAM_TYPE_GLSL);
|
cogl_use_program (gl_program);
|
||||||
_cogl_use_vertex_program (gl_program, COGL_PIPELINE_PROGRAM_TYPE_GLSL);
|
|
||||||
|
|
||||||
state.unit = 0;
|
state.unit = 0;
|
||||||
state.gl_program = gl_program;
|
state.gl_program = gl_program;
|
||||||
|
Loading…
Reference in New Issue
Block a user