pipelineobj.h revision f4c13a890fa24ff1f998e7cac0ecc31505a29403
173b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut/* 273b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * Mesa 3-D graphics library 373b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * 473b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * Copyright © 2013 Gregory Hainaut <gregory.hainaut@gmail.com> 573b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * 673b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * Permission is hereby granted, free of charge, to any person obtaining a 773b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * copy of this software and associated documentation files (the "Software"), 873b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * to deal in the Software without restriction, including without limitation 973b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * the rights to use, copy, modify, merge, publish, distribute, sublicense, 1073b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * and/or sell copies of the Software, and to permit persons to whom the 1173b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * Software is furnished to do so, subject to the following conditions: 1273b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * 1373b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * The above copyright notice and this permission notice (including the next 1473b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * paragraph) shall be included in all copies or substantial portions of the 1573b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * Software. 1673b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * 1773b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1873b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1973b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 2073b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 2173b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 2273b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 2373b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut * IN THE SOFTWARE. 2473b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut */ 2573b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 2673b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut#ifndef PIPELINEOBJ_H 2773b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut#define PIPELINEOBJ_H 2873b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 2973b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut#include "glheader.h" 3073b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 3173b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut#ifdef __cplusplus 3273b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern "C" { 3373b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut#endif 3473b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 3573b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautstruct _glapi_table; 3673b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautstruct gl_context; 37f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainautstruct gl_pipeline_object; 38f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut 39f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainautextern void 40f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut_mesa_delete_pipeline_object(struct gl_context *ctx, struct gl_pipeline_object *obj); 41f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut 42f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainautextern void 43f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut_mesa_init_pipeline(struct gl_context *ctx); 44f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut 45f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainautextern void 46f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut_mesa_free_pipeline_data(struct gl_context *ctx); 47f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut 48f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainautextern void 49f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut_mesa_reference_pipeline_object_(struct gl_context *ctx, 50f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut struct gl_pipeline_object **ptr, 51f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut struct gl_pipeline_object *obj); 52f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut 53f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainautstatic inline void 54f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut_mesa_reference_pipeline_object(struct gl_context *ctx, 55f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut struct gl_pipeline_object **ptr, 56f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut struct gl_pipeline_object *obj) 57f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut{ 58f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut if (*ptr != obj) 59f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut _mesa_reference_pipeline_object_(ctx, ptr, obj); 60f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut} 61f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut 6273b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 6373b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 6473b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program); 6573b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 6673b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 6773b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_ActiveShaderProgram(GLuint pipeline, GLuint program); 6873b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 6973b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 7073b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_BindProgramPipeline(GLuint pipeline); 7173b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 7273b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 7373b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_DeleteProgramPipelines(GLsizei n, const GLuint *pipelines); 7473b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 7573b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 7673b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_GenProgramPipelines(GLsizei n, GLuint *pipelines); 7773b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 7873b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern GLboolean GLAPIENTRY 7973b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_IsProgramPipeline(GLuint pipeline); 8073b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 8173b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 8273b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params); 8373b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 8473b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 8573b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_ValidateProgramPipeline(GLuint pipeline); 8673b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 8773b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 8873b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_GetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, 8973b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut GLsizei *length, GLchar *infoLog); 9073b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 9173b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut#ifdef __cplusplus 9273b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut} 9373b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut#endif 9473b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 9573b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut#endif /* PIPELINEOBJ_H */ 96