Closed Bug 1257830 Opened 9 years ago Closed 5 years ago

Support S3 texture compression

Categories

(Core :: Graphics: CanvasWebGL, defect, P3)

44 Branch
All
macOS
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: a, Unassigned)

Details

(Whiteboard: [gfx-noted])

+++ This bug was initially created as a clone of Bug #774134 +++ Running the test demo at http://media.tojicode.com/webgl-samples/dds.html on Mac OS X 10.11.3 using either 44.0.2 or 45.0b10 results in a 3D cube with solid red faces rather than textured with the provided picture. Safari correctly renders the cube. This very same behavior has been reported for version 15 on the linux platform in Bug #774134. I tried setting *force_s3tc_enable* env variable as suggested in that ticket with no effects. The actual command run was: env force_s3tc_enable=true /Applications/Firefox.app/Contents/MacOS/firefox In both versions 44 and beta 45 the console output is: The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. dds.html Error: WebGL: getExtension('MOZ_WEBGL_compressed_texture_s3tc'): MOZ_ prefixed WebGL extension strings are deprecated. Support for them will be removed in the future. Use unprefixed extension strings. To get draft extensions, set the webgl.enable-draft-extensions preference. gl-util.js:242:23 Your browser does not support the WEBGL_compressed_texture_s3tc extension dds.html:111:25
Seems cloning the ticket carried the whole CC list field, that's now what I intended and I apologize for the accidental noise. I'm not able to edit the CC fields so any recipient will have to remove himself.
I am a bit confused by this - That error message indicates the page is asking for the MOZ_WEBGL_compressed_texture_s3tc, but if you inspect the page source it asks for WEBGL_compressed_texture_s3tc, without the MOZ_ prefix. In any case, I believe the extension should still work despite that warning. I do not have a mac to try to reproduce on. When I try to reproduce on Ubuntu 15.10 or Windows 10 it does not render anything at all. But due to different error message: > TypeError: Not allowed to define a non-configurable property on the WindowProxy object And the regression range for this is https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=84d88b744dee267865c5552527cb4acf250fc9ff&tochange=40164bf735347371cdb633cce33d2517f6a15640. Builds prior to that render the texture correctly for me. This is quite probably a different bug, though.
> TypeError: Not allowed to define a non-configurable property on the WindowProxy object That's from this bit: Object.defineProperty(window, "animationStartTime", { enumerable: true, configurable: false, writeable: false, get: getter }); That will throw in nightly and devedition, but not beta or release; see bug 1178638. If this is being a blocker in a serious way I can move the relevant code to a pref or something, instead of a build define. At least if that would be useful. > but if you inspect the page source it asks for WEBGL_compressed_texture_s3tc, without the MOZ_ prefix Sort of. It does: this.s3tc = GLUtil.getExtension(gl, "WEBGL_compressed_texture_s3tc"); where GLUtil is coming from http://media.tojicode.com/webgl-samples/js/util/gl-util.js and if you look at the implementation of getExtension in there it's this thing: getExtension: function(gl, name) { var i, ext; for(i in vendorPrefixes) { ext = gl.getExtension(vendorPrefixes[i] + name); if (ext) { return ext; } } return null; }, vendorPrefixes is defined like so: var vendorPrefixes = ["", "WEBKIT_", "MOZ_"]; So it will ask for "WEBGL_compressed_texture_s3tc" and if that fails will ask for "WEBKIT_WEBGL_compressed_texture_s3tc" and if that fails ask for "MOZ_WEBGL_compressed_texture_s3tc".
Is this demo expected to work? It doesn't seem to work on Windows. We test s3tc in continuous integration, so it shouldn't be broken on Mac. It is marked as supported on Release 45 on a Mid-2012 Retina MBP. Can you attach/paste a copy of the Graphics section of about:support?
Mentor: mcastelluccio
(In reply to Jeff Gilbert [:jgilbert] from comment #4) > Is this demo expected to work? It doesn't seem to work on Windows. It does on 44.0.2 running on Debian so I'm going with "yes". > We test s3tc in continuous integration, so it shouldn't be broken on Mac. It > is marked as supported on Release 45 on a Mid-2012 Retina MBP. > Can you attach/paste a copy of the Graphics section of about:support? Sure, here you go: Graphics Asynchronous Pan/Zoom none Device ID 0x0126 GPU Accelerated Windows 2/2 OpenGL (OMTC) Supports Hardware H264 Decoding No; Vendor ID 0x8086 WebGL Renderer Intel Inc. -- Intel HD Graphics 3000 OpenGL Engine windowLayerManagerRemote true AzureCanvasBackend skia AzureContentBackend quartz AzureFallbackCanvasBackend none AzureSkiaAccelerated 1 It's a 2011 MBP
(In reply to Jamie Nicol [:jnicol] from comment #2) > When I try to reproduce on > Ubuntu 15.10 or Windows 10 it does not render anything at all. But due to > different error message: I saw that as well as I tried nightly 48.x on OS X before filing the ticket, the demo wasn't able to initialize GL at all on my setup. I felt that was a different than this rotating-GL-cube-but-lack-of-texture so I kept this ticket limited to stable and beta, respectively 44 and 45 when I opened the ticket, now 45 has made to stable on Mac as well.
Whiteboard: [gfx-noted]
Flags: needinfo?(jgilbert)

Works on my MBP. Please let me know if you still see this, so that we can reopen this investigation!

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Flags: needinfo?(jgilbert)
Resolution: --- → WORKSFORME

I checked using FireFox 73 on macOS 10.15 and the issue is not present anymore.

You need to log in before you can comment on or make changes to this bug.