Jump to content
The Dark Mod Forums

Patch cylinder draw bug in Orthoview: Cause found, nVidia support [1506400]


Recommended Posts

Morning taffers

 

As refernce the following post's, I logged a support call with nVidia

 

- http://forums.thedar...__1#entry343771

- http://forums.thedar...561#entry340561

 

Got an email back from nVidia -

 

Our development team concluded their investigation of this issue. This in an application bug caused by a backward incompatible change between the OpenGL 4.3 and OpenGL 4.4 specifications that introduces GL_MAX_VERTEX_ATTRIB_STRIDE. The application creates a default OpenGL context that defaults to OpenGL 4.4 in recent drivers and when calling VertexPointer with stride 25160 hits the GL_MAX_VERTEX_ATTRIB_STRIDE limit set to 2048.

 

For the record the bad code is here https://github.com/o...rables.cpp#L100 and ArbitraryMeshVertex is defined here https://github.com/o...aryMeshVertex.h. Our development team will reach out to the developers to report this issue and our findings. Hopefully this can be resolved with a patch in the future by the Dark Mod team. Let me know if you have any further questions.

 

@Orbweaver are you still maintaining DR atm as we need someone that nVidia can speak to etc, otherwise Greebo can you help if Orbs dosen't get back to me?

Link to comment
Share on other sites

It's been a long time since I touched that code but I can have a look. It seems that nVidia have done most of the work to actually identify the problem at least.

 

I don't immediately understand why ArbitaryMeshVertex would have a size of 25160 though. By my count it includes 17 floating point values, which should come to 68 bytes.

Link to comment
Share on other sites

Thanks for the heads up. Nice move of nvidia support to actually dive into the codebase identifiying the issue.

 

As OrbWeaver said, I don't see why ArbitraryMeshVertex's sizeof should report >24 kB, but we can at least try to reproduce it. I don't know if I actually can do that, since I own graphics hardware from 2010.

Link to comment
Share on other sites

I have an ATI card myself, but if nVidia support are correct and there is something screwy going on with the stride parameter, then hopefully it will be possible to debug in a hardware-agnostic way.

 

It's also possible that there is an issue with the heavily deprecated non-VBO-based vertex data submission code. Updating it to use VBOs always (even if it isn't particularly efficient with regard to maintaining and updating data only when necessary) should work on any version of OpenGL since 1.5, and may solve this and other issues on newer drivers.

Link to comment
Share on other sites

Well I have a GT640 that I use as a physx card that i can lend you if need be.

 

I'll bear that in mind, thanks. My machine at work does have an nVidia card so hopefully I will be able to reproduce this myself.

 

In any case, I think the line of code linked by nVidia support is incorrect. I suspect the cause of the problem is this block of code in RenderablePatchWireframe:

 

  const ArbitraryMeshVertex* p = &m_tess.vertices.front();
  std::size_t n = m_tess.m_nArrayWidth * sizeof(ArbitraryMeshVertex);
  for(std::size_t i = 0; i <= m_tess.curveTreeU.size(); ++i)
  {
	glVertexPointer(3, GL_DOUBLE, GLsizei(n), &p->vertex);
	glDrawArrays(GL_LINE_STRIP, 0, GLsizei(m_tess.m_nArrayHeight));

 

Here the stride is being increased with the number of subdivisions on the patch, which is obviously going to cause problems when the number of patch vertices increases the stride past the maximum expected value.

Link to comment
Share on other sites

It would make sense that you understand DR's code more than the nVidia chaps, so if you need me to do any testing let me know etc. In the meantime I got another email from the nVidia support chap I hve been taling to -

 

I'll make sure to past this thread along to the developer in case he wants to chime in.

 

Thanks,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 0 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
×
×
  • Create New...