pipelineobj.h revision 01e04c3f
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 4801e04c3fSmrgextern struct gl_pipeline_object * 4901e04c3fSmrg_mesa_lookup_pipeline_object(struct gl_context *ctx, GLuint id); 5001e04c3fSmrg 51af69d88dSmrgextern void 52af69d88dSmrg_mesa_reference_pipeline_object_(struct gl_context *ctx, 53af69d88dSmrg struct gl_pipeline_object **ptr, 54af69d88dSmrg struct gl_pipeline_object *obj); 55af69d88dSmrg 56af69d88dSmrgstatic inline void 57af69d88dSmrg_mesa_reference_pipeline_object(struct gl_context *ctx, 58af69d88dSmrg struct gl_pipeline_object **ptr, 59af69d88dSmrg struct gl_pipeline_object *obj) 60af69d88dSmrg{ 61af69d88dSmrg if (*ptr != obj) 62af69d88dSmrg _mesa_reference_pipeline_object_(ctx, ptr, obj); 63af69d88dSmrg} 64af69d88dSmrg 65af69d88dSmrgextern void 66af69d88dSmrg_mesa_bind_pipeline(struct gl_context *ctx, 67af69d88dSmrg struct gl_pipeline_object *pipe); 68af69d88dSmrg 69af69d88dSmrgextern GLboolean 7001e04c3fSmrg_mesa_validate_program_pipeline(struct gl_context * ctx, 7101e04c3fSmrg struct gl_pipeline_object *pipe); 72af69d88dSmrg 73af69d88dSmrg 7401e04c3fSmrgvoid GLAPIENTRY 7501e04c3fSmrg_mesa_UseProgramStages_no_error(GLuint pipeline, GLbitfield stages, 7601e04c3fSmrg GLuint prog); 77af69d88dSmrgextern void GLAPIENTRY 78af69d88dSmrg_mesa_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program); 79af69d88dSmrg 8001e04c3fSmrgvoid GLAPIENTRY 8101e04c3fSmrg_mesa_ActiveShaderProgram_no_error(GLuint pipeline, GLuint program); 82af69d88dSmrgextern void GLAPIENTRY 83af69d88dSmrg_mesa_ActiveShaderProgram(GLuint pipeline, GLuint program); 84af69d88dSmrg 8501e04c3fSmrgvoid GLAPIENTRY 8601e04c3fSmrg_mesa_BindProgramPipeline_no_error(GLuint pipeline); 87af69d88dSmrgextern void GLAPIENTRY 88af69d88dSmrg_mesa_BindProgramPipeline(GLuint pipeline); 89af69d88dSmrg 90af69d88dSmrgextern void GLAPIENTRY 91af69d88dSmrg_mesa_DeleteProgramPipelines(GLsizei n, const GLuint *pipelines); 92af69d88dSmrg 9301e04c3fSmrgvoid GLAPIENTRY 9401e04c3fSmrg_mesa_GenProgramPipelines_no_error(GLsizei n, GLuint *pipelines); 9501e04c3fSmrg 96af69d88dSmrgextern void GLAPIENTRY 97af69d88dSmrg_mesa_GenProgramPipelines(GLsizei n, GLuint *pipelines); 98af69d88dSmrg 9901e04c3fSmrgvoid GLAPIENTRY 10001e04c3fSmrg_mesa_CreateProgramPipelines_no_error(GLsizei n, GLuint *pipelines); 10101e04c3fSmrg 10201e04c3fSmrgvoid GLAPIENTRY 10301e04c3fSmrg_mesa_CreateProgramPipelines(GLsizei n, GLuint *pipelines); 10401e04c3fSmrg 105af69d88dSmrgextern GLboolean GLAPIENTRY 106af69d88dSmrg_mesa_IsProgramPipeline(GLuint pipeline); 107af69d88dSmrg 108af69d88dSmrgextern void GLAPIENTRY 109af69d88dSmrg_mesa_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params); 110af69d88dSmrg 111af69d88dSmrgextern void GLAPIENTRY 112af69d88dSmrg_mesa_ValidateProgramPipeline(GLuint pipeline); 113af69d88dSmrg 114af69d88dSmrgextern void GLAPIENTRY 115af69d88dSmrg_mesa_GetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, 116af69d88dSmrg GLsizei *length, GLchar *infoLog); 117af69d88dSmrg 118af69d88dSmrg#ifdef __cplusplus 119af69d88dSmrg} 120af69d88dSmrg#endif 121af69d88dSmrg 122af69d88dSmrg#endif /* PIPELINEOBJ_H */ 123