Open Bug 896996 Opened 11 years ago Updated 2 years ago

WebGL Khronos Conformance test float_literal.vert.html fails because of FF shader parsing issue

Categories

(Core :: Graphics, defect)

23 Branch
defect

Tracking

()

People

(Reporter: bartosz.baranowski, Unassigned)

References

Details

Attachments

(1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 (Beta/Release)
Build ID: 20130618035212

Steps to reproduce:

Run the followinf WebGL Khronos cert test:

http://www.khronos.org/registry/webgl/conformance-suites/1.0.2/conformance/glsl/literals/float_literal.vert.html



Actual results:

The test is failing because of shader compilation issue NOT related to the 3D driver.

It uses the following shader:
void main() {
    float zero = 0.0;
    float fractionalConstant = 1.0;
    float fractionalConstantExponent = 1.0e1;
    float fractionalConstantPosExponent = 1.0e+1;
    float fractionalConstantNegExponent = 1.0e-1;
    float digitSequenceExponent = 1e1;
    float digitSequencePosExponent = 1e+1;
    float digitSequenceNegExponent = 1e-1;
    float pointDigit = .1;
    float digitPoint= 1.;
    float upperCaseExponent = 1.0E1;
    highp float posInRange = 4611686018427387903.; // 2^62 - 1
    highp float posOutRange = 4611686018427387905.; // 2^62 + 1
    highp float posHuge = 1E100;
    highp float negInRange = -4611686018427387903.;
    highp float negOutRange = -4611686018427387905.;
    highp float negHuge = 1E100;
}

Which is being parsed and sent by FF Android to the driver as:

void main(){
    highp float zero = 0.0;
    highp float fractionalConstant = 1.0;
    highp float fractionalConstantExponent = 10.0;
    highp float fractionalConstantPosExponent = 10.0;
    highp float fractionalConstantNegExponent = 0.1;
    highp float digitSequenceExponent = 10.0;
    highp float digitSequencePosExponent = 10.0;
    highp float digitSequenceNegExponent = 0.1;
    highp float pointDigit = 0.1;
    highp float digitPoint = 1.0;
    highp float upperCaseExponent = 10.0;
    highp float posInRange = 4611686018427387904.0;
    highp float posOutRange = 4611686018427387904.0;
    highp float posHuge = Inf;
    highp float negInRange = -4611686018427387904.0;
    highp float negOutRange = -4611686018427387904.0;
    highp float negHuge = Inf;
}

The shader does not compile because of "highp float posHuge = Inf;" and "highp float negHuge = Inf;" variables that have "Inf" value which is NOT declared.


Expected results:

The shader should be compiled successfully - the "Inf" value is not acceptable, it should be converted (clamped) to "MAX_FLOAT" value depending on the system, or any other reasonable value.

Android Chrome does not have any issues with this test. Reproducible on x86 and Tegra.
Severity: normal → major
OS: Windows 7 → Android
Hardware: x86_64 → All
This test case is a blocker for Khronos WebGL certification on FF Android
Severity: major → blocker
Component: General → Graphics
Product: Firefox for Android → Core
Version: Firefox 23 → 23 Branch
(In reply to bartosz.baranowski from comment #1)
> This test case is a blocker for Khronos WebGL certification on FF Android

This is true, but not what we use 'Blocker' for, since most bugs block *something*. 'Blocker' is for whether or not a bug should block a release.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: blocker → normal
Assignee: nobody → jgilbert
Attachment #8575707 - Flags: review?(dglastonbury)
Huh, it looks like this bug is different than I expected.
See Also: → 1141875
Comment on attachment 8575707 [details] [diff] [review]
0001-Enable-gl_Position-init-in-ANGLE-transpiler.patch

This bug is for precision issues in the ANGLE translation, not whether gl_Position is written to.
Attachment #8575707 - Attachment is obsolete: true
Attachment #8575707 - Flags: review?(dglastonbury)
Assignee: jgilbert → nobody
This is not just an Android platform issue. With Ubuntu 14.10 
OpenGL renderer string: GeForce GTX 650/PCIe/SSE2
OpenGL core profile version string: 4.4.0 NVIDIA 331.113

test: parsing floating point literals should succeed
test vertex shader
default fragment shader
FAIL [unexpected link status] parsing floating point literals should succeed

Chrome passes all 1.0.2 tests including this one.
Yes, I have been reproing this on my linux NV workstation.
OS: Android → All
I've tested this to pass successfully on the following device configurations:
 - SPARK, GIADA, MACBOOK_AIR_OSX, MACBOOK_AIR_WIN, MACBOOK_PRO_OSX, MACBOOK_PRO_WIN, MACMINI, MACPRO, NEXUS-4, NEXUS-5, SURFACE, WINDBOX, HASWELL, HPOMEN (see https://bugzilla.mozilla.org/show_bug.cgi?id=1178601 for hardware configuration details of these systems)

so perhaps this has since been fixed in the general case?

I do still see this fail on a single configuration with Nexus 10/Android/ARM Mali, see https://bugzilla.mozilla.org/show_bug.cgi?id=1178854 , but the root cause might be different than the general problem described here? Can someone still reproduce on other types of hardware?
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: