Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Very slow shader creation while running EXE from Visual Studio (2008)

Ronan_Bel
Beginner
832 Views
Hi, I'm trying to develop some shader code on a Sandy bridge + HD graphics 3000 hardware using Visual studio 2008 (latest version, SP, patches, drivers, SDK ...)
Running the EXE as a stand alone gives this timings

Compiling Pixel Shader ../WorldViewer/DX10\\SimuFluid_RenderSmooth_ComputeVisibilityLOD4x4.ps.hlsl
Took 1317.041662 ms
Create Took 1832.699483 ms
Compiling Pixel Shader ../WorldViewer/DX10\\SimuFluid_RenderSmooth_ComputeVisibilityLOD2x2.ps.hlsl
Took 377.944188 ms
Create Took 156.574857 ms
Compiling Pixel Shader ../WorldViewer/DX10\\SimuFluid_RenderSmooth_ComputeVisibilityLOD2x2x2.ps.hlsl
Took 672.108109 ms
Create Took 399.883245 ms
Compiling Pixel Shader ../WorldViewer/DX10\\SimuFluid_RenderSmooth_ComputeVisibilityLOD2x2x4.ps.hlsl
Took 1352.036399 ms
Create Took 1632.707879 ms

Running from VS (Release, full optimizations, anyway it's the driver's code which takes all the time)

Compiling Pixel Shader ../WorldViewer/DX10\\SimuFluid_RenderSmooth_ComputeVisibilityLOD4x4.ps.hlsl
Took 1390.279165 ms
Create Took 7952.150473 ms
Compiling Pixel Shader ../WorldViewer/DX10\\SimuFluid_RenderSmooth_ComputeVisibilityLOD2x2.ps.hlsl
Took 383.181736 ms
Create Took 3648.525213 ms
Compiling Pixel Shader ../WorldViewer/DX10\\SimuFluid_RenderSmooth_ComputeVisibilityLOD2x2x2.ps.hlsl
Took 706.142689 ms
Create Took 4018.351381 ms
Compiling Pixel Shader ../WorldViewer/DX10\\SimuFluid_RenderSmooth_ComputeVisibilityLOD2x2x4.ps.hlsl
Took 1386.748164 ms
Create Took 7980.124220 ms

the D3DCompile (Microsoft) takes about the same time running as a stand-alone EXE or launched from Visual Studio.
the Device->CreateShader (Intel) is up to 20 times longer while running from Visual Studio

which is very annoying when you spend all your day trying your shaders code.

is there a workaround to prevent it please ?

0 Kudos
2 Replies
Ronan_Bel
Beginner
832 Views
Hi.
Here is a workaround :
set _NO_DEBUG_HEAP=1 in VisualStudio environment settings for the project you are working on.

http://blogs.msdn.com/b/ms_joc/archive/2009/02/19/why-is-my-app-so-much-slower-under-the-debugger.aspx


0 Kudos
SergeyKostrov
Valued Contributor II
832 Views
>>...set _NO_DEBUG_HEAP=1...

He is running from Release configuration. Take a look, please:

From the 1st post:

>>...Running from VS (Release, full optimizations...

All memory management CRT-functions, like 'malloc_dbg', 'free_dbg', etc, shouldn't be called and it looks like something else affects the performance.
0 Kudos
Reply