aboutsummaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorzmo@google.com <zmo@google.com@736b8ea6-26fd-11df-bfd4-992fa37f6226>2011-10-03 21:45:23 +0000
committerzmo@google.com <zmo@google.com@736b8ea6-26fd-11df-bfd4-992fa37f6226>2011-10-03 21:45:23 +0000
commita574f78fcf2bd189915c790bc7efe6912a9bcc3a (patch)
tree1087d26819eff0ac9e17db279e1f57abd1f3f30d /extensions
parentad7ab332726b4fc401fc7ba63095a4a3c6a8356f (diff)
downloadangle-a574f78fcf2bd189915c790bc7efe6912a9bcc3a.tar.gz
Add an extension for querying translated HLSL shader source.
Review URL: http://codereview.appspot.com/5149046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@780 736b8ea6-26fd-11df-bfd4-992fa37f6226
Diffstat (limited to 'extensions')
-rw-r--r--extensions/ANGLE_translated_shader_source.txt113
1 files changed, 113 insertions, 0 deletions
diff --git a/extensions/ANGLE_translated_shader_source.txt b/extensions/ANGLE_translated_shader_source.txt
new file mode 100644
index 00000000..5d68b556
--- /dev/null
+++ b/extensions/ANGLE_translated_shader_source.txt
@@ -0,0 +1,113 @@
+Name
+
+ ANGLE_translated_shader_source
+
+Name Strings
+
+ GL_ANGLE_translated_shader_source
+
+Contributors
+
+ Daniel Koch, TransGaming Inc.
+ Gregg Tavares, Google Inc.
+ Kenneth Russell, Google Inc.
+ Zhenyao Mo, Google Inc.
+
+Contact
+
+ Zhenyao Mo, Google Inc. (zmo 'at' google 'dot' com)
+
+Status
+
+ Implemented in ANGLE ES2
+
+Version
+
+ Last Modified Date: Septemper 29, 2011
+ Author Revision: 1
+
+Number
+
+ OpenGL ES Extension #??
+
+Dependencies
+
+ OpenGL ES 2.0 is required.
+
+ The extension is written against the OpenGL ES 2.0 specification.
+
+Overview
+
+ WebGL uses the GLSL ES 2.0 spec on all platforms, and translates these
+ shaders to the host platform's native language (HLSL, GLSL, and even GLSL
+ ES). For debugging purposes, it is useful to be able to examine the shader
+ after translation.
+
+ This extension addes a new function to query the translated shader source,
+ and adds a new enum for GetShaderiv's <pname> parameter to query the
+ translated shader source length.
+
+IP Status
+
+ No known IP claims.
+
+New Types
+
+ None
+
+New Procedures and Functions
+
+ void GetTranslatedShaderSourceANGLE(uint shader, sizei bufsize,
+ sizei* length, char* source);
+
+New Tokens
+
+ Accepted by the <pname> parameter of GetShaderiv:
+
+ TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x6900
+
+Additions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State
+Requests)
+
+ Append in the end of the fourth paragraph of section 6.1.8 (Shader and
+ Program Queries):
+
+ " If <pname> is TRANSLATED_SHADER_LENGTH_ANGLE, the length of the translated
+ source string, including a null terminator, is returned. If no source has
+ been defined, CompileShader has not been called, or the translation has
+ failed for <shader>, zero is returned."
+
+ Append after the last paragraph of section 6.1.8 (Shader and Program
+ Queries):
+
+ "The command
+
+ void GetTranslatedShaderSourceANGLE( uint shader, sizei bufSize,
+ sizei *length, char *source );
+
+ returns in <source> the string making up the translated source code for
+ the shader object <shader>. The string <source> will be null terminated.
+ The actual number of characters written into <source>, excluding the null
+ terminator, is returned in <length>. If <length> is NULL, no length is
+ returned. The maximum number of characters that may be written into
+ <source>, including the null terminator, is speciļ¬ed by <bufSize>. The
+ string <source> is the translated string of a concatenation of the strings
+ passed to the GL using ShaderSource. The length of this translated string
+ is given by TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE, which can be queried
+ with GetShaderiv.
+
+ If no source has been defined, CompileShader has not been called, or the
+ translation has failed for <shader>, zero is returned for <length>, and
+ an empty string is returned for <source>.
+
+ If the value of SHADER_COMPILER is not TRUE, then the error INVALID_-
+ OPERATION is generated."
+
+Issues
+
+ 1) 0x6900 is temporarily assigned to TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE.
+
+Revision History
+
+ Revision 1, 2011/09/29
+ - first draft