Closed Bug 1325238 Opened 3 years ago Closed 3 years ago

ShCompileOptions is now uint64_t

Categories

(Core :: Canvas: WebGL, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox51 --- fixed
firefox52 --- fixed
firefox53 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

Details

(Whiteboard: gfx-noted)

Attachments

(1 file)

We should just use this type directly.
Comment on attachment 8820973 [details]
Bug 1325238 - Use ShCompileOptions type instead of int. -

https://reviewboard.mozilla.org/r/100350/#review100904

::: dom/canvas/WebGLShaderValidator.cpp:80
(Diff revision 1)
> +        options ^= SH_EXPAND_SELECT_HLSL_INTEGER_POW_EXPRESSIONS;
> +        options ^= SH_HLSL_GET_DIMENSIONS_IGNORES_BASE_LEVEL;
> +
> +        options ^= SH_DONT_REMOVE_INVARIANT_FOR_FRAGMENT_INPUT;
> +        options ^= SH_REMOVE_INVARIANT_AND_CENTROID_FOR_ESSL3;
> +    }

I would like to make sure why you don't use |= operator instead of ^=. IMHO, it would be more intuitive.
Comment on attachment 8820973 [details]
Bug 1325238 - Use ShCompileOptions type instead of int. -

https://reviewboard.mozilla.org/r/100350/#review100904

> I would like to make sure why you don't use |= operator instead of ^=. IMHO, it would be more intuitive.

I'm de-selecting bits from -1 (all-ones), so I'd need to do &= ~flag, which is more error-prone.
Comment on attachment 8820973 [details]
Bug 1325238 - Use ShCompileOptions type instead of int. -

https://reviewboard.mozilla.org/r/100350/#review101394
Attachment #8820973 - Flags: review?(dmu) → review+
Comment on attachment 8820973 [details]
Bug 1325238 - Use ShCompileOptions type instead of int. -

https://reviewboard.mozilla.org/r/100350/#review100904

> I'm de-selecting bits from -1 (all-ones), so I'd need to do &= ~flag, which is more error-prone.

Well, it looks like you wanna deselect bits from all options. I suppose you wanna add options from zero before.
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc4aee734f88
Use ShCompileOptions type instead of int. - r=daoshengmu
https://hg.mozilla.org/mozilla-central/rev/fc4aee734f88
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.