angle/extensions/ANGLE_base_vertex_base_inst...

138 строки
3.5 KiB
Plaintext
Исходник Обычный вид История

Reland "Decouple gl_BaseVertex/gl_BaseInstance uniforms" This reverts commit 10e5f34d1439f0bcd5b30bea5bfbf6bdaafd4935. Reason for revert: exonerated from flaky crash suspect Original change's description: > Revert "Decouple gl_BaseVertex/gl_BaseInstance uniforms" > > This reverts commit 36bf1ebe5e9500704dd235254bd22a1f2bbd7059. > > Reason for revert: suspect causing flaky crashes > > Bug: angleproject:6763 > > Original change's description: > > Decouple gl_BaseVertex/gl_BaseInstance uniforms > > > > These are builtin uniforms removed in > > https://github.com/KhronosGroup/WebGL/pull/3278 > > > > Decouple them from the original ANGLE_base_vertex_base_instance > > extension. > > > > Make a new ANGLE_base_vertex_base_instance_shader_builtin > > extension for these builtin uniforms. > > > > Bug: angleproject:3402 > > Change-Id: I77b93917976ce435db9c578c0ade37bff18a42b0 > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3290304 > > Commit-Queue: Shrek Shao <shrekshao@google.com> > > Reviewed-by: Geoff Lang <geofflang@chromium.org> > > Reviewed-by: Kenneth Russell <kbr@chromium.org> > > Bug: angleproject:3402 > Change-Id: I75830baa14cf4e7c53750fd14ff76501145b4823 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3315610 > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Commit-Queue: Shrek Shao <shrekshao@google.com> Bug: angleproject:6763 Bug: angleproject:3402 Change-Id: Ie436dc5d55364e464897d407a53b793941cd5d0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3321703 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2021-12-07 23:17:32 +03:00
Name
ANGLE_base_vertex_base_instance_shader_builtin
Name Strings
GL_ANGLE_base_vertex_base_instance_shader_builtin
Contributors
Shrek Shao, Google Inc.
Contributors to the ANGLE_base_vertex_base_instance specification
Contributors to the ARB_shader_draw_parameters specification
Contact
Shrek Shao (shrekshao 'at' google.com)
Status
Incomplete
Version
Last Modified Date: Nov 19, 2021
Author Revision: 1
Number
OpenGL ES Extension XX
Dependencies
The extension is based on ANGLE_base_vertex_base_instance, all limitations of which
apply to this extension.
Overview
This extension is based on ANGLE_base_vertex_base_instance. It should be enabled
only if ANGLE_base_vertex_base_instance is enabled.
Additional to the functionality exposed by ANGLE_base_vertex_base_instance,
<gl_BaseVertex> and <gl_BaseInstance> builtins are added to the shading language.
For any *BaseVertex* draw call variant, the <baseVertex> of the draw may be
read by the vertex shader as <gl_BaseVertex>. For non *BaseVertex* calls,
the value of <gl_BaseVertex> is 0.
For any *BaseInstance draw call variant, the baseInstance of the draw may
be read by the vertex shader as <gl_BaseInstance>. For non *BaseInstance
calls, the value of <gl_BaseInstance> is 0.
IP Status
No known IP claims.
New Procedures and Functions
None.
New Tokens
None.
Additions to Chapter 10 of the OpenGL ES 3.2 Specification
Section 10.5 Drawing Commands Using Vertex Arrays:
The base index of the instance may be read by a vertex shader as
<gl_BaseInstance>, for the commands
void DrawArraysInstancedBaseInstanceANGLE (GLenum mode,
GLint first,
GLsizei count,
GLsizei instanceCount,
GLuint baseInstance);
and
void MultiDrawArraysInstancedBaseInstanceANGLE(GLenum mode,
const GLint* firsts,
const GLsizei* counts,
const GLsizei* instanceCounts,
const GLuint* baseInstances,
GLsizei drawcount);
The base index of the vertex may be read by a vertex shader as
<gl_BaseVertex>. This value is also added to the <gl_VertexID>.
The base index of the instance may be read by a vertex shader as
<gl_BaseInstance>. Note that this value is not added to the
<gl_InstanceID>, for the commands
void DrawElementsInstancedBaseVertexBaseInstanceANGLE (GLenum mode,
GLsizei count,
GLenum type,
const GLvoid* indices,
GLsizei instanceCount,
GLint baseVertex,
GLuint baseInstance);
and
void MultiDrawElementsInstancedBaseVertexBaseInstanceANGLE(GLenum mode,
const GLsizei* counts,
GLenum type,
const GLvoid* const* indices,
const GLsizei* instanceCounts,
const GLint* baseVertices,
const GLuint* baseInstances,
GLsizei drawcount);
Errors
None.
Modifications to the OpenGL ES Shading Language Specification, Version 3.00
Including the following line in a shader controls the
language featured described in this extension:
#extension GL_ANGLE_base_vertex_base_instance_shader_builtin : <behavior>
where <behavior> is as specified in section 3.5.
A new preprocessor #define is added to the OpenGL ES Shading Language:
#define GL_ANGLE_base_vertex_base_instance_shader_builtin 1
Issues
None
Revision History
Rev. Date Author Changes
---- -------- ---------- --------------------------------------------
1 11/19/21 Shrek Shao First revision.