Jump to content
  • Advertisement
pristondev

3D Directx9 Crashing with Shader Model 2.0

Recommended Posts

Hey, I've updated my shaders to uses Shader Model 2.0, with ps_2_0 and vs_2_0, works good only on PC's where was possible to use Shader Model 3.0.

The problem its the shaders its already compiled for SM 2.0, but it doesnt works on PC's with obsolete hardware config. That PC's supports SM 2.0, so I dont know the shaders isn't working. Looks the crash is caused on DrawIndexedPrimitive, but this function never returns something different from S_OK. This way I can't check any log or something like that.

 

Im compiling shaders like:

technique Mesh
{
	pass P0
	{
		VertexShader = compile vs_2_0 MeshVS();
		PixelShader = compile ps_2_0 MeshPS();
	}
}

Initialization logs where have that crashing problem:

16/04/2019 23:18:13 - (INF) Direct3D 9 Interface Created
16/04/2019 23:18:13 - (ERR) Your graphics hardware doest not support 32 bit Dynamic Texture [8876086A]
16/04/2019 23:18:13 - (INF) FPU Preserve
16/04/2019 23:18:13 - (INF) Vertex Processing: Software
16/04/2019 23:18:13 - (INF) Device Created!
16/04/2019 23:18:13 - (INF) Multi Sample: 0 0
16/04/2019 23:18:13 - (INF) Resolution: 800x600
16/04/2019 23:18:13 - (INF) Window Mode
16/04/2019 23:18:13 - (INF) Color Depth: 32BPP
16/04/2019 23:18:13 - (INF) @ Device Capabilities
16/04/2019 23:18:13 - (INF) Vertex Shader Version: 0.0
16/04/2019 23:18:13 - (INF) Pixel Shader Version: 2.0
16/04/2019 23:18:13 - (INF) Max Vertex Blend Matrices: 0
16/04/2019 23:18:13 - (INF) Max Vertex Blend Matrix Index: 0
16/04/2019 23:18:13 - (INF) Max Primitive Count: 65535
16/04/2019 23:18:13 - (INF) Max Vertex Index: 65534
16/04/2019 23:18:13 - (INF) Max Streams: 16
16/04/2019 23:18:13 - (INF) Max Streams Stride: 255
16/04/2019 23:18:13 - (INF) Max Vertex Shader Constant Registers: 0
16/04/2019 23:18:13 - (INF) Max VShader Instructions Executed: 0
16/04/2019 23:18:13 - (INF) Max PShader Instructions Executed: 96
16/04/2019 23:18:13 - (INF) Max Vertex Shader 30 Instruction Slots: 0
16/04/2019 23:18:13 - (INF) Max Pixel Shader 30 Instruction Slots: 0
16/04/2019 23:18:13 - (INF) Max Simultaneous Textures: 8
16/04/2019 23:18:13 - (INF) Max Texture Blend Stages: 8
16/04/2019 23:18:13 - (INF) Max Texture Width: 2048
16/04/2019 23:18:13 - (INF) Max Texture Height: 2048
16/04/2019 23:18:13 - (INF) Max Volume Extent: 256
16/04/2019 23:18:13 - (INF) Max Texture Repeat: 8192
16/04/2019 23:18:13 - (INF) Max Texture Aspect Ratio: 2048
16/04/2019 23:18:13 - (INF) Max Anisotropy: 4
16/04/2019 23:18:13 - (INF) Max Active Lights: 0
16/04/2019 23:18:13 - (INF) Max User Clip Planes: 0
16/04/2019 23:18:13 - (INF) Max Point Size: 256.000000
16/04/2019 23:18:13 - (INF) Max Npatch Tesselation Level: 0.000000
16/04/2019 23:18:13 - (INF) Num Simultaneous RTs: 1
16/04/2019 23:18:13 - (INF) Using Textures Non Pow2 Conditional: Yes
16/04/2019 23:18:13 - (INF) Using Textures Pow2: Yes
16/04/2019 23:18:13 - (INF) Supports HW Skinning: No
16/04/2019 23:18:13 - (INF) Software Skinning

My initialization logs (where shader with sm2 works perfectly):

22/04/2019 14:45:21 - (INF) Direct3D 9 Interface Created
22/04/2019 14:45:21 - (INF) FPU Preserve
22/04/2019 14:45:21 - (INF) Vertex Processing: Hardware
22/04/2019 14:45:21 - (INF) Pure Device
22/04/2019 14:45:21 - (INF) Device Created!
22/04/2019 14:45:21 - (INF) Multi Sample: 0 0
22/04/2019 14:45:21 - (INF) Resolution: 1024x768
22/04/2019 14:45:21 - (INF) Window Mode
22/04/2019 14:45:21 - (INF) Color Depth: 32BPP
22/04/2019 14:45:21 - (INF) 32 bit Back Buffer
22/04/2019 14:45:21 - (INF) @ Device Capabilities
22/04/2019 14:45:21 - (INF) Vertex Shader Version: 3.0
22/04/2019 14:45:21 - (INF) Pixel Shader Version: 3.0
22/04/2019 14:45:21 - (INF) Max Vertex Blend Matrices: 4
22/04/2019 14:45:21 - (INF) Max Vertex Blend Matrix Index: 0
22/04/2019 14:45:21 - (INF) Max Primitive Count: 16777215
22/04/2019 14:45:21 - (INF) Max Vertex Index: 16777215
22/04/2019 14:45:21 - (INF) Max Streams: 16
22/04/2019 14:45:21 - (INF) Max Streams Stride: 255
22/04/2019 14:45:21 - (INF) Max Vertex Shader Constant Registers: 256
22/04/2019 14:45:21 - (INF) Max VShader Instructions Executed: 65535
22/04/2019 14:45:21 - (INF) Max PShader Instructions Executed: 65535
22/04/2019 14:45:21 - (INF) Max Vertex Shader 30 Instruction Slots: 4096
22/04/2019 14:45:21 - (INF) Max Pixel Shader 30 Instruction Slots: 4096
22/04/2019 14:45:21 - (INF) Max Simultaneous Textures: 8
22/04/2019 14:45:21 - (INF) Max Texture Blend Stages: 8
22/04/2019 14:45:21 - (INF) Max Texture Width: 16384
22/04/2019 14:45:22 - (INF) Max Texture Height: 16384
22/04/2019 14:45:22 - (INF) Max Volume Extent: 2048
22/04/2019 14:45:22 - (INF) Max Texture Repeat: 8192
22/04/2019 14:45:22 - (INF) Max Texture Aspect Ratio: 16384
22/04/2019 14:45:22 - (INF) Max Anisotropy: 16
22/04/2019 14:45:22 - (INF) Max Active Lights: 8
22/04/2019 14:45:22 - (INF) Max User Clip Planes: 8
22/04/2019 14:45:22 - (INF) Max Point Size: 8192.000000
22/04/2019 14:45:22 - (INF) Max Npatch Tesselation Level: 0.000000
22/04/2019 14:45:22 - (INF) Num Simultaneous RTs: 4
22/04/2019 14:45:22 - (INF) Using Textures Non Pow2 Conditional: No
22/04/2019 14:45:22 - (INF) Using Textures Pow2: No
22/04/2019 14:45:22 - (INF) Supports HW Skinning: Yes
22/04/2019 14:45:22 - (INF) Hardware Skinning

 

Does anyone know what might be happening?

Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Posted (edited)

Seems like creating a d3d9 device with software vertex processing is not working ... but it looks like if you use a "pure" device with hardware vertex processing your scenario works. Also interesting in the first log is that the supported vertex shader version is listed as 0.0 and in the second log it's listed as 3.0

Is the first log from a REF or software device? Can you avoid going down that path and stick to hardware devices only?

Edited by Steve_Segreto

Share this post


Link to post
Share on other sites
1 hour ago, Steve_Segreto said:

Seems like creating a d3d9 device with software vertex processing is not working ... but it looks like if you use a "pure" device with hardware vertex processing your scenario works. Also interesting in the first log is that the supported vertex shader version is listed as 0.0 and in the second log it's listed as 3.0

Is the first log from a REF or software device? Can you avoid going down that path and stick to hardware devices only?

Both uses D3DDEVTYPE_HAL, 'll try what u said. Already gave me a light, thanks. :) 

Share this post


Link to post
Share on other sites

Ye the problem its on Vertex Processing by Software. I tried set the flag D3DUSAGE_SOFTWAREPROCESSING on CreateIndexBuffer and Create Vertex Buffer but didn't works. Do you know the right way to uses software processing?

Share this post


Link to post
Share on other sites

To do that I believe you have to change the device type (which is now D3DDEVTYPE_HAL).

Share this post


Link to post
Share on other sites
11 hours ago, cozzie said:

To do that I believe you have to change the device type (which is now D3DDEVTYPE_HAL).

Didnt work :(

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!