Cannot create D3D9 pixel shader from microcode

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
User avatar
sparkprime
Ogre Magi
Posts: 1137
Joined: Mon May 07, 2007 3:43 am
Location: Ossining, New York
x 13
Contact:

Cannot create D3D9 pixel shader from microcode

Post by sparkprime »

A user reports this exception which I am not able to reproduce. What could cause it?
OGRE EXCEPTION(3:RenderingAPIException): Cannot create D3D9 pixel shader deferred_ambient_sun_f from microcode. in D3D9GpuFragmentProgram::loadFromMicrocode at .\grit_ogre\RenderSystems\Direct3D9\src\OgreD3D9GpuProgram.cpp (line 424)
The shaders are CG and I'm using ps3_0 and vs3_0 for all shaders.

here is the full log:

Code: Select all

[2011/02/09 05:59:41.299] Creating resource group General
[2011/02/09 05:59:41.305] Creating resource group Internal
[2011/02/09 05:59:41.305] Creating resource group Autodetect
[2011/02/09 05:59:41.305] SceneManagerFactory for type 'DefaultSceneManager' registered.
[2011/02/09 05:59:41.306] Registering ResourceManager for type Material
[2011/02/09 05:59:41.306] Registering ResourceManager for type Mesh
[2011/02/09 05:59:41.306] Registering ResourceManager for type Skeleton
[2011/02/09 05:59:41.306] MovableObjectFactory for type 'ParticleSystem' registered.
[2011/02/09 05:59:41.311] OverlayElementFactory for type Panel registered.
[2011/02/09 05:59:41.311] OverlayElementFactory for type BorderPanel registered.
[2011/02/09 05:59:41.311] OverlayElementFactory for type TextArea registered.
[2011/02/09 05:59:41.312] Registering ResourceManager for type Font
[2011/02/09 05:59:41.312] ArchiveFactory for archive type FileSystem registered.
[2011/02/09 05:59:41.312] ArchiveFactory for archive type Zip registered.
[2011/02/09 05:59:41.312] ArchiveFactory for archive type EmbeddedZip registered.
[2011/02/09 05:59:41.312] DDS codec registering
[2011/02/09 05:59:41.312] FreeImage version: 3.10.0
[2011/02/09 05:59:41.313] This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See freeimage.sourceforge.net for details
[2011/02/09 05:59:41.313] Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2
[2011/02/09 05:59:41.313] PVRTC codec registering
[2011/02/09 05:59:41.313] Registering ResourceManager for type HighLevelGpuProgram
[2011/02/09 05:59:41.313] Registering ResourceManager for type Compositor
[2011/02/09 05:59:41.314] MovableObjectFactory for type 'Entity' registered.
[2011/02/09 05:59:41.320] MovableObjectFactory for type 'Light' registered.
[2011/02/09 05:59:41.320] MovableObjectFactory for type 'BillboardSet' registered.
[2011/02/09 05:59:41.321] MovableObjectFactory for type 'ManualObject' registered.
[2011/02/09 05:59:41.321] MovableObjectFactory for type 'BillboardChain' registered.
[2011/02/09 05:59:41.321] MovableObjectFactory for type 'RibbonTrail' registered.
[2011/02/09 05:59:41.321] *-*-* OGRE Initialising
[2011/02/09 05:59:41.321] *-*-* Version 1.8.0unstable (Byatis)
[2011/02/09 05:59:41.322] Installing plugin: GL RenderSystem
[2011/02/09 05:59:41.322] OpenGL Rendering Subsystem created.
[2011/02/09 05:59:41.507] Plugin successfully installed
[2011/02/09 05:59:41.514] Installing plugin: Octree Scene Manager
[2011/02/09 05:59:41.518] Plugin successfully installed
[2011/02/09 05:59:41.518] Installing plugin: Cg Program Manager
[2011/02/09 05:59:41.526] Plugin successfully installed
[2011/02/09 05:59:41.526] Installing plugin: D3D9 RenderSystem
[2011/02/09 05:59:41.526] D3D9 : Direct3D9 Rendering Subsystem created.
[2011/02/09 05:59:41.548] D3D9: Driver Detection Starts
[2011/02/09 05:59:41.558] D3D9: Driver Detection Ends
[2011/02/09 05:59:41.597] Plugin successfully installed
[2011/02/09 05:59:41.610] D3D9 : RenderSystem Option: Allow NVPerfHUD = Yes
[2011/02/09 05:59:41.610] D3D9 : RenderSystem Option: Floating-point mode = Consistent
[2011/02/09 05:59:41.611] D3D9 : RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
[2011/02/09 05:59:41.611] D3D9 : RenderSystem Option: sRGB Gamma Conversion = Yes
[2011/02/09 05:59:41.611] D3D9 : RenderSystem Option: Full Screen = No
[2011/02/09 05:59:41.611] D3D9 : RenderSystem Option: VSync = Yes
[2011/02/09 05:59:41.611] CPU Identifier & Features
[2011/02/09 05:59:41.612] -------------------------
[2011/02/09 05:59:41.612] * CPU ID: GenuineIntel: Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz
[2011/02/09 05:59:41.612] * SSE: yes
[2011/02/09 05:59:41.612] * SSE2: yes
[2011/02/09 05:59:41.612] * SSE3: yes
[2011/02/09 05:59:41.612] * MMX: yes
[2011/02/09 05:59:41.613] * MMXEXT: yes
[2011/02/09 05:59:41.617] * 3DNOW: no
[2011/02/09 05:59:41.617] * 3DNOWEXT: no
[2011/02/09 05:59:41.617] * CMOV: yes
[2011/02/09 05:59:41.618] * TSC: yes
[2011/02/09 05:59:41.618] * FPU: yes
[2011/02/09 05:59:41.618] * PRO: yes
[2011/02/09 05:59:41.618] * HT: no
[2011/02/09 05:59:41.618] -------------------------
[2011/02/09 05:59:41.619] D3D9 : Subsystem Initialising
[2011/02/09 05:59:41.619] Registering ResourceManager for type Texture
[2011/02/09 05:59:41.619] Registering ResourceManager for type GpuProgram
[2011/02/09 05:59:41.638] D3D9RenderSystem::_createRenderWindow "Grit Game Window", 800x600 windowed miscParams: FSAA=0 FSAAHint= colourDepth=32 gamma=true monitorIndex=0 useNVPerfHUD=true vsync=true vsyncInterval=1
[2011/02/09 05:59:41.659] D3D9 : Created D3D9 Rendering Window 'Grit Game Window' : 800x600, 32bpp
[2011/02/09 05:59:41.746] RenderSystem capabilities
[2011/02/09 05:59:41.758] -------------------------
[2011/02/09 05:59:41.759] RenderSystem Name: Direct3D9 Rendering Subsystem
[2011/02/09 05:59:41.759] GPU Vendor: ati
[2011/02/09 05:59:41.760] Device Name: Monitor-1-ATI MOBILITY RADEON X1700
[2011/02/09 05:59:41.760] Driver Version: 8.14.10.647
[2011/02/09 05:59:41.760] * Fixed function pipeline: yes
[2011/02/09 05:59:41.761] * Hardware generation of mipmaps: yes
[2011/02/09 05:59:41.761] * Texture blending: yes
[2011/02/09 05:59:41.761] * Anisotropic texture filtering: yes
[2011/02/09 05:59:41.768] * Dot product texture operation: yes
[2011/02/09 05:59:41.768] * Cube mapping: yes
[2011/02/09 05:59:41.769] * Hardware stencil buffer: yes
[2011/02/09 05:59:41.769] - Stencil depth: 8
[2011/02/09 05:59:41.770] - Two sided stencil support: yes
[2011/02/09 05:59:41.770] - Wrap stencil values: yes
[2011/02/09 05:59:41.770] * Hardware vertex / index buffers: yes
[2011/02/09 05:59:41.771] * Vertex programs: yes
[2011/02/09 05:59:41.771] * Number of floating-point constants for vertex programs: 256
[2011/02/09 05:59:41.772] * Number of integer constants for vertex programs: 16
[2011/02/09 05:59:41.772] * Number of boolean constants for vertex programs: 16
[2011/02/09 05:59:41.772] * Fragment programs: yes
[2011/02/09 05:59:41.773] * Number of floating-point constants for fragment programs: 224
[2011/02/09 05:59:41.773] * Number of integer constants for fragment programs: 16
[2011/02/09 05:59:41.790] * Number of boolean constants for fragment programs: 16
[2011/02/09 05:59:41.790] * Geometry programs: no
[2011/02/09 05:59:41.791] * Number of floating-point constants for geometry programs: 0
[2011/02/09 05:59:41.791] * Number of integer constants for geometry programs: 0
[2011/02/09 05:59:41.791] * Number of boolean constants for geometry programs: 0
[2011/02/09 05:59:41.792] * Supported Shader Profiles: hlsl ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_a ps_2_b ps_2_x ps_3_0 vs_1_1 vs_2_0 vs_2_a vs_2_x vs_3_0
[2011/02/09 05:59:41.792] * Texture Compression: yes
[2011/02/09 05:59:41.793] - DXT: yes
[2011/02/09 05:59:41.793] - VTC: no
[2011/02/09 05:59:41.793] - PVRTC: no
[2011/02/09 05:59:41.794] * Scissor Rectangle: yes
[2011/02/09 05:59:41.794] * Hardware Occlusion Query: yes
[2011/02/09 05:59:41.801] * User clip planes: yes
[2011/02/09 05:59:41.801] * VET_UBYTE4 vertex element type: yes
[2011/02/09 05:59:41.801] * Infinite far plane projection: yes
[2011/02/09 05:59:41.802] * Hardware render-to-texture: yes
[2011/02/09 05:59:41.802] * Floating point textures: yes
[2011/02/09 05:59:41.803] * Non-power-of-two textures: yes (limited)
[2011/02/09 05:59:41.803] * Volume textures: yes
[2011/02/09 05:59:41.803] * Multiple Render Targets: 4
[2011/02/09 05:59:41.804] - With different bit depths: no
[2011/02/09 05:59:41.804] * Point Sprites: yes
[2011/02/09 05:59:41.805] * Extended point parameters: yes
[2011/02/09 05:59:41.805] * Max Point Size: 256
[2011/02/09 05:59:41.805] * Vertex texture fetch: no
[2011/02/09 05:59:41.820] * Number of world matrices: 0
[2011/02/09 05:59:41.821] * Number of texture units: 8
[2011/02/09 05:59:41.821] * Stencil buffer depth: 8
[2011/02/09 05:59:41.822] * Number of vertex blend matrices: 0
[2011/02/09 05:59:41.822] * Render to Vertex Buffer : no
[2011/02/09 05:59:41.822] * DirectX per stage constants: no
[2011/02/09 05:59:41.823] ***************************************
[2011/02/09 05:59:41.823] *** D3D9 : Subsystem Initialised OK ***
[2011/02/09 05:59:41.824] ***************************************
[2011/02/09 05:59:41.824] DefaultWorkQueue('Root') initialising on thread 00C85F70.
[2011/02/09 05:59:41.824] Particle Renderer Type 'billboard' registered
[2011/02/09 05:59:41.825] SceneManagerFactory for type 'OctreeSceneManager' registered.
[2011/02/09 05:59:41.825] DefaultWorkQueue('Root')::WorkerFunc - thread 00CA2E70 starting.
[2011/02/09 05:59:41.825] DefaultWorkQueue('Root')::WorkerFunc - thread 00CA7FB0 starting.
[2011/02/09 05:59:41.826] OverlayElementFactory for type TextList registered.
[2011/02/09 05:59:41.826] MovableObjectFactory for type 'MovableClutter' registered.
[2011/02/09 05:59:41.826] MovableObjectFactory for type 'RangedClutter' registered.
[2011/02/09 05:59:41.827] Creating resource group GRIT
[2011/02/09 05:59:41.827] Added resource location '.' of type 'FileSystem' to resource group 'GRIT' with recursive option
[2011/02/09 05:59:41.843] Parsing scripts for resource group Autodetect
[2011/02/09 05:59:41.844] Finished parsing scripts for resource group Autodetect
[2011/02/09 05:59:41.849] Creating resources for group Autodetect
[2011/02/09 05:59:41.849] All done
[2011/02/09 05:59:41.849] Parsing scripts for resource group GRIT
[2011/02/09 05:59:41.901] Parsing script system/AnaglyphCompositor.program
[2011/02/09 05:59:41.918] Parsing script system/Core.program
[2011/02/09 05:59:41.934] Parsing script system/DebugTexture.material
[2011/02/09 05:59:41.935] Parsing script system/Node.material
[2011/02/09 05:59:41.935] Parsing script system/Overlays.material
[2011/02/09 05:59:41.936] Parsing script system/PhysicsDebug.material
[2011/02/09 05:59:41.936] Parsing script system/Sky.material
[2011/02/09 05:59:41.988] Parsing script testville/Floor.material
[2011/02/09 05:59:42.000] Finished parsing scripts for resource group GRIT
[2011/02/09 05:59:42.000] Creating resources for group GRIT
[2011/02/09 05:59:42.001] All done
[2011/02/09 05:59:42.001] Parsing scripts for resource group General
[2011/02/09 05:59:42.001] Finished parsing scripts for resource group General
[2011/02/09 05:59:42.002] Creating resources for group General
[2011/02/09 05:59:42.002] All done
[2011/02/09 05:59:42.003] Parsing scripts for resource group Internal
[2011/02/09 05:59:42.003] Finished parsing scripts for resource group Internal
[2011/02/09 05:59:42.003] Creating resources for group Internal
[2011/02/09 05:59:42.004] All done
[2011/02/09 05:59:42.174] Initialising script...
[2011/02/09 05:59:42.189] loading abbrev.lua
[2011/02/09 05:59:42.189] loading hud.lua
[2011/02/09 05:59:42.280] Initialising misc.fixed font
[2011/02/09 05:59:42.442] Added font misc.fixed
[2011/02/09 05:59:42.442] Starting game engine...
[2011/02/09 05:59:42.442] Loading ui.lua
[2011/02/09 05:59:42.442] Loading gfx.lua
[2011/02/09 05:59:45.704] Loading physics.lua
[2011/02/09 05:59:45.704] Loading physical_materials.lua
[2011/02/09 05:59:45.704] Loading procedural_objects.lua
[2011/02/09 05:59:45.705] Loading procedural_batches.lua
[2011/02/09 05:59:45.705] Loading console_prompt.lua
[2011/02/09 05:59:45.712] Loading console.lua
[2011/02/09 05:59:45.723] Loading player_ctrl.lua
[2011/02/09 05:59:45.736] Loading capturer.lua
[2011/02/09 05:59:45.736] Loading user configuration
[2011/02/09 05:59:45.764] Compiling shader: deferred_ambient_sun_v deferred_ambient_sun_f 1
[2011/02/09 05:59:45.865] Compiling shader: deferred_lights_v deferred_lights_f 2
[2011/02/09 06:00:44.104] Compiling shader: cast_f:d_0_0_w cast_v:d_0_0_w
[2011/02/09 06:00:44.120] Compiling shader: cast_f:d_0_0_W cast_v:d_0_0_W
[2011/02/09 06:00:44.135] Compiling shader: cast_f:d_1_0_w cast_v:d_1_0_w
[2011/02/09 06:00:44.150] Compiling shader: cast_f:d_1_0_W cast_v:d_1_0_W
[2011/02/09 06:00:44.184] Compiling shader: cast_f:d_2_0_w cast_v:d_2_0_w
[2011/02/09 06:00:44.200] Compiling shader: cast_f:d_2_0_W cast_v:d_2_0_W
[2011/02/09 06:00:44.230] Compiling shader: cast_f:d_3_0_w cast_v:d_3_0_w
[2011/02/09 06:00:44.245] Compiling shader: cast_f:d_3_0_W cast_v:d_3_0_W
[2011/02/09 06:00:44.261] Compiling shader: cast_f:d_4_0_w cast_v:d_4_0_w
[2011/02/09 06:00:44.294] Compiling shader: cast_f:d_4_0_W cast_v:d_4_0_W
[2011/02/09 06:00:44.313] Compiling shader: cast_f:D_0_0_w cast_v:D_0_0_w
[2011/02/09 06:00:44.328] Compiling shader: cast_f:D_0_0_W cast_v:D_0_0_W
[2011/02/09 06:00:44.344] Compiling shader: cast_f:D_1_0_w cast_v:D_1_0_w
[2011/02/09 06:00:44.375] Compiling shader: cast_f:D_1_0_W cast_v:D_1_0_W
[2011/02/09 06:00:44.376] Compiling shader: cast_f:D_2_0_w cast_v:D_2_0_w
[2011/02/09 06:00:44.414] Compiling shader: cast_f:D_2_0_W cast_v:D_2_0_W
[2011/02/09 06:00:44.441] Compiling shader: cast_f:D_3_0_w cast_v:D_3_0_w
[2011/02/09 06:00:44.457] Compiling shader: cast_f:D_3_0_W cast_v:D_3_0_W
[2011/02/09 06:00:44.474] Compiling shader: cast_f:D_4_0_w cast_v:D_4_0_w
[2011/02/09 06:00:44.489] Compiling shader: cast_f:D_4_0_W cast_v:D_4_0_W
[2011/02/09 06:00:44.527] Rebuilt 0 shaders (space: 3763200)
[2011/02/09 06:00:44.528] Compiling shader: particle_v:O_e particle_f:O_e
[2011/02/09 06:00:44.547] Compiling shader: particle_v:O_E particle_f:O_E
[2011/02/09 06:00:44.548] Compiling shader: particle_v:A_e particle_f:A_e
[2011/02/09 06:00:44.563] Compiling shader: particle_v:A_E particle_f:A_E
[2011/02/09 06:00:44.563] Compiling shader: particle_v:L_e particle_f:L_e
[2011/02/09 06:00:44.578] Compiling shader: particle_v:L_E particle_f:L_E
[2011/02/09 06:00:44.593] Compiling shader: recv_v:d_p_n_s_t_c_1_T_0_0_g_w_R_m_F recv_f:d_p_n_s_t_c_1_T_0_0_g_w_R_m_F 0
[2011/02/09 06:00:44.641] Compiling shader: recv_v:d_p_n_s_t_c_1_T_0_0_g_W_R_m_F recv_f:d_p_n_s_t_c_1_T_0_0_g_W_R_m_F 0
[2011/02/09 06:00:44.682] Loading env.lua
[2011/02/09 06:00:44.687] Loading common assets
[2011/02/09 06:00:44.759] Compiling shader: recv_v:D_p_n_s_t_c_1_T_0_0_g_w_R_m_F recv_f:D_p_n_s_t_c_1_T_0_0_g_w_R_m_F 0
[2011/02/09 06:00:44.799] Compiling shader: recv_v:D_p_n_s_t_c_1_T_0_0_g_W_R_m_F recv_f:D_p_n_s_t_c_1_T_0_0_g_W_R_m_F 0
[2011/02/09 06:00:44.847] Compiling shader: recv_v:D_p_N_s_t_c_1_T_0_0_g_w_R_m_F recv_f:D_p_N_s_t_c_1_T_0_0_g_w_R_m_F 0
[2011/02/09 06:00:44.902] Compiling shader: recv_v:D_p_N_s_t_c_1_T_0_0_g_W_R_m_F recv_f:D_p_N_s_t_c_1_T_0_0_g_W_R_m_F 0
[2011/02/09 06:00:44.956] Compiling shader: recv_v:D_p_N_S_t_c_1_T_0_0_g_w_R_m_F recv_f:D_p_N_S_t_c_1_T_0_0_g_w_R_m_F 0
[2011/02/09 06:00:45.007] Compiling shader: recv_v:D_p_N_S_t_c_1_T_0_0_g_W_R_m_F recv_f:D_p_N_S_t_c_1_T_0_0_g_W_R_m_F 0
[2011/02/09 06:00:45.057] Compiling shader: recv_v:d_p_N_s_t_c_1_T_0_0_g_w_R_m_F recv_f:d_p_N_s_t_c_1_T_0_0_g_w_R_m_F 0
[2011/02/09 06:00:45.110] Compiling shader: recv_v:d_p_N_s_t_c_1_T_0_0_g_W_R_m_F recv_f:d_p_N_s_t_c_1_T_0_0_g_W_R_m_F 0
[2011/02/09 06:00:45.144] Compiling shader: recv_v:d_p_n_s_t_c_1_T_0_0_g_w_R_M_F recv_f:d_p_n_s_t_c_1_T_0_0_g_w_R_M_F 0
[2011/02/09 06:00:45.193] Compiling shader: recv_v:d_p_n_s_t_c_1_T_0_0_g_W_R_M_F recv_f:d_p_n_s_t_c_1_T_0_0_g_W_R_M_F 0
[2011/02/09 06:00:45.220] Compiling shader: recv_v:D_p_n_D_t_c_1_T_0_0_g_w_R_m_F recv_f:D_p_n_D_t_c_1_T_0_0_g_w_R_m_F 0
[2011/02/09 06:00:45.282] Compiling shader: recv_v:D_p_n_D_t_c_1_T_0_0_g_W_R_m_F recv_f:D_p_n_D_t_c_1_T_0_0_g_W_R_m_F 0
[2011/02/09 06:00:45.323] Compiling shader: recv_v:D_p_N_S_t_c_1_T_0_3_g_w_R_m_F recv_f:D_p_N_S_t_c_1_T_0_3_g_w_R_m_F 0
[2011/02/09 06:00:45.374] Compiling shader: recv_v:D_p_N_S_t_c_1_T_0_3_g_W_R_m_F recv_f:D_p_N_S_t_c_1_T_0_3_g_W_R_m_F 0
[2011/02/09 06:00:45.433] Compiling shader: recv_v:D_p_n_A_t_c_1_T_0_0_g_w_R_m_F recv_f:D_p_n_A_t_c_1_T_0_0_g_w_R_m_F 0
[2011/02/09 06:00:45.487] Compiling shader: recv_v:D_p_n_A_t_c_1_T_0_0_g_W_R_m_F recv_f:D_p_n_A_t_c_1_T_0_0_g_W_R_m_F 0
[2011/02/09 06:00:45.524] Compiling shader: recv_v:D_p_n_S_t_c_1_T_0_0_g_w_R_m_F recv_f:D_p_n_S_t_c_1_T_0_0_g_w_R_m_F 0
[2011/02/09 06:00:45.580] Compiling shader: recv_v:D_p_n_S_t_c_1_T_0_0_g_W_R_m_F recv_f:D_p_n_S_t_c_1_T_0_0_g_W_R_m_F 0
[2011/02/09 06:00:45.622] Compiling shader: recv_v:D_p_N_D_T_c_1_T_0_3_g_w_R_m_F recv_f:D_p_N_D_T_c_1_T_0_3_g_w_R_m_F 0
[2011/02/09 06:00:45.678] Compiling shader: recv_v:D_p_N_D_T_c_1_T_0_3_g_W_R_m_F recv_f:D_p_N_D_T_c_1_T_0_3_g_W_R_m_F 0
[2011/02/09 06:00:45.736] Compiling shader: recv_v:D_p_N_s_t_c_1_T_0_3_g_w_R_m_F recv_f:D_p_N_s_t_c_1_T_0_3_g_w_R_m_F 0
[2011/02/09 06:00:45.794] Compiling shader: recv_v:D_p_N_s_t_c_1_T_0_3_g_W_R_m_F recv_f:D_p_N_s_t_c_1_T_0_3_g_W_R_m_F 0
[2011/02/09 06:00:45.848] Compiling shader: recv_v:D_p_N_s_t_c_1_T_0_3_g_w_r_m_F recv_f:D_p_N_s_t_c_1_T_0_3_g_w_r_m_F 0
[2011/02/09 06:00:45.899] Compiling shader: recv_v:D_p_N_s_t_c_1_T_0_3_g_W_r_m_F recv_f:D_p_N_s_t_c_1_T_0_3_g_W_r_m_F 0
[2011/02/09 06:00:45.948] Compiling shader: recv_v:D_p_N_s_t_c_1_T_0_0_g_w_r_m_F recv_f:D_p_N_s_t_c_1_T_0_0_g_w_r_m_F 0
[2011/02/09 06:00:45.997] Compiling shader: recv_v:D_p_N_s_t_c_1_T_0_0_g_W_r_m_F recv_f:D_p_N_s_t_c_1_T_0_0_g_W_r_m_F 0
[2011/02/09 06:00:46.044] Compiling shader: recv_v:D_p_n_s_t_c_1_T_0_0_G_w_R_m_F recv_f:D_p_n_s_t_c_1_T_0_0_G_w_R_m_F 0
[2011/02/09 06:00:46.090] Compiling shader: recv_v:D_p_n_s_t_c_1_T_0_0_G_W_R_m_F recv_f:D_p_n_s_t_c_1_T_0_0_G_W_R_m_F 0
[2011/02/09 06:00:46.158] Loading engine.lua
[2011/02/09 06:00:46.176] Loading friction_models.lua
[2011/02/09 06:00:46.177] Loading wheel_assembly.lua
[2011/02/09 06:00:46.177] Compiling shader: recv_v:D_p_n_S_t_C_1_T_0_0_g_w_R_M_F recv_f:D_p_n_S_t_C_1_T_0_0_g_w_R_M_F 0
[2011/02/09 06:00:46.239] Compiling shader: recv_v:D_p_n_S_t_C_1_T_0_0_g_W_R_M_F recv_f:D_p_n_S_t_C_1_T_0_0_g_W_R_M_F 0
[2011/02/09 06:00:46.301] Compiling shader: recv_v:D_p_n_S_t_c_1_t_0_0_g_w_R_m_f recv_f:D_p_n_S_t_c_1_t_0_0_g_w_R_m_f 0
[2011/02/09 06:00:46.419] Compiling shader: recv_v:D_p_n_S_t_c_1_t_0_0_g_W_R_m_f recv_f:D_p_n_S_t_c_1_t_0_0_g_W_R_m_f 0
[2011/02/09 06:00:46.533] Compiling shader: recv_v:D_p_n_S_t_A_1_T_0_0_g_w_R_M_F recv_f:D_p_n_S_t_A_1_T_0_0_g_w_R_M_F 0
[2011/02/09 06:00:46.593] Compiling shader: recv_v:D_p_n_S_t_A_1_T_0_0_g_W_R_M_F recv_f:D_p_n_S_t_A_1_T_0_0_g_W_R_M_F 0
[2011/02/09 06:00:46.658] Compiling shader: recv_v:d_p_n_s_t_c_1_t_0_0_g_w_R_m_f recv_f:d_p_n_s_t_c_1_t_0_0_g_w_R_m_f 0
[2011/02/09 06:00:46.758] Compiling shader: recv_v:d_p_n_s_t_c_1_t_0_0_g_W_R_m_f recv_f:d_p_n_s_t_c_1_t_0_0_g_W_R_m_f 0
[2011/02/09 06:00:46.877] D3D9 device: 0x[04279E00] lost. Releasing D3D9 texture: c2/fat_fb/Grit Game Window/0
[2011/02/09 06:00:46.877] Released D3D9 texture: c2/fat_fb/Grit Game Window/0
[2011/02/09 06:00:46.878] D3D9 device: 0x[04279E00] lost. Releasing D3D9 texture: c2/fat_fb/Grit Game Window/1
[2011/02/09 06:00:46.878] Released D3D9 texture: c2/fat_fb/Grit Game Window/1
[2011/02/09 06:00:46.879] D3D9 device: 0x[04279E00] lost. Releasing D3D9 texture: c2/fat_fb/Grit Game Window/2
[2011/02/09 06:00:46.879] Released D3D9 texture: c2/fat_fb/Grit Game Window/2
[2011/02/09 06:00:46.879] D3D9 device: 0x[04279E00] lost. Releasing D3D9 texture: c2/fat_fb/Grit Game Window/3
[2011/02/09 06:00:46.880] Released D3D9 texture: c2/fat_fb/Grit Game Window/3
[2011/02/09 06:00:46.880] D3D9 Device 0x[04279E00] entered lost state
[2011/02/09 06:00:46.949] !!! Direct3D Device successfully restored.
[2011/02/09 06:00:46.950] D3D9 device: 0x[04279E00] was reset
[2011/02/09 06:00:46.951] /system/gfx.lua:87: OGRE EXCEPTION(3:RenderingAPIException): Cannot create D3D9 pixel shader deferred_ambient_sun_f from microcode. in D3D9GpuFragmentProgram::loadFromMicrocode at .\grit_ogre\RenderSystems\Direct3D9\src\OgreD3D9GpuProgram.cpp (line 424) while Rendering a frame (.\src\gfx.c++:2408: void __cdecl gfx_render(float,const struct Vector3 &,const struct Quaternion &))
[2011/02/09 06:00:46.952] /system/init.lua:78: f
[2011/02/09 06:00:46.952] /system/util.lua:398: executeExtended
[2011/02/09 06:00:46.953] /system/init.lua:70: func </system/init.lua:67>
[2011/02/09 06:00:46.953] [C]: xpcall
[2011/02/09 06:00:46.954] /system/init.lua:67: func </system/init.lua:36>
[2011/02/09 06:00:46.954] Removed frameCallback: GFX.frameCallback
Kyliroth
Gnoblar
Posts: 2
Joined: Tue Mar 08, 2011 9:30 pm
x 2

Re: Cannot create D3D9 pixel shader from microcode

Post by Kyliroth »

I found that error to occur if the user has stated that it will be a 'vertex_program' however the profile states it to be 'ps_x_x' or vice versa. This will cause it not to be created.

Just checking that the syntax match for the correct program will hopefully solve it.

[Sorry if it's already been solved]

- Kyliroth
User avatar
sparkprime
Ogre Magi
Posts: 1137
Joined: Mon May 07, 2007 3:43 am
Location: Ossining, New York
x 13
Contact:

Re: Cannot create D3D9 pixel shader from microcode

Post by sparkprime »

The user went away, I have no idea how to even reproduce it :)
sacha
Gnoblar
Posts: 5
Joined: Thu Aug 21, 2008 9:22 am

Re: Cannot create D3D9 pixel shader from microcode

Post by sacha »

It appears that this error has to do with the instruction count in the shader. I have some cg shaders, which compile without errors, which give the same error when I try to use them. If I comment out a few lines of code, the error disappears. This happens both in debug and release mode, and with directx and opengl render systems.

In my case this is weird behavior because I know the shaders should work (I can load and run them in a webgl app), but when I convert the glsl into cg, I get this error. I have not yet figured out why this is :-)
sacha
Gnoblar
Posts: 5
Joined: Thu Aug 21, 2008 9:22 am

Re: Cannot create D3D9 pixel shader from microcode

Post by sacha »

For the record: I noticed that when I use the cg shader with the opengl render system, that the script compiler gives a bit more information in its error messages, in particular regarding to the maximum number of instructions being violated. With this information I was able to modify the cg shader to get it to work with the opengl rendersystem. However, using the same cg shader with directx render system, still gave the same error (?).

I tried using the shader on a different machine, with a better video card. It ran without any problems on both directx and opengl.

So the 'cannot create d3d9 pixel shader from microcode' does seem to be related to instruction length- but the directx script compiler does not seem to provide you with the information (otherwise the compiler would generate some errors).
User avatar
sparkprime
Ogre Magi
Posts: 1137
Joined: Mon May 07, 2007 3:43 am
Location: Ossining, New York
x 13
Contact:

Re: Cannot create D3D9 pixel shader from microcode

Post by sparkprime »

I just assumed it was some bug peculiar to that user's d3d implementation. Quite possibly the backend assembler to the GPU instruction set (part of the drivers). In a conventional compiler, this kind of failure would be an ICE (internal compiler error). Changing the code slightly will often make the problem go away, but only because it's not walking the same path and hitting the same bug. So it's not a solution, just a workaround. And a very frustrating one at that.
Post Reply