Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

rmg

HW/SW vertex processing inconsistencies

This topic is 5742 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m doing a fixed function drawprimitive call from a dynamic, writeonly vertex buffer in the default memory pool. If I have created the device using D3DCREATE_HARDWARE_VERTEXPROCESSING, the contents of the buffer are never rendered to the screen. If I simply change the device creation to use D3DCREATE_SOFTWARE_VERTEXPROCESSING, everything comes out fine. My vidcard is a Radeon 7200 (64mb vivo), and devcaps show D3DDEVCAPS_HWTRANSFORMANDLIGHT support. All tutorials/samples/games use HWTnL without a problem. I am not exceeding MaxPrimitiveCount in my DrawPrimitive call, either. What could be causing this behavior? I didn''t post any code thinking there might be a general answer based on differences between using HW and SW vertex processing. If anyone wants to see the code, I''ll be more than willing to post. Extraneuous Info: - I am also rendering FPS statistics via textured quads and a DrawPrimitive call. These display correctly in both HW and SW vertex processing modes. - FVF for undisplayable buffer is just XYZ & Diffuse Once again, simply changing D3DCREATE_HARDWARE_VERTEXPROCESSING to D3DCREATE_SOFTWARE_VERTEXPROCESSING is all that is needed to "fix" what I should be seeing.

Share this post


Link to post
Share on other sites
Advertisement
What primitive type are you rendering?

Do you have a SetSoftwareVertexProcessing call anywhere?

Are you using ProcessVertices at all?

With debug output turned all the way up, are there any interesting messages?

Share this post


Link to post
Share on other sites
OK I did some more testing,

DrawPrimitive will work with HW vertex processing when I give a primitive count <= 21,845.

I am using D3DPT_TRIANGELISTs.

So, my feeling is I'm either misinterpretting what MaxPrimitiveCount signifies, or my d3dcaps are lying to me (they show 65536).

So.. Does MaxPrimitiveCount relate to primitive type in some way? Am I wrong in thinking I can use drawprimitive to render up to 65,536 triangles via D3DPT_TRIANGLELIST.

Taking a second moment to think it over, I now realize 21845 * 3 = 65535. Should MaxPrimitiveCount really be considered MaxVertexCount? I feel like I'm missing something.



[edited by - rmg on March 30, 2003 6:03:33 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I believe you are correct - the count is interpreted as max vertex (index) count.

Share this post


Link to post
Share on other sites
HTH:

MaxPrimitiveCount
Maximum number of primitives for each DrawPrimitive call. Note that when Direct3D is working with a DirectX 6.0 or DirectX 7.0 driver, this field is set to 0xFFFF. This means that not only the number of primitives but also the number of vertices is limited by this value.

Share this post


Link to post
Share on other sites
rmg,

you must create your device with D3DCREATE_SOFTWARE_VERTEXPROCESSING.

I encounteres a similar problem on this radeon card. The thing is that its caps declare that it is capable of doing pure hardware vertex processing, but when checking for the vertex shader version, it is not able to support v1.0!
I found no other solution than run software processing mode.

Share this post


Link to post
Share on other sites
Donavon, I had read that excerpt from the sdk before initially posting. I don''t believe my card is using directx 6.0 or 7.0 drivers (using latest cat''s), but since my MaxPrimitiveCount IS listed as 0xffff, I''ll take that as enough of a cue to consider it as also bounding the Vertex Count.

I altered my rendering process to work around this limitation (basically switched to dynamic vertices with static indices, so I wouldn''t be transforming so many redundant vertices, and therefor not crossing the MaxPrimitiveCount boundary). I probably should have been doing this anyway, since it cuts down the amount of data being sent over agp each frame.

Not sure about the problems you were having, Renus, but it seems to be running great now using hardware vertex processing. 160 fps opposed to 40 fps when using software processing (1.4ghz athlon).

Thanks for your help, guys

Share this post


Link to post
Share on other sites

  • 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!