(Tested) First Contact with OpenGL 4.0 GPU Tessellation

OpenGL logo

OpenGL 4 tessellation - Outer and inner levels
OpenGL 4 tessellation in action


Yesterday I released GPU Caps Viewer 1.8.9 with OpenGL 4.1 support. But, actually, the support is limited to the use of an OpenGL 4.1 context to read OpenGL caps. Not really terrible… So I decided to look at one of the killer features of OpenGL 4: the tessellation for a new demo in GPU Caps Viewer.

I already covered a bit the hardware tessellation in this article.

In short, in an GL 4 / DX11 class hardware, there are 3 units dedicated to the tessellation: two units are programmable (the tessellation control unit and the tessellation evaluation unit) and one is a fixed-function unit (the tessellation primitive generator also called the tessellator).

Here is (in an OpenGL-spec-like way) the five programmables units (vertex, tess control, tess evaluation, geometry and fragment) and the fixed-function tessellator:

-----------------------
|    Vertex shader    | 
-----------------------
          |
-----------------------
|   Control shader    | 
|         or          | 
|  Hull shader (D3D)  | 
-----------------------
          |
-----------------------
|     tessellator     | 
-----------------------
          |
-----------------------
|  Evaluation shader  | 
|         or          | 
|  Domain shader(D3D) | 
-----------------------
          |
-----------------------
|   Geometry shader   | 
-----------------------
          |
-----------------------
|   Fragment shader   | 
-----------------------

My aim was to add a very simple demo in GPU Caps Viewer, a tessellated triangle, and to see if hardware tessellation worked fine on both NVIDIA GeForce and ATI Radeon cards. I’ll cover how things are done in another article more focused on shader programming (after the release of GPU Caps Viewer). In the meantime, some useful links are provided at the end of the article.

First thing: all my tests have successfully worked on a GeForce GTX 480 (with R259.09) and on a Radeon HD 5870 (with Catalyst 10.7). This is a really good start and above all, the same code works as expected and in the same manner on GeForce and Radeon. NVIDIA and AMD OpenGL driver teams have done a good job!

There are two important parameters that control the tessellation level: the outer tessellation level and the inner tessellation level. Both levels can be set at the API level (using glPatchParameterfv()) or directly in the control shader (gl_TessLevelOuter[] and gl_TessLevelInner[]).

So I played a bit with these params in the control shader. The maximum value for both levels is currently 64. Roughly said, you can divide an edge into 64 smaller parts. The following sreenshots show the tessellation for various levels:

OpenGL 4 tessellation - Outer and inner levels
Outer level = 1 – Inner level = 1

OpenGL 4 tessellation - Outer and inner levels
Outer level = 1 – Inner level = 2

OpenGL 4 tessellation - Outer and inner levels
Outer level = 2 – Inner level = 2

OpenGL 4 tessellation - Outer and inner levels
Outer level = 4 – Inner level = 2

OpenGL 4 tessellation - Outer and inner levels
Outer level = 4 – Inner level = 4

OpenGL 4 tessellation - Outer and inner levels
Outer level = 8 – Inner level = 8

OpenGL 4 tessellation - Outer and inner levels
Outer level = 16 – Inner level = 8

OpenGL 4 tessellation - Outer and inner levels
Outer level = 16 – Inner level = 16

OpenGL 4 tessellation - Outer and inner levels
Outer level = 32 – Inner level = 32

OpenGL 4 tessellation - Outer and inner levels
Outer level = 64 – Inner level = 64
Click to enlarge

Here is a list of useful links. The most important is of course the big GL_ARB_tessellation_shader extension specification.

GPU (or hardware) tessellation is new and cool domain to explore. I will release shortly GPU Caps Viewer with the tessellation support (demo + caps) and why not a new benchmark…

4 thoughts on “(Tested) First Contact with OpenGL 4.0 GPU Tessellation”

  1. nap

    I don’t see any correlation between final count of triangles and FPS. It’s very strange for me.

  2. Pingback: [GPU Tool] GPU Caps Viewer 1.9.0 With OpenGL 4 Tessellation Support - 3D Tech News, Pixel Hacking, Data Visualization and 3D Programming - Geeks3D.com

  3. Pingback: History of hardware tessellation « RasterGrid Blog

Comments are closed.