Bug 126449

Summary: [WebGL2] Implement compressedTex{Sub}Image*, copyTexSubImage3D
Product: WebKit Reporter: Dean Jackson <dino>
Component: WebGLAssignee: Kenneth Russell <kbr>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, esprehn+autocc, ews-watchlist, graouts, gyuyoung.kim, kbr, kondapallykalyan, noam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 126404, 209510    
Attachments:
Description Flags
Patch none

Description Dean Jackson 2014-01-03 12:13:04 PST
Implement the new texStorage methods

  void texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
  void texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
  void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, ArrayBufferView? pixels);
  void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, ImageData? data);
  void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, HTMLImageElement image);
  void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, HTMLCanvasElement canvas);
  void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, HTMLVideoElement video);
  void copyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);

(Maybe 3d should be split into a separate bug)
Comment 1 Dean Jackson 2014-01-03 12:13:25 PST
<rdar://problem/15002343>
Comment 2 Dean Jackson 2014-01-03 13:15:08 PST
Also:
  void compressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, ArrayBufferView data);
  void compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, ArrayBufferView data);
Comment 3 Kenneth Russell 2020-07-13 16:57:09 PDT
Taking this as a follow-on to the other recent texture work.
Comment 4 Kenneth Russell 2020-07-14 10:13:38 PDT
Changing synopsis to reflect functions being implemented under this bug.
Comment 5 Kenneth Russell 2020-07-14 14:47:25 PDT
Created attachment 404287 [details]
Patch
Comment 6 Dean Jackson 2020-07-14 15:00:11 PDT
Comment on attachment 404287 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=404287&action=review

> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:1311
> +        synthesizeGLError(
> +            GraphicsContextGL::INVALID_OPERATION, "compressedTexImage2D",
> +            "a buffer is bound to PIXEL_UNPACK_BUFFER");

We typically wouldn't split this over lines, but it's ok.
Comment 7 EWS 2020-07-14 15:37:25 PDT
Committed r264377: <https://trac.webkit.org/changeset/264377>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404287 [details].
Comment 8 Radar WebKit Bug Importer 2020-07-14 15:38:14 PDT
<rdar://problem/65568996>
Comment 9 Kenneth Russell 2020-07-14 15:53:28 PDT
Comment on attachment 404287 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=404287&action=review

>> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:1311
>> +            "a buffer is bound to PIXEL_UNPACK_BUFFER");
> 
> We typically wouldn't split this over lines, but it's ok.

Understood - this was to make emacs' auto-indenting be compatible with WebKit's style. Otherwise it would auto-indent the second line to the open parenthesis, leading to a style error.