1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/angle/extensions/ANGLE_translated_shader_source.txt Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,118 @@ 1.4 +Name 1.5 + 1.6 + ANGLE_translated_shader_source 1.7 + 1.8 +Name Strings 1.9 + 1.10 + GL_ANGLE_translated_shader_source 1.11 + 1.12 +Contributors 1.13 + 1.14 + Daniel Koch, TransGaming Inc. 1.15 + Gregg Tavares, Google Inc. 1.16 + Kenneth Russell, Google Inc. 1.17 + Zhenyao Mo, Google Inc. 1.18 + 1.19 +Contact 1.20 + 1.21 + Zhenyao Mo, Google Inc. (zmo 'at' google 'dot' com) 1.22 + 1.23 +Status 1.24 + 1.25 + Implemented in ANGLE ES2 1.26 + 1.27 +Version 1.28 + 1.29 + Last Modified Date: October 5, 2011 1.30 + Author Revision: 2 1.31 + 1.32 +Number 1.33 + 1.34 + OpenGL ES Extension #113 1.35 + 1.36 +Dependencies 1.37 + 1.38 + OpenGL ES 2.0 is required. 1.39 + 1.40 + The extension is written against the OpenGL ES 2.0 specification. 1.41 + 1.42 +Overview 1.43 + 1.44 + WebGL uses the GLSL ES 2.0 spec on all platforms, and translates these 1.45 + shaders to the host platform's native language (HLSL, GLSL, and even GLSL 1.46 + ES). For debugging purposes, it is useful to be able to examine the shader 1.47 + after translation. 1.48 + 1.49 + This extension addes a new function to query the translated shader source, 1.50 + and adds a new enum for GetShaderiv's <pname> parameter to query the 1.51 + translated shader source length. 1.52 + 1.53 +IP Status 1.54 + 1.55 + No known IP claims. 1.56 + 1.57 +New Types 1.58 + 1.59 + None 1.60 + 1.61 +New Procedures and Functions 1.62 + 1.63 + void GetTranslatedShaderSourceANGLE(uint shader, sizei bufsize, 1.64 + sizei* length, char* source); 1.65 + 1.66 +New Tokens 1.67 + 1.68 + Accepted by the <pname> parameter of GetShaderiv: 1.69 + 1.70 + TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 1.71 + 1.72 +Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State 1.73 +Requests) 1.74 + 1.75 + Append in the end of the fourth paragraph of section 6.1.8 (Shader and 1.76 + Program Queries): 1.77 + 1.78 + " If <pname> is TRANSLATED_SHADER_LENGTH_ANGLE, the length of the translated 1.79 + source string, including a null terminator, is returned. If no source has 1.80 + been defined, CompileShader has not been called, or the translation has 1.81 + failed for <shader>, zero is returned." 1.82 + 1.83 + Append after the last paragraph of section 6.1.8 (Shader and Program 1.84 + Queries): 1.85 + 1.86 + "The command 1.87 + 1.88 + void GetTranslatedShaderSourceANGLE( uint shader, sizei bufSize, 1.89 + sizei *length, char *source ); 1.90 + 1.91 + returns in <source> the string making up the translated source code for 1.92 + the shader object <shader>. The string <source> will be null terminated. 1.93 + The actual number of characters written into <source>, excluding the null 1.94 + terminator, is returned in <length>. If <length> is NULL, no length is 1.95 + returned. The maximum number of characters that may be written into 1.96 + <source>, including the null terminator, is speciļ¬ed by <bufSize>. The 1.97 + string <source> is the translated string of a concatenation of the strings 1.98 + passed to the GL using ShaderSource. The length of this translated string 1.99 + is given by TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE, which can be queried 1.100 + with GetShaderiv. 1.101 + 1.102 + If no source has been defined, CompileShader has not been called, or the 1.103 + translation has failed for <shader>, zero is returned for <length>, and 1.104 + an empty string is returned for <source>. 1.105 + 1.106 + If the value of SHADER_COMPILER is not TRUE, then the error INVALID_- 1.107 + OPERATION is generated." 1.108 + 1.109 +Issues 1.110 + 1.111 + 1) What enum value should be used for TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE? 1.112 + 1.113 + RESOLVED: The first draft used a temporary enum value. This been replaced 1.114 + with a enum allocated from the ANGLE range of GL enums. 1.115 + 1.116 +Revision History 1.117 + 1.118 + Revision 1, 2011/09/29, zmo 1.119 + - first draft 1.120 + Revision 2, 2011/10/05, dgkoch 1.121 + - assigned enum