Closed Bug 1060573 Opened 11 years ago Closed 10 years ago

WebGL: gl_FragDepth not actually implemented

Categories

(Core :: Graphics: CanvasWebGL, defect)

31 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: david.r.koes, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

Attached file fragdepth.html
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 (Beta/Release) Build ID: 20140715214327 Steps to reproduce: I tried to use gl_FragDepthEXT in a shader after calling gl.getExtension('EXT_frag_depth') to enable the extension. I have attached a short example file. Actual results: I get an "extension is disabled" error. Expected results: I would expect gl_FragDepthEXT to work, or for it not to be listed as a supported extension. In poking through the source code, the most likely source of this error message seems to be in the function extensionErrorCheck in firefox/gfx/angle/src/compiler/translator/ParseContext.cpp were the error is produced if the extension behavior is set to EBhUndefined. In firefox/gfx/angle/src/compiler/translator/Initialize.cpp several extensions, included GL_EXT_frag_depth, are set to have undefined behavior and I do not see how it would be possible for the behavior to change. The ideal fix is to implement EXT_frag_depth. If this isn't possible, it should not be listed as a supported extension.
Component: General → Canvas: WebGL
Keywords: testcase
Product: Firefox → Core
(In reply to David Koes from comment #0) > Created attachment 8481563 [details] > fragdepth.html > > User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 > Firefox/31.0 (Beta/Release) > Build ID: 20140715214327 > > Steps to reproduce: > > I tried to use gl_FragDepthEXT in a shader after calling > gl.getExtension('EXT_frag_depth') to enable the extension. I have attached > a short example file. > > > Actual results: > > I get an "extension is disabled" error. > > > Expected results: > > I would expect gl_FragDepthEXT to work, or for it not to be listed as a > supported extension. In poking through the source code, the most likely > source of this error message seems to be in the function extensionErrorCheck > in > firefox/gfx/angle/src/compiler/translator/ParseContext.cpp > were the error is produced if the extension behavior is set to EBhUndefined. > In > firefox/gfx/angle/src/compiler/translator/Initialize.cpp > several extensions, included GL_EXT_frag_depth, are set to have undefined > behavior and I do not see how it would be possible for the behavior to > change. > > The ideal fix is to implement EXT_frag_depth. If this isn't possible, it > should not be listed as a supported extension. Have you tried placing this GLSL directive in your shader code? #extension GL_EXT_frag_depth : enable
That was the problem.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: