Developing Games on Intel Graphics
If you are gaming on graphics integrated in your Intel Processor, this is the place for you! Find answers to your questions or post your issues with PC games
510 Discussions

Adding "discard" after "break" in WebGL (ANGLE) shader causes wrong image to be rendered

Alastair_D_1
Beginner
1,815 Views

The files associated with the bug are here:

https://github.com/mc-imperial/shader-compiler-bugs/tree/master/Intel-HD-Graphics-520-WebGL-ANGLE/wrong_images/large-v100-webgl-e404f04495815667_inv_variant_71

System Setup Information:
-----------------------------------------

System Used: Dell XPS
CPU SKU: i7
GPU SKU: HD 520
Processor Line: U-Series
System BIOS Version: Dell Inc. 1.0.0, 10/09/2015
CMOS settings: I can check on request
Graphics Driver Version: 20.19.15.4501
GOP/VBIOS Version: Intel Video BIOS
Operating System: Windows 10
OS Version: Pro
API: WebGL 1.0 (OpenGL ES 2.0 Chromium), WebGL vendor: Google Inc., WebGL renderer: ANGLE (Intel(R) HD Graphics 520 Direct3D11 vs_5_0 ps_5_0), broswer version: Google Chrome Version 54.0.2840.99 m (64-bit)
Occurs on non-Intel GPUs?: Haven't tried

 

Steps to Reproduce:
-------------------------------
1. Open the Chrome browser
2. Navigate to http://htmlpreview.github.io/?https://github.com/mc-imperial/shader-compiler-bugs/blob/master/utils/webgl/webgl_viewer.html
3. Paste the contents of original.frag into the text box
4. Click "Execute"; the rendered image is the expected image for this shader, and should look like original.png
5. Paste the contents of variant.frag into the text box
6. Click "Execute"; you should find that the rendered image is significantly different from the expected image rendered previously

Expected Results:
-------------------------------
Both shaders should render an image that looks like original.png.  This is because the only difference between the .frag files is:

- There is a "discard" statement after a "break" statement in
  variant.frag; because the "discard" statement is unreachable code,
  this should have no effect on computation.

Actual Results:
-------------------------------
The shaders render significantly different images, which they should not.

Additional Information:
-------------------------------
N/A

 

0 Kudos
4 Replies
Alastair_D_1
Beginner
1,815 Views

I had meant to post this under here:

https://software.intel.com/en-us/forums/graphics-driver-bug-reporting

Is it possible for it to be moved there?

0 Kudos
Michael_C_Intel2
Employee
1,815 Views

Hi Alastair,

Can you see if the issue reproduces on this new driver? 

https://downloadcenter.intel.com/download/26404/Intel-Graphics-Driver-15-45-

I will move this to the sub forum for you.

-Michael

 

0 Kudos
Alastair_D_1
Beginner
1,815 Views

Hi Michael

Yes, this does reproduce under the new driver.  The symptoms are a little different, but having the "discard" after the break or not completely changes what is rendered.

I'd be interested to know what the issue is.

Thanks

Ally

0 Kudos
Michael_C_Intel2
Employee
1,815 Views

Thanks! I have the ticket filed and will the driver team to investigate. 

0 Kudos
Reply