Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions features/webgl2-context-colorspace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: WebGL2 Color Space
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open to splitting this into two features, one has baseline low, the other is only supported in Chrome/Edge.

It also has the same support versions as the same functionality in WebGL1, so we could alternatively merge it that way.

description: Specifies the color space to be used for the context.
spec: https://registry.khronos.org/webgl/specs/latest/2.0/
compat_features:
- api.WebGL2RenderingContext.drawingBufferColorSpace
- api.WebGL2RenderingContext.unpackColorSpace
29 changes: 29 additions & 0 deletions features/webgl2-context-colorspace.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated from: webgl2-context-colorspace.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "104"
chrome_android: "104"
edge: "104"
compat_features:
# baseline: low
# baseline_low_date: 2024-06-11
# support:
# chrome: "104"
# chrome_android: "104"
# edge: "104"
# firefox: "127"
# firefox_android: "127"
# safari: "16.4"
# safari_ios: "16.4"
- api.WebGL2RenderingContext.drawingBufferColorSpace

# ⬇️ Same status as overall feature ⬇️
# baseline: false
# support:
# chrome: "104"
# chrome_android: "104"
# edge: "104"
- api.WebGL2RenderingContext.unpackColorSpace
5 changes: 5 additions & 0 deletions features/webgl2-context-desynchronized.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: WebGL2 `desynchronized` parameter
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has same support as WebGL1 desynchronized so we could merge these two. I feel like WebGL1/WebGL2 are very different and keeping them separate makes sense. But can be convinced otherwise.

description: Reduces latency by desynchronizing the canvas paint cycle from the event loop.
spec: https://registry.khronos.org/webgl/specs/latest/2.0/
compat_features:
- api.HTMLCanvasElement.getContext.webgl2_context.options_desynchronized_parameter
11 changes: 11 additions & 0 deletions features/webgl2-context-desynchronized.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Generated from: webgl2-context-desynchronized.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "81"
chrome_android: "75"
edge: "79"
compat_features:
- api.HTMLCanvasElement.getContext.webgl2_context.options_desynchronized_parameter
6 changes: 6 additions & 0 deletions features/webgl2-context-drawingbuffer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: WebGL2 drawing buffer
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has same support as WebGL1 drawingBufferXXX so we could merge these two. I feel like WebGL1/WebGL2 are very different and keeping them separate makes sense. But can be convinced otherwise.

description: Provides access to the underlying storage buffer.
spec: https://registry.khronos.org/webgl/specs/latest/2.0/#2.2
compat_features:
- api.WebGL2RenderingContext.drawingBufferFormat
- api.WebGL2RenderingContext.drawingBufferStorage
12 changes: 12 additions & 0 deletions features/webgl2-context-drawingbuffer.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Generated from: webgl2-context-drawingbuffer.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "122"
chrome_android: "122"
edge: "122"
compat_features:
- api.WebGL2RenderingContext.drawingBufferFormat
- api.WebGL2RenderingContext.drawingBufferStorage
5 changes: 5 additions & 0 deletions features/webgl2-context-powerpreference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: WebGL2 `powerPreference` parameter
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has similar support as WebGL1 powerPreference, with Safari being significantly different (10.1/3 vs 15). We could merge these two, but based on the significant difference, I'd lean towards no.

description: Allows the developer to prioritize rendering performance or power savings.
spec: https://registry.khronos.org/webgl/specs/latest/2.0/
compat_features:
- api.HTMLCanvasElement.getContext.webgl2_context.options_powerPreference_parameter
13 changes: 13 additions & 0 deletions features/webgl2-context-powerpreference.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated from: webgl2-context-powerpreference.yml
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
support:
chrome: "75"
chrome_android: "75"
edge: "79"
safari: "15"
safari_ios: "15"
compat_features:
- api.HTMLCanvasElement.getContext.webgl2_context.options_powerPreference_parameter
31 changes: 2 additions & 29 deletions features/draft/spec/webgl2.yml → features/webgl2.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
draft_date: 2024-07-11
name: WebGL 2.0 Specification
description: TODO
name: WebGL2 2D and 3D Graphics
description: WebGL2 is a JavaScript API for rendering high-performance interactive 3D and 2D graphics and support for much of the OpenGL ES 3.0 feature set.
spec: https://registry.khronos.org/webgl/specs/latest/2.0/
compat_features:
- api.HTMLCanvasElement.getContext.webgl2_context.options_alpha_parameter
- api.HTMLCanvasElement.getContext.webgl2_context.options_desynchronized_parameter
- api.HTMLCanvasElement.getContext.webgl2_context.options_failIfMajorPerformanceCaveat_parameter
- api.HTMLCanvasElement.getContext.webgl2_context.options_powerPreference_parameter
- api.WebGL2RenderingContext
- api.WebGL2RenderingContext.activeTexture
- api.WebGL2RenderingContext.attachShader
Expand Down Expand Up @@ -84,10 +81,7 @@ compat_features:
- api.WebGL2RenderingContext.drawBuffers
- api.WebGL2RenderingContext.drawElements
- api.WebGL2RenderingContext.drawElementsInstanced
- api.WebGL2RenderingContext.drawingBufferColorSpace
- api.WebGL2RenderingContext.drawingBufferFormat
- api.WebGL2RenderingContext.drawingBufferHeight
- api.WebGL2RenderingContext.drawingBufferStorage
- api.WebGL2RenderingContext.drawingBufferWidth
- api.WebGL2RenderingContext.drawRangeElements
- api.WebGL2RenderingContext.enable
Expand Down Expand Up @@ -159,7 +153,6 @@ compat_features:
- api.WebGL2RenderingContext.linkProgram
- api.WebGL2RenderingContext.pauseTransformFeedback
- api.WebGL2RenderingContext.pixelStorei
- api.WebGL2RenderingContext.pixelStorei
- api.WebGL2RenderingContext.polygonOffset
- api.WebGL2RenderingContext.readBuffer
- api.WebGL2RenderingContext.readPixels
Expand Down Expand Up @@ -220,7 +213,6 @@ compat_features:
- api.WebGL2RenderingContext.uniformMatrix4fv
- api.WebGL2RenderingContext.uniformMatrix4x2fv
- api.WebGL2RenderingContext.uniformMatrix4x3fv
- api.WebGL2RenderingContext.unpackColorSpace
- api.WebGL2RenderingContext.useProgram
- api.WebGL2RenderingContext.validateProgram
- api.WebGL2RenderingContext.vertexAttrib1f
Expand All @@ -241,25 +233,6 @@ compat_features:
- api.WebGL2RenderingContext.viewport
- api.WebGL2RenderingContext.waitSync
- api.WebGLQuery
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though this is titled WebGLXXX it is explicitly WebGL2... Same for some of the other top level APIs

- api.WebGLRenderingContext.bindBuffer
- api.WebGLRenderingContext.bindFramebuffer
- api.WebGLRenderingContext.bindTexture
- api.WebGLRenderingContext.checkFramebufferStatus
- api.WebGLRenderingContext.getBufferParameter
- api.WebGLRenderingContext.getFramebufferAttachmentParameter
- api.WebGLRenderingContext.getParameter
- api.WebGLRenderingContext.getProgramParameter
- api.WebGLRenderingContext.getRenderbufferParameter
- api.WebGLRenderingContext.getTexParameter
- api.WebGLRenderingContext.getUniform
- api.WebGLRenderingContext.getVertexAttrib
- api.WebGLRenderingContext.isEnabled
- api.WebGLRenderingContext.pixelStorei
- api.WebGLRenderingContext.renderbufferStorage
- api.WebGLRenderingContext.texImage2D
- api.WebGLRenderingContext.texParameterf
- api.WebGLRenderingContext.texParameteri
- api.WebGLRenderingContext.texSubImage2D
- api.WebGLSampler
- api.WebGLSync
- api.WebGLTransformFeedback
Expand Down
91 changes: 11 additions & 80 deletions features/draft/spec/webgl2.yml.dist → features/webgl2.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,18 @@
# Do not edit this file by hand. Edit the source file instead!

status:
baseline: false
baseline: high
baseline_low_date: 2021-09-20
baseline_high_date: 2024-03-20
support:
chrome: "122"
chrome_android: "122"
edge: "122"
chrome: "56"
chrome_android: "58"
edge: "79"
firefox: "51"
firefox_android: "51"
safari: "15"
safari_ios: "15"
compat_features:
# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
# support:
# chrome: "9"
# chrome_android: "25"
# edge: "12"
# firefox: "4"
# firefox_android: "4"
# safari: "5.1"
# safari_ios: "8"
- api.WebGLRenderingContext.bindBuffer
- api.WebGLRenderingContext.bindFramebuffer
- api.WebGLRenderingContext.bindTexture
- api.WebGLRenderingContext.checkFramebufferStatus
- api.WebGLRenderingContext.getBufferParameter
- api.WebGLRenderingContext.getFramebufferAttachmentParameter
- api.WebGLRenderingContext.getParameter
- api.WebGLRenderingContext.getProgramParameter
- api.WebGLRenderingContext.getRenderbufferParameter
- api.WebGLRenderingContext.getTexParameter
- api.WebGLRenderingContext.getUniform
- api.WebGLRenderingContext.getVertexAttrib
- api.WebGLRenderingContext.isEnabled
- api.WebGLRenderingContext.pixelStorei
- api.WebGLRenderingContext.renderbufferStorage
- api.WebGLRenderingContext.texImage2D
- api.WebGLRenderingContext.texParameterf
- api.WebGLRenderingContext.texParameteri
- api.WebGLRenderingContext.texSubImage2D

# baseline: high
# baseline_low_date: 2021-09-20
# baseline_high_date: 2024-03-20
Expand All @@ -53,6 +28,7 @@ compat_features:
- api.HTMLCanvasElement.getContext.webgl2_context.options_alpha_parameter
- api.HTMLCanvasElement.getContext.webgl2_context.options_failIfMajorPerformanceCaveat_parameter

# ⬇️ Same status as overall feature ⬇️
# baseline: high
# baseline_low_date: 2021-09-20
# baseline_high_date: 2024-03-20
Expand Down Expand Up @@ -213,7 +189,6 @@ compat_features:
- api.WebGL2RenderingContext.linkProgram
- api.WebGL2RenderingContext.pauseTransformFeedback
- api.WebGL2RenderingContext.pixelStorei
- api.WebGL2RenderingContext.pixelStorei
- api.WebGL2RenderingContext.polygonOffset
- api.WebGL2RenderingContext.readBuffer
- api.WebGL2RenderingContext.readPixels
Expand Down Expand Up @@ -298,47 +273,3 @@ compat_features:
- api.WebGLSync
- api.WebGLTransformFeedback
- api.WebGLVertexArrayObject

# baseline: low
# baseline_low_date: 2024-06-11
# support:
# chrome: "104"
# chrome_android: "104"
# edge: "104"
# firefox: "127"
# firefox_android: "127"
# safari: "16.4"
# safari_ios: "16.4"
- api.WebGL2RenderingContext.drawingBufferColorSpace

# baseline: false
# support:
# chrome: "75"
# chrome_android: "75"
# edge: "79"
# safari: "15"
# safari_ios: "15"
- api.HTMLCanvasElement.getContext.webgl2_context.options_powerPreference_parameter

# baseline: false
# support:
# chrome: "81"
# chrome_android: "75"
# edge: "79"
- api.HTMLCanvasElement.getContext.webgl2_context.options_desynchronized_parameter

# baseline: false
# support:
# chrome: "104"
# chrome_android: "104"
# edge: "104"
- api.WebGL2RenderingContext.unpackColorSpace

# ⬇️ Same status as overall feature ⬇️
# baseline: false
# support:
# chrome: "122"
# chrome_android: "122"
# edge: "122"
- api.WebGL2RenderingContext.drawingBufferFormat
- api.WebGL2RenderingContext.drawingBufferStorage