Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
21519 Discussions

WebGL context is lost when clearing stencil buffer

focego
Beginner
6,980 Views

Our webgl games crashes "randomly" on machines with intel graphics. My theory is that there is a leak when clearing the stencil with a non 0xff bitmask.
Here is what I found so far:

Description:
The WebGL context is lost and not recovered again, when performing certain stencil buffer clears.

Hardware:
The issue has been reported on a number of devices including desktops, NUCs and laptops. With the common factor being Intel graphics.

Software:
Intel Drivers:
27.20.100.8280 - This version works
27.20.100.8336 - This and all versions after fail

Browser:
* Firefox - works
* Chrome, Edge(chromium) - fails
Note the issue only happens when using the default D3D11 rendering and not when using D3D9 (set using the flags)

How to repro:
1. Clear the stencil at least once per frame, with a non zero, non 0xff mask.
2. Let it run for 1-5 minutes
3. See that the context is lost and not recovered again

Source Code:
https://codepen.io/fredrikolsson/pen/zYNRaLB

 

<!doctype html>
<html>
	<body>
		<canvas id="glcanvas" width="1024" height="1024"/>
	</body>
	<script>
		const canvas = document.querySelector('#glcanvas');
		const gl = canvas.getContext('webgl', {'stencil': true});
		gl.enable(gl.STENCIL_TEST);
		let frame = 0;
		(function loop() {
			gl.clearColor((++frame * 0.01) % 1.0, 0.0, 0.0, 1.0);
			gl.clear(gl.COLOR_BUFFER_BIT);
			for (let i=0; i<8; i++) {
				gl.stencilMask(1 << i);
				gl.clear(gl.STENCIL_BUFFER_BIT);
			}
			requestAnimationFrame(loop);
		})();
	</script>
</html>

 

 

0 Kudos
9 Replies
Alberto_Sykes
Employee
6,962 Views

focego, Thank you for posting in the Intel® Communities Support.


In order for us to provide the most accurate assistance on this matter, we just wanted to confirm a few details about your system:

What is the model of the motherboard?

If this is a laptop, what is the model of it?

This problem, does it happen with all the games or just with some of them? Please provide the name of the games.

Is this a new computer?

Which Windows* version are you using?

Please attach the SSU report so we can verify further details about the components in your platform, please check all the options in the report including the one that says "3rd party software logs":

https://downloadcenter.intel.com/download/25293/Intel-System-Support-Utility-for-Windows-?product=91600


Any questions, please let me know.


Regards,

Albert R.


Intel Customer Support Technician


0 Kudos
focego
Beginner
6,950 Views

As I wrote, this happens on several machines here at the office and it's been reported by several of our customers as well. But I'll send you the info from my test-unit for this bug.

Model: NUC8i7BEH

What games: It's a general bug in the WebGL driver. All games and applications using the stencil this way are affected.

Is this a new computer?: I would guess about two years old

Which Windows* version: Windows 10 Pro (19041)

0 Kudos
Alberto_Sykes
Employee
6,938 Views

focego, Thank you very much for providing that information and the SSU report.


We will do further research on this matter, as soon as I get any updates I will post all the details on this thread.


Regards,

Albert R.


Intel Customer Support Technician


0 Kudos
Alberto_Sykes
Employee
6,918 Views

Hello focego, I just received an update on this matter.


Just to confirm, are you using Intel® Media SDK?


Regards,

Albert R.


Intel Customer Support Technician


0 Kudos
focego
Beginner
6,900 Views

Hey Albert,

No, I'm not using the Media SDK.

Just using WebGL directly in Chrome.

0 Kudos
David_G_Intel
Moderator
6,886 Views

Thank you for the update focego

We are working on this request, the updates will be posted on the thread.


Regards,

Albert R.

Intel Customer Support Technician


0 Kudos
Alberto_Sykes
Employee
6,859 Views

Hello focego, I just received another update on this topic.


After reviewing the case we determined that the issue seems to be totally related to the software developer, so for this scenario customer we recommend to get in contact directly with the Chrome developers for further assistance on this matter or also you can always submit your inquiry in our Intel® Developer Zone web site:

https://support.google.com/chrome/?hl=en#topic=9796470

https://software.intel.com/content/www/us/en/develop/home.html


Regards,

Albert R.


Intel Customer Support Technician


0 Kudos
focego
Beginner
6,852 Views

Thanks for the update Albert.

I guess I posted it in the wrong forum. It's not obvious if driver bugs should be posted under "Hardware" or under "Software". I'll repost the issue in software and hope they can resolve it.

I don't see the need for submitting it to google as testing with an old driver (27.20.100.8280) works with both the current chrome and a 2 year old version. Whereas testing with a new driver (27.20.100.8336+) fails with both the current chrome and the 2 year old version. 

0 Kudos
Alberto_Sykes
Employee
6,844 Views

focego, No problem at all, you are very welcome, thank you very much for sharing those details.

 

Yes, please post your inquiry under "Software" support for them to try to find a fix for this scenario, they should be able to further assist you with this matter.

 

"I don't see the need for submitting it to google as testing with an old driver (27.20.100.8280) works with both the current chrome and a 2 year old version. Whereas testing with a new driver (27.20.100.8336+) fails with both the current chrome and the 2 year old version.", that is no problem, "Software" support will provide further technical assistance.

 

Regards,

Albert R.

 

Intel Customer Support Technician

 

0 Kudos
Reply