Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to make identical bundles on different nodes #4601

Merged
merged 3 commits into from
Feb 25, 2020
Merged

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Feb 25, 2020

Possibly since v.1.36.1 a random number was attached to one of the GLSL variables of shader programs used in gl-line3d module e.g. encode_float_1540259130(pixelArcLength) resulting in non-deterministic bundles as reported in https://github.com/plotly/streambed/issues/13816.

This PR fixes this issue by removing one linking step within gl-line3d module.

@plotly/plotly_js
cc: @nicolaskruchten @dmt0 @tarzzz

@etpinard
Copy link
Contributor

So, if I understand correctly, browserify + glslify currently bundles the encode_float function with some additional hash (e.g. encode_float_1540259130 or encode_float_1604150559) leading to bundles with potentially different checksum output. @archmoj is this correct?

If so, what's special about the shader program in glsl-read-float? Why don't other glsl packages exhibit this behaviour? Shouldn't we instead try to solve this problem at the glslify-level? Maybe we can set a flag that makes the additional hash reproducible?

@archmoj
Copy link
Contributor Author

archmoj commented Feb 25, 2020

So, if I understand correctly, browserify + glslify currently bundles the encode_float function with some additional hash (e.g. encode_float_1540259130 or encode_float_1604150559) leading to bundles with potentially different checksum output. @archmoj is this correct?

Correct.

@archmoj
Copy link
Contributor Author

archmoj commented Feb 25, 2020

If so, what's special about the shader program in glsl-read-float? Why don't other glsl packages exhibit this behaviour?

gl-line3d is the only module that uses glsl-read-float module. And there is a linking problem between glsl-read-float and gl-line3d due to casting doubles to shorts between two shaders on different hardware.

@archmoj
Copy link
Contributor Author

archmoj commented Feb 25, 2020

Shouldn't we instead try to solve this problem at the glslify-level?

We could. But that require spending more time debugging.
I suggest we open an issue on gl-line3d or glsl-read-float when/if this PR merged.

@etpinard
Copy link
Contributor

I suggest we open an issue on gl-line3d or glsl-read-float when/if this PR merged.

yep, good idea.

@etpinard
Copy link
Contributor

💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants