LINE_WIDTH > 1.0 is INVALID_VALUE in core profiles

RESOLVED FIXED in Firefox 51

Status

()

P1
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jgilbert, Assigned: jgilbert)

Tracking

(Blocks: 1 bug)

unspecified
mozilla52
Points:
---

Firefox Tracking Flags

(firefox51 fixed, firefox52 fixed)

Details

(Whiteboard: gfx-noted)

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

Comment hidden (empty)
Comment hidden (mozreview-request)

Comment 2

2 years ago
mozreview-review
Comment on attachment 8795964 [details]
Bug 1306172 - Don't pass LINE_WIDTH>1.0 to core profiles. -

https://reviewboard.mozilla.org/r/81940/#review80520

::: dom/canvas/WebGLContextGL.cpp:2413
(Diff revision 1)
>  {
>      if (IsContextLost())
>          return;
>  
>      // Doing it this way instead of `if (width <= 0.0)` handles NaNs.
>      const bool isValid = width > 0.0;

0.0f?

::: dom/canvas/WebGLContextGL.cpp:2421
(Diff revision 1)
>          return;
>      }
>  
> +    mLineWidth = width;
> +
> +    if (gl->IsCoreProfile() && width > 1.0) {

Please write down a comment to show why we need to do this.

Is it for the following spec?

https://www.opengl.org/registry/doc/glspec44.core.pdf
OpenGL 4.4 (Core Profile) - March 19, 2014
p.651 D.2.1
Wide lines - LineWidth values greater than 1.0 will generate an INVALID_VALUE error

::: dom/canvas/WebGLContextGL.cpp:2422
(Diff revision 1)
>      }
>  
> +    mLineWidth = width;
> +
> +    if (gl->IsCoreProfile() && width > 1.0) {
> +        width = 1.0;

How about compare with 1.0f instead of 1.0 (double)?

::: dom/canvas/WebGLContextValidate.cpp:675
(Diff revision 1)
>      mDepthClearValue = 1.f;
>      mStencilClearValue = 0;
>      mStencilRefFront = 0;
>      mStencilRefBack = 0;
>  
> +    mLineWidth = 1.0;

How about init with 1.0f for GLfloat?
Attachment #8795964 - Flags: review?(hshih) → review+
(Assignee)

Updated

2 years ago
Blocks: 1306454

Comment 3

2 years ago
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0cc441ce2c8c
Don't pass LINE_WIDTH>1.0 to core profiles. - r=jerry

Comment 4

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/0cc441ce2c8c
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox52: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
(Assignee)

Updated

2 years ago
status-firefox51: --- → affected
(Assignee)

Comment 5

2 years ago
Comment on attachment 8795964 [details]
Bug 1306172 - Don't pass LINE_WIDTH>1.0 to core profiles. -

Approval Request Comment
[Feature/regressing bug #]: webgl2
[User impact if declined]:
[Describe test coverage new/current, TreeHerder]:
[Risks and why]: 
[String/UUID change made/needed]:
Attachment #8795964 - Flags: approval-mozilla-aurora?
Comment on attachment 8795964 [details]
Bug 1306172 - Don't pass LINE_WIDTH>1.0 to core profiles. -

WebGL 2 is the feature we want to ship in 51. Aurora51+.
Attachment #8795964 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+

Comment 7

2 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-aurora/rev/06660e22513d
status-firefox51: affected → fixed
You need to log in before you can comment on or make changes to this bug.