Hash :
f64f9546
Author :
Date :
2021-12-07T20:17:32
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>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
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.