Clone of mesa.
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

MESA_shader_debug.spec 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. Name
  2. MESA_shader_debug
  3. Name Strings
  4. GL_MESA_shader_debug
  5. Contact
  6. Brian Paul (brian.paul 'at' tungstengraphics.com)
  7. Michal Krol (mjkrol 'at' gmail.com)
  8. Status
  9. XXX - Not complete yet!!!
  10. Version
  11. Last Modified Date: July 30, 2006
  12. Author Revision: 0.2
  13. $Date: 2006/07/30 14:28:38 $ $Revision: 1.2 $
  14. Number
  15. TBD
  16. Dependencies
  17. OpenGL 1.0 is required.
  18. The ARB_shader_objects extension is required.
  19. The ARB_shading_language_100 extension is required.
  20. The extension is written against the OpenGL 1.5 specification.
  21. The extension is written against the OpenGL Shading Language 1.10
  22. Specification.
  23. Overview
  24. This extension introduces a debug object that can be attached to
  25. a program object to enable debugging. Vertex and/or fragment shader,
  26. during execution, issue diagnostic function calls that are logged
  27. to the debug object's log. A separate debug log for each shader type
  28. is maintained. A debug object can be attached, detached and queried
  29. at any time outside the Begin/End pair. Multiple debug objects can
  30. be attached to a single program object.
  31. IP Status
  32. None
  33. Issues
  34. None
  35. New Procedures and Functions
  36. handleARB CreateDebugObjectMESA(void)
  37. void ClearDebugLogMESA(handleARB obj, enum logType, enum shaderType)
  38. void GetDebugLogMESA(handleARB obj, enum logType, enum shaderType,
  39. sizei maxLength, sizei *length,
  40. charARB *debugLog)
  41. sizei GetDebugLogLengthMESA(handleARB obj, enum logType,
  42. enum shaderType)
  43. New Types
  44. None
  45. New Tokens
  46. Returned by the <params> parameter of GetObjectParameter{fi}vARB:
  47. DEBUG_OBJECT_MESA 0x8759
  48. Accepted by the <logType> argument of ClearDebugLogMESA,
  49. GetDebugLogLengthMESA and GetDebugLogMESA:
  50. DEBUG_PRINT_MESA 0x875A
  51. DEBUG_ASSERT_MESA 0x875B
  52. Additions to Chapter 2 of the OpenGL 1.5 Specification
  53. (OpenGL Operation)
  54. None
  55. Additions to Chapter 3 of the OpenGL 1.5 Specification (Rasterization)
  56. None
  57. Additions to Chapter 4 of the OpenGL 1.5 Specification (Per-Fragment
  58. Operations and the Frame Buffer)
  59. None
  60. Additions to Chapter 5 of the OpenGL 1.5 Specification
  61. (Special Functions)
  62. None
  63. Additions to Chapter 6 of the OpenGL 1.5 Specification (State and State
  64. Requests)
  65. None
  66. Additions to Appendix A of the OpenGL 1.5 Specification (Invariance)
  67. None
  68. Additions to Chapter 1 of the OpenGL Shading Language 1.10 Specification
  69. (Introduction)
  70. None
  71. Additions to Chapter 2 of the OpenGL Shading Language 1.10 Specification
  72. (Overview of OpenGL Shading)
  73. None
  74. Additions to Chapter 3 of the OpenGL Shading Language 1.10 Specification
  75. (Basics)
  76. None
  77. Additions to Chapter 4 of the OpenGL Shading Language 1.10 Specification
  78. (Variables and Types)
  79. None
  80. Additions to Chapter 5 of the OpenGL Shading Language 1.10 Specification
  81. (Operators and Expressions)
  82. None
  83. Additions to Chapter 6 of the OpenGL Shading Language 1.10 Specification
  84. (Statements and Structure)
  85. None
  86. Additions to Chapter 7 of the OpenGL Shading Language 1.10 Specification
  87. (Built-in Variables)
  88. None
  89. Additions to Chapter 8 of the OpenGL Shading Language 1.10 Specification
  90. (Built-in Functions)
  91. Add a new section 8.10 "Debug Functions":
  92. Debug functions are available to both fragment and vertex shaders.
  93. They are used to track the execution of a shader by logging
  94. passed-in arguments to the debug object's log. Those values can be
  95. retrieved by the application for inspection after shader execution
  96. is complete.
  97. The text, if any, produced by any of these functions is appended
  98. to each debug object that is attached to the program object.
  99. There are different debug log types
  100. Add a new section 8.10.1 "Print Function":
  101. The following printMESA prototypes are available.
  102. void printMESA(const float value)
  103. void printMESA(const int value)
  104. void printMESA(const bool value)
  105. void printMESA(const vec2 value)
  106. void printMESA(const vec3 value)
  107. void printMESA(const vec4 value)
  108. void printMESA(const ivec2 value)
  109. void printMESA(const ivec3 value)
  110. void printMESA(const ivec4 value)
  111. void printMESA(const bvec2 value)
  112. void printMESA(const bvec3 value)
  113. void printMESA(const bvec4 value)
  114. void printMESA(const mat2 value)
  115. void printMESA(const mat3 value)
  116. void printMESA(const mat4 value)
  117. void printMESA(const sampler1D value)
  118. void printMESA(const sampler2D value)
  119. void printMESA(const sampler3D value)
  120. void printMESA(const samplerCube value)
  121. void printMESA(const sampler1DShadow value)
  122. void printMESA(const sampler2DShadow value)
  123. The printMESA function writes the argument <value> to the "debug
  124. print log" (XXX DEBUG_PRINT_MESA?). Each component is written in
  125. text format (XXX format!) and is delimited by a white space (XXX 1
  126. or more?).
  127. Add a new section 8.10.2 "Assert Function":
  128. The following assertMESA prototypes are available.
  129. void assertMESA(const bool condition)
  130. void assertMESA(const bool condition, const int cookie)
  131. void assertMESA(const bool condition, const int cookie,
  132. const int file, const int line)
  133. The assertMESA function checks if the argument <condition> is
  134. true or false. If it is true, nothing happens. If it is false,
  135. a diagnostic message is written to the "debug assert log".
  136. The message contains the argument <file>, <line>, <cookie> and
  137. implementation dependent double-quoted string, each of this
  138. delimited by a white space. If the argument <cookie> is not present,
  139. it is meant as if it was of value 0. If the arguments <file> and
  140. <line> are not present, they are meant as if they were of values
  141. __FILE__ and __LINE__, respectively. The following three calls
  142. produce the same output, assuming they were issued from the same
  143. file and line.
  144. assertMESA (false);
  145. assertMESA (false, 0);
  146. assertMESA (false, 0, __FILE__, __LINE__);
  147. The diagnostic message examples follow.
  148. 1 89 0 ""
  149. 1 45 333 "all (lessThanEqual (fragColor, vec4 (1.0)))"
  150. 1 66 1 "assertion failed in file 1, line 66, cookie 1"
  151. Additions to Chapter 9 of the OpenGL Shading Language 1.10 Specification
  152. (Shading Language Grammar)
  153. None
  154. Additions to Chapter 10 of the OpenGL Shading Language 1.10
  155. Specification (Issues)
  156. None
  157. Additions to the AGL/EGL/GLX/WGL Specifications
  158. None
  159. GLX Protocol
  160. None
  161. Errors
  162. TBD
  163. New State
  164. TBD
  165. New Implementation Dependent State
  166. TBD
  167. Sample Code
  168. TBD
  169. Revision History
  170. 29 May 2006
  171. Initial draft. (Michal Krol)
  172. 30 July 2006
  173. Add Overview, New Procedures and Functions, New Tokens sections.
  174. Add sections 8.10.1, 8.10.2 to GLSL spec.