New issue
Advanced search Search tips

Issue 869615 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Compat



Sign in to add a comment

side effect of uintBitsToFloat(0x80000000U) on other null vec4 components

Reported by fabrice....@gmail.com, Jul 31

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Safari/537.36

Example URL:
https://www.shadertoy.com/view/MttczS

Steps to reproduce the problem:
store a vec4 in a buffer
with one of the component is set to uintBitsToFloat(0x80000000U)

What is the expected behavior?
the vec4 is correctly stored

What went wrong?
the null components of the vec4 are set to 0x80000000U as well.
( sometime other wrong thing can occurs too, see URL)

The bug only occurs when the vec4 is stored to buffer.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 68.0.3440.75  Channel: beta
OS Version: 
Flash Version: Shockwave Flash 30.0 r0

May somebody please set the flags	
Blink>WebGL
Internals>GPU
?  thanks !
 
attached image:
what I see on linux. Circled: wrong values (side effects of other component).

p8JHLXB.png
17.9 KB View Download
Labels: Needs-Triage-M68
Cc: phanindra.mandapaka@chromium.org
Labels: Needs-Feedback Triaged-ET
Tested this issue on reported chrome 68.0.3440.75 and latest chrome stable 68.0.3440.84 using Ubuntu 17.10. Attaching screen-cast for reference.
Steps:
------
1. Launched reported chrome
2. Navigated given URL " https://www.shadertoy.com/view/MttczS "
3. Observed the values 
As we are observed that different values 

@Reporter: Requesting you to please check and confirm if anything is missed from our end in triaging the issue. As we are not sure about the issue if possible provide screen-cast it will help us for further investigating it.
Could you please upgrade to latest chrome stable 68.0.3440.84, you can download latest chrome builds 
here:" https://www.chromium.org/getting-involved/dev-channel ".  

Thanks..!
869615.webm
7.4 MB View Download
Components: Blink>WebGL
Status: ExternalDependency (was: Unconfirmed)
This is not a good bug report. What is a "buffer" in this terminology? Is it a texture which is procedurally generated on ShaderToy?

A better reduced test case is needed which is outside of ShaderToy. Some similar sample test cases can be found here:
https://github.com/KhronosGroup/WebGL/tree/master/sdk/tests/conformance2/rendering

and here:
https://github.com/KhronosGroup/WebGL/tree/master/sdk/tests/conformance2/glsl3

In the conformance2/glsl3/ directory and harness, it's possible to write shaders that do rendering tests, for example:
https://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/conformance2/glsl3/short-circuiting-in-loop-condition.html

Outputting opaque green (0, 1, 0, 1) causes the test to pass.

@ phanindra
strange. 
What is your GPU  ? here, nvidia (2 different on laptop & desktop), driver 396.45
my chrome is now Version 68.0.3440.84 (Build officiel) (64 bits), bug still there.

@kbr:
yes, shadertoy "buffers" are textures written by a 1st shader (cf tabs).
About using Shadertoy: sorry, it's the only tool I have. ( Some other participants here are usually happy with my shadertoy-based acid tests ;-) )
Owner: kbr@chromium.org
Status: WontFix (was: ExternalDependency)
fabrice.neyret@: ShaderToy might be setting sampling parameters on these textures in such a way that you are observing interpolation between adjacent texels.

I'm sorry but we don't have the time to reduce this test case. Please reopen this bug if you can make the time to do so.

@kbr: 
no it's not interpolated. beside, I use texelFetch.

please let this open up to olli says something about it: he is the guy who knows, on these kind of topics.
Owner: oetu...@nvidia.com
Status: Untriaged (was: WontFix)
OK. Olli, do you have time to triage and potentially reduce this?

Owner: ----
Unfortunately I won't have time to look at this, unassigning myself.
Labels: -Pri-2 Pri-3

Comment 12 by kkinnu...@nvidia.com, Yesterday (46 hours ago)

Fabrice, thanks for the repro.

Would you be able to make a bit reduced version of the testcase, since you know it better than me?

Some tips, check if applicable:
- document a simple comment on what the thing does in high level
- make the repro demonstrate the failure by default. (This repro does, some others required some edits)
- instead of using all color channels, use just the ones that reproduce an issue
- reproduce one issue per repro. E.g. don't say "uncomment this to create this variance, swap this to that in order create that variant."
- don't use elaborate macros that expand to other macros that call functions. Unless the bug is in the macro, just write plain code. if it repeats, to a degree, repeating is better than requiring the reader to do proprocessor expansion in their head.
- be extra careful of the undefined behavior
- imo the analysis ui does not need to be present on the repro. simply component on == ok, component off = bug is informative and simple, or some sort of derivation of that (green=ok, red=failure).

For this particular repro: 

I can repro the white pixels on NV 416.34 GTX1080. However, it's not clear this is not undefined behavior.

If you test uintToFloat with particular value, be sure to add a simple comment what you expect the values to be in float, e.g. what you expect the function to return. I think some of the values might be undefined: 0xFFFF0000 as float might be undefined? 

I'm not an expert, but I seem to remember conditional texture fetches having undefined behavior with non-uniform control flow. So maybe make sure that the reader would see that it's obvious that there's no such undefinedness bugs in the repro case. Possibly textureFetch does not suffer from this, but it's hard to analyze with all the macros.

It is sort of probable that there's no bug in uintToFloat -> buffer -> floatToUint. It might be that the incorrect values hit the buffer. Alternatively, the correct values hit the buffer, but the load/conversion is the problem. So you might try to repro these two in isolation: A) Generate the values to the buffer in normal terms, but visualize the values in the repro terms. B) Generate the values in the repro terms, but visualize the values in normal terms.




Comment 13 by fabrice....@gmail.com, Yesterday (36 hours ago)

On 21/01/2019 13:13, kkinnu… via monorail wrote:

bug seems multiple. -> I've isolated a first case implying const uvec 
conversion.  new acid test:

https://www.shadertoy.com/view/wdSGRh

new bug report:

https://bugs.chromium.org/p/chromium/issues/detail?id=923949

Sign in to add a comment