If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Implement WEBGL_compressed_texture_pvrtc

RESOLVED FIXED in mozilla18

Status

()

Core
Canvas: WebGL
RESOLVED FIXED
6 years ago
2 years ago

People

(Reporter: bjacob, Assigned: bjacob)

Tracking

(Blocks: 2 bugs, {dev-doc-complete})

unspecified
mozilla18
dev-doc-complete
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: webgl-extension webgl-next [k9o:p2:fx?] [games:p1])

Attachments

(1 attachment)

We can't start implementing them yet as they don't have a draft-status spec . We need to make a spec proposal, submit it to the public_webgl list, and get it accepted as a draft before we can start implementing with MOZ_ prefix.
(Assignee)

Updated

6 years ago
OS: Windows 7 → All
Hardware: x86_64 → All

Updated

6 years ago
Depends on: 748548

Updated

6 years ago
Blocks: 748548
No longer depends on: 748548

Updated

6 years ago
Whiteboard: webgl-extension webgl-next → webgl-extension webgl-next [k9o:p2:fx?][games:p2]

Updated

6 years ago
Whiteboard: webgl-extension webgl-next [k9o:p2:fx?][games:p2] → webgl-extension webgl-next [k9o:p2:fx?][games:p1]

Updated

6 years ago
Whiteboard: webgl-extension webgl-next [k9o:p2:fx?][games:p1] → webgl-extension webgl-next [k9o:p2:fx?] [games:p1]
(Assignee)

Comment 1

5 years ago
PVRTC proposal has been sent to the list.
https://www.khronos.org/registry/webgl/extensions/proposals/WEBGL_compressed_texture_pvrtc/

Regarding ATC we have agreed on the public_webgl list that it being officially undocumented (see http://www.khronos.org/registry/gles/extensions/AMD/AMD_compressed_ATC_texture.txt) makes it a non-starter for WebGL.

Therefore it makes sense to repurpose this bug as the PVRTC implementation bug.
(Assignee)

Updated

5 years ago
Summary: Tracking bug for WebGL PVRTC and ATC compressed texture formats → Implement WEBGL_compressed_texture_pvrtc (can't land until the spec proposal is promoted to draft)

Updated

5 years ago
Blocks: 710398

Comment 2

5 years ago
Do we have any information about the compressed texture formats currently supported by Android devices in the wild?

Updated

5 years ago
Keywords: dev-doc-needed
(Assignee)

Comment 3

5 years ago
Got Qualcomm to publish the ATC buffer size formula -- see public_webgl archive for September. Implementation in bug 790712.
(Assignee)

Comment 4

5 years ago
(In reply to Martin Best (:mbest) from comment #2)
> Do we have any information about the compressed texture formats currently
> supported by Android devices in the wild?

No precise numbers, but we know that S3TC+PVRTC+ATC allow us to cover most devices. Qualcomm GPUs are ATC-only, while some other devices don't support ATC.
(Assignee)

Comment 5

5 years ago
The extension has been promoted to draft:
http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_pvrtc/

Can now implement -- writing the patch now.
Assignee: nobody → bjacob
Summary: Implement WEBGL_compressed_texture_pvrtc (can't land until the spec proposal is promoted to draft) → Implement WEBGL_compressed_texture_pvrtc
(Assignee)

Comment 6

5 years ago
Created attachment 664105 [details] [diff] [review]
pvrtc

This applies on top of the ATC patch, which refactored ValidateCompressedTextureSize a bit.

This patch further refactors this by having ValidateCompressedTextureSize call ValidateLevelWidthHeightForTarget, rather than relying on the caller to call both. This fixes a bug whereby we weren't checking for negative / out-of-range texture dimensions in compressedTexSubImage2D, afaict.
Attachment #664105 - Flags: review?(jgilbert)
Comment on attachment 664105 [details] [diff] [review]
pvrtc

Review of attachment 664105 [details] [diff] [review]:
-----------------------------------------------------------------

An optional nit, but otherwise good.

::: gfx/gl/GLDefs.h
@@ +3101,5 @@
> +// IMG_texture_compression_pvrtc
> +#define LOCAL_GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG            0x8C00
> +#define LOCAL_GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG            0x8C01
> +#define LOCAL_GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG           0x8C02
> +#define LOCAL_GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG           0x8C03

Prefer to drop vendor suffixes for GL constants for internal use.
Attachment #664105 - Flags: review?(jgilbert) → review+
(Assignee)

Comment 8

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/33f80363eab3
Target Milestone: --- → mozilla18
https://hg.mozilla.org/mozilla-central/rev/33f80363eab3
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED

Comment 10

5 years ago
I think this and Bug 790712 have broken my Thunderbird build using ac_add_options --disable-webgl. Do you need to update content/canvas/src/WebGLContextNotSupported.cpp?
Yes we do! Thanks for the heads-up.
http://hg.mozilla.org/integration/mozilla-inbound/rev/fc7098623145
https://hg.mozilla.org/mozilla-central/rev/fc7098623145
https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_compressed_texture_pvrtc
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/compressedTexImage2D
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/compressedTexSubImage2D
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.