Skip to main content
GameDev.net gamedev.net
🔒 Locked 🎮 Unity

Tessellation API bug?

Started by swiftcoder Nov 21, 2010 at 2:47 PM 2 replies 1.3k views
Original Post
swiftcoder
swiftcoder
I just spent several hours tracking down a very hard-to-isolate issue with OpenGL 4.0 tessellation. While I now have a workaround, I am trying to figure out if this behaviour is documented anywhere (I can't find any mention), or if it is a driver bug.

Basically, if I set GL_PATCH_VERTICES to any number other than 3, then I must reset it to 3 before rendering any non-tessellated geometry.

In my case I am using quad-patches for terrain rendering, so I have to call glPatchParameteri(GL_PATCH_VERTICES, 4) immediately before rendering the tessellated geometry. If I don't reset it with glPatchParameteri(GL_PATCH_VERTICES, 3) immediately afterwards, then all non-tessellated geometry will not render (as in no vertices will be read into a transform feedback buffer), so it appears that geometry is eaten in the (supposedly inactive) tessellation stage.

This is occurring on an AMD 5770, running Catalyst 10.10, under Windows 7 amd64, which happens to be my only machine to support DX11 features.

Any idea if this is a documented issue/feature?

[Edited by - swiftcoder on November 21, 2010 4:41:45 PM]
Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]
foobarbazqux
foobarbazqux
I am using a Radeon 5770 on x64 ubuntu with catalyst 10.11. My current code does

* glPatchParamteri(GL_PATCH_VERTICES,4);
* glUseProgram(fancyPantsTesselationProgram);
* DrawMySuperAwesomeTesselatedTerrain();
* glUseProgram(boringProgramThatDoesntUseTesselation);
* glDrawElements(GL_TRIANGLES,foo,bar,baz);

I never set GL_PATCH_VERTICES back to 3 and everything appears to work.
sprite_hound
sprite_hound
I've also done some stuff with OpenGL 4.0 tessellation on an HD5770 (Windows 7 64 bit), and not encountered this issue. However, I've not tried using transform feedback yet.
swiftcoder
swiftcoder
All right, so plainly an issue with something in my pipeline. I guess I will try to produce a minimal test-case over the long weekend - the bug presents in a 10,000 line codebase [smile]
Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.