cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

AveryYang
Journeyman III

Geometry shader performance

Hi all,

I have a question when writing a geometry shader code.

If I use a vertex and generate above 10,000 polygons in geometry shader instead of draw above 10,000 polygons in vertex buffer, is the former's performance better than the latter?

How can I measure and prove it?

Thanks for reading patiently.

0 Likes
1 Reply
linqunzju
Staff

- draw above 10,000 polygons in vertex buffer should be faster

- in theory, vertex shader and geometry shader have the similar performance ( emit vertex per clock), so if you need handle same vertices, the performance should be similar, but actually additional pipeline will hurt the performance.

- geometry shader output is write to video memory, so use geometry shader can save memory bandwidth.

- you can use timer query to measure the performance. please reference http://www.opengl.org/registry/specs/ARB/timer_query.txt for detail.

 

0 Likes