pipelineobj.h revision af69d88d
1af69d88dSmrg/*
2af69d88dSmrg * Mesa 3-D graphics library
3af69d88dSmrg *
4af69d88dSmrg * Copyright © 2013 Gregory Hainaut <gregory.hainaut@gmail.com>
5af69d88dSmrg *
6af69d88dSmrg * Permission is hereby granted, free of charge, to any person obtaining a
7af69d88dSmrg * copy of this software and associated documentation files (the "Software"),
8af69d88dSmrg * to deal in the Software without restriction, including without limitation
9af69d88dSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10af69d88dSmrg * and/or sell copies of the Software, and to permit persons to whom the
11af69d88dSmrg * Software is furnished to do so, subject to the following conditions:
12af69d88dSmrg *
13af69d88dSmrg * The above copyright notice and this permission notice (including the next
14af69d88dSmrg * paragraph) shall be included in all copies or substantial portions of the
15af69d88dSmrg * Software.
16af69d88dSmrg *
17af69d88dSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18af69d88dSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19af69d88dSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
20af69d88dSmrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21af69d88dSmrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22af69d88dSmrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
23af69d88dSmrg * IN THE SOFTWARE.
24af69d88dSmrg */
25af69d88dSmrg
26af69d88dSmrg#ifndef PIPELINEOBJ_H
27af69d88dSmrg#define PIPELINEOBJ_H
28af69d88dSmrg
29af69d88dSmrg#include "glheader.h"
30af69d88dSmrg
31af69d88dSmrg#ifdef __cplusplus
32af69d88dSmrgextern "C" {
33af69d88dSmrg#endif
34af69d88dSmrg
35af69d88dSmrgstruct _glapi_table;
36af69d88dSmrgstruct gl_context;
37af69d88dSmrgstruct gl_pipeline_object;
38af69d88dSmrg
39af69d88dSmrgextern void
40af69d88dSmrg_mesa_delete_pipeline_object(struct gl_context *ctx, struct gl_pipeline_object *obj);
41af69d88dSmrg
42af69d88dSmrgextern void
43af69d88dSmrg_mesa_init_pipeline(struct gl_context *ctx);
44af69d88dSmrg
45af69d88dSmrgextern void
46af69d88dSmrg_mesa_free_pipeline_data(struct gl_context *ctx);
47af69d88dSmrg
48af69d88dSmrgextern void
49af69d88dSmrg_mesa_reference_pipeline_object_(struct gl_context *ctx,
50af69d88dSmrg                                 struct gl_pipeline_object **ptr,
51af69d88dSmrg                                 struct gl_pipeline_object *obj);
52af69d88dSmrg
53af69d88dSmrgstatic inline void
54af69d88dSmrg_mesa_reference_pipeline_object(struct gl_context *ctx,
55af69d88dSmrg                                struct gl_pipeline_object **ptr,
56af69d88dSmrg                                struct gl_pipeline_object *obj)
57af69d88dSmrg{
58af69d88dSmrg   if (*ptr != obj)
59af69d88dSmrg      _mesa_reference_pipeline_object_(ctx, ptr, obj);
60af69d88dSmrg}
61af69d88dSmrg
62af69d88dSmrgextern void
63af69d88dSmrg_mesa_bind_pipeline(struct gl_context *ctx,
64af69d88dSmrg                    struct gl_pipeline_object *pipe);
65af69d88dSmrg
66af69d88dSmrgextern GLboolean
67af69d88dSmrg_mesa_validate_program_pipeline(struct gl_context * ctx, struct gl_pipeline_object *pipe, GLboolean IsBound);
68af69d88dSmrg
69af69d88dSmrg
70af69d88dSmrgextern void GLAPIENTRY
71af69d88dSmrg_mesa_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
72af69d88dSmrg
73af69d88dSmrgextern void GLAPIENTRY
74af69d88dSmrg_mesa_ActiveShaderProgram(GLuint pipeline, GLuint program);
75af69d88dSmrg
76af69d88dSmrgextern void GLAPIENTRY
77af69d88dSmrg_mesa_BindProgramPipeline(GLuint pipeline);
78af69d88dSmrg
79af69d88dSmrgextern void GLAPIENTRY
80af69d88dSmrg_mesa_DeleteProgramPipelines(GLsizei n, const GLuint *pipelines);
81af69d88dSmrg
82af69d88dSmrgextern void GLAPIENTRY
83af69d88dSmrg_mesa_GenProgramPipelines(GLsizei n, GLuint *pipelines);
84af69d88dSmrg
85af69d88dSmrgextern GLboolean GLAPIENTRY
86af69d88dSmrg_mesa_IsProgramPipeline(GLuint pipeline);
87af69d88dSmrg
88af69d88dSmrgextern void GLAPIENTRY
89af69d88dSmrg_mesa_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params);
90af69d88dSmrg
91af69d88dSmrgextern void GLAPIENTRY
92af69d88dSmrg_mesa_ValidateProgramPipeline(GLuint pipeline);
93af69d88dSmrg
94af69d88dSmrgextern void GLAPIENTRY
95af69d88dSmrg_mesa_GetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize,
96af69d88dSmrg                                GLsizei *length, GLchar *infoLog);
97af69d88dSmrg
98af69d88dSmrg#ifdef __cplusplus
99af69d88dSmrg}
100af69d88dSmrg#endif
101af69d88dSmrg
102af69d88dSmrg#endif /* PIPELINEOBJ_H */
103