Community
cancel
Showing results for 
Search instead for 
Did you mean: 
TKoen
Beginner
177 Views

Bad performance when using texture sampled value in vertex shader on Intel Iris Plus

I am using a Surface book 3, which uses Intel Iris Plus Graphics. My current driver is 26.20.100.7873 as it is the latest as supported by Windows on my device.

I noticed extremely bad performance when using OpenGL and sampling a texture in the vertex shader. 

 

The performance penalty only occurs when I actually use the sampled value to determine my gl_Position. Here is a simplified example that causes the performance penalty:

float elevation = texture(elevationSampler, uv).r;
vec4 worldPosition = instanceModelMatrix * vec4(x, elevation, z, 1);
gl_Position = ViewProjection * worldPosition;

 

The following code does not cause any performance hits. I assume because the compiler understands that the sampled value isn't actually needed. In any case the elevation will be 0.0.

float elevation = texture(elevationSampler, uv).r;
if(elevation > 100)
{
    elevation = 0.0;
}
else
{
    elevation = 0.0;
}

vec4 worldPosition = instanceModelMatrix * vec4(x, elevation, z, 1);
gl_Position = ViewProjection * worldPosition;

 

When I change the code to the code below, the elevation will also always end up as 0.0, because the sampled value is always between 0 and 1. The compiler doesn't know this however without actually sampling the texture. In this case the performance is really bad again. So the only difference between the second and third example is the fact that the texture is sampled. I can use the sampled value and pass it to the fragment shader without any problems, as long as I don't use it for gl_Position.

float elevation = texture(elevationSampler, uv).r;
if(elevation > 100)
{
    // This line is never reached as the sampled elevation is always between 0 and 1.
    elevation = 0.5;
}
else
{
    elevation = 0.0;
}

vec4 worldPosition = instanceModelMatrix * vec4(x, elevation, z, 1);
gl_Position = ViewProjection * worldPosition;

 

I have the same issue on the Surface Pro 7 (which uses the same hardware). As far as I know, this problem does not occur on other hardware. Even the Surface Pro 6 works without any problems. It uses 'Intel(R) Iris(R) Plus Graphics 640'.

 

It this a known issue? Or is there something I can do on my side to prevent this slow performance?

0 Kudos
3 Replies
Alberto_Sykes
Employee
161 Views

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


In reference to your question, just to let you know, normally this kind of inquiries are supported by the Intel® Developer Zone site, so you can always visit, sign in and submit your topic in there for further assistance on this matter:

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


However, in order to try to improve the performance, we can try to install the latest Intel® Generic Graphics driver for the Intel® Iris® Plus Graphics controller which is version 27.20.100.8476:

https://downloadcenter.intel.com/download/29784/Intel-Graphics-Windows-10-DCH-Drivers?product=197532...


Any questions, please let me know.


Regards,

Albert R.


Intel Customer Support Technician

A Contingent Worker at Intel


TKoen
Beginner
153 Views

Hi Alberto,

 

Thanks for your reply. When I click your link, I end up in the Developer Zone, but I don't find a way to ask a question. I always end up back on this Community forum. Can you point me to exactly where I can submit this issue? Is it in 'My Intel Dashboard'?

 

Regarding the driver update: I have already tried this. The performance is still bad, but with the newer drivers I also get a lot of visual glitches .

Alberto_Sykes
Employee
143 Views

Hi TKoen, You are very welcome, thank you very much for sharing those details.


Yes, of course, actually as you mentioned, you will be directed to the Intel® Communities, just make sure that you are under "Software Products" as in the link below, then scroll down a little bit and choose "Post a Question":

https://community.intel.com/t5/Software-Products/ct-p/software-products


In this case, since the problem still remains after installing driver version 27.20.100.8476 then, besides submitting your question in our web site you can also get in contact Microsoft to report this scenario since the problem seems to be related to the driver and they are the ones to provide the proper drivers for your platform:

https://support.microsoft.com/en-us/contactus/


Regards,

Albert R.


Intel Customer Support Technician

A Contingent Worker at Intel


Reply