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 48770f141866654dab969302f720228497f0fb35fdIlia Mirkinextern struct gl_pipeline_object * 49770f141866654dab969302f720228497f0fb35fdIlia Mirkin_mesa_lookup_pipeline_object(struct gl_context *ctx, GLuint id); 50770f141866654dab969302f720228497f0fb35fdIlia Mirkin 51f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainautextern void 52f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut_mesa_reference_pipeline_object_(struct gl_context *ctx, 53f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut struct gl_pipeline_object **ptr, 54f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut struct gl_pipeline_object *obj); 55f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut 56f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainautstatic inline void 57f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut_mesa_reference_pipeline_object(struct gl_context *ctx, 58f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut struct gl_pipeline_object **ptr, 59f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut struct gl_pipeline_object *obj) 60f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut{ 61f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut if (*ptr != obj) 62f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut _mesa_reference_pipeline_object_(ctx, ptr, obj); 63f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut} 64f4c13a890fa24ff1f998e7cac0ecc31505a29403Gregory Hainaut 654a868a984d6ae73eb38a69b045b004663cdac20cIan Romanickextern void 664a868a984d6ae73eb38a69b045b004663cdac20cIan Romanick_mesa_bind_pipeline(struct gl_context *ctx, 674a868a984d6ae73eb38a69b045b004663cdac20cIan Romanick struct gl_pipeline_object *pipe); 684a868a984d6ae73eb38a69b045b004663cdac20cIan Romanick 691c290680742ce5cb9a0a1019d0f971689335aabcGregory Hainautextern GLboolean 70ad0262185420db03e8256ef20a0f5b1b1de003d8Timothy Arceri_mesa_validate_program_pipeline(struct gl_context * ctx, 71ad0262185420db03e8256ef20a0f5b1b1de003d8Timothy Arceri struct gl_pipeline_object *pipe); 721c290680742ce5cb9a0a1019d0f971689335aabcGregory Hainaut 7373b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 7473b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 7573b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program); 7673b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 7773b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 7873b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_ActiveShaderProgram(GLuint pipeline, GLuint program); 7973b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 8073b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 8173b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_BindProgramPipeline(GLuint pipeline); 8273b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 8373b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 8473b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_DeleteProgramPipelines(GLsizei n, const GLuint *pipelines); 8573b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 8673b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 8773b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_GenProgramPipelines(GLsizei n, GLuint *pipelines); 8873b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 89b09f2ee8f7b76f30a75eec61ea8225a434365d49Martin Peresvoid GLAPIENTRY 90b09f2ee8f7b76f30a75eec61ea8225a434365d49Martin Peres_mesa_CreateProgramPipelines(GLsizei n, GLuint *pipelines); 91b09f2ee8f7b76f30a75eec61ea8225a434365d49Martin Peres 9273b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern GLboolean GLAPIENTRY 9373b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_IsProgramPipeline(GLuint pipeline); 9473b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 9573b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 9673b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params); 9773b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 9873b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 9973b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_ValidateProgramPipeline(GLuint pipeline); 10073b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 10173b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainautextern void GLAPIENTRY 10273b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut_mesa_GetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, 10373b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut GLsizei *length, GLchar *infoLog); 10473b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 10573b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut#ifdef __cplusplus 10673b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut} 10773b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut#endif 10873b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut 10973b78f9c9f86dd38fb165f4730aeac9519635b07Gregory Hainaut#endif /* PIPELINEOBJ_H */ 110