Closed Bug 750862 Opened 12 years ago Closed 12 years ago

Implement WEBGL_compressed_texture_pvrtc

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: bjacob, Assigned: bjacob)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, Whiteboard: webgl-extension webgl-next [k9o:p2:fx?] [games:p1])

Attachments

(1 file)

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.
OS: Windows 7 → All
Hardware: x86_64 → All
Depends on: webgl-k9o
Blocks: webgl-k9o
No longer depends on: webgl-k9o
Whiteboard: webgl-extension webgl-next → webgl-extension webgl-next [k9o:p2:fx?][games:p2]
Whiteboard: webgl-extension webgl-next [k9o:p2:fx?][games:p2] → webgl-extension webgl-next [k9o:p2:fx?][games:p1]
Whiteboard: webgl-extension webgl-next [k9o:p2:fx?][games:p1] → webgl-extension webgl-next [k9o:p2:fx?] [games:p1]
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.
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)
Blocks: gecko-games
Do we have any information about the compressed texture formats currently supported by Android devices in the wild?
Keywords: dev-doc-needed
Got Qualcomm to publish the ATC buffer size formula -- see public_webgl archive for September. Implementation in bug 790712.
(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.
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
Attached patch pvrtcSplinter Review
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+
https://hg.mozilla.org/mozilla-central/rev/33f80363eab3
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
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.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: