Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

program.h 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
  3. * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
  4. * Copyright © 2010 Intel Corporation
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a
  7. * copy of this software and associated documentation files (the "Software"),
  8. * to deal in the Software without restriction, including without limitation
  9. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10. * and/or sell copies of the Software, and to permit persons to whom the
  11. * Software is furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included
  14. * in all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  17. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  19. * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  20. * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22. */
  23. #include <GL/gl.h>
  24. /**
  25. * Based on gl_shader in Mesa's mtypes.h.
  26. */
  27. struct glsl_shader {
  28. GLenum Type;
  29. GLuint Name;
  30. GLint RefCount;
  31. GLboolean DeletePending;
  32. GLboolean CompileStatus;
  33. const GLchar *Source; /**< Source code string */
  34. size_t SourceLen;
  35. GLchar *InfoLog;
  36. struct exec_list ir;
  37. struct glsl_symbol_table *symbols;
  38. };
  39. struct gl_program_parameter_list;
  40. struct gl_uniform_list;
  41. /**
  42. * Based on gl_shader_program in Mesa's mtypes.h.
  43. */
  44. struct glsl_program {
  45. GLenum Type; /**< Always GL_SHADER_PROGRAM (internal token) */
  46. GLuint Name; /**< aka handle or ID */
  47. GLint RefCount; /**< Reference count */
  48. GLboolean DeletePending;
  49. GLuint NumShaders; /**< number of attached shaders */
  50. struct glsl_shader **Shaders; /**< List of attached the shaders */
  51. /* post-link info: */
  52. struct gl_uniform_list *Uniforms;
  53. struct gl_program_parameter_list *Varying;
  54. GLboolean LinkStatus; /**< GL_LINK_STATUS */
  55. GLboolean Validated;
  56. GLboolean _Used; /**< Ever used for drawing? */
  57. GLchar *InfoLog;
  58. };
  59. extern void
  60. link_shaders(struct glsl_program *prog);