The purpose of this assignment is to explore the performance characteristics of graphics hardware.
Explore the crossover point between geometry and rasterization.
Modern graphics hardware can be generalized into two parallel components: geometry and rasterization. The performance of the graphics system is determined by the slower of these two components. For small triangles, the rasterization work per triangle is small so the system is limited by the rate at which vertices can be processed. For large triangles, the fragment operations dominate the rendering pipeline.
Provided for this assignment is a sample benchmarking application called GfxBench. It measures the fill rate and triangle rate using OpenGL. Modify the GfxBench application to examine the crossover point between geometry limited rendering and rasterization limited rendering. Graph the triangle rate as a function of triangle size for regular smooth shaded triangles. What is the crossover point?
Next, modify the program to determine the triangle rate, fill rate, and crossover point for the following: textured triangles, lit triangles, and textured, lit triangles. Graph and explain your results in a one page (not including graphs or code) write up. Compare your results for the different triangle types and explain why they may exist. Please include your source code in your write-up. Be sure to discuss any interesting details you might find.
Rasterization
What is the effect of triangle shape on rasterization
performance? Is there a difference in long, thin vertical
triangles verses long, thin horizontal triangles? Modify the GfxBench
application to test a variety of triangle shapes. Also
graph fill rate as a function of triangle size. Present
your results and discuss what this tells you about how the rasterizer
works.
Texturing
Explore the texture cache behavior. Modern graphics hardware
maintains an on-chip
texture cache as well as using on-board video
memory for local texture storage. Modify the GfxBench program to determine
the size of the on-chip texture cache and on-board texture
memory usage. How does the performance change as a function of
texture angle? Graph your results and explain the texture cache
behavior and how you were able to measure it.
Vertex Engine
Modern graphics hardware includes a vertex cache for triangles that
share vertices. This cache maintains transformed vertices that can
improve geometry rates. Modify the GfxBench application to examine
the vertex cache size and performance. Graph and explain your
results. Discuss briefly the benefits and tradeoffs of a vertex
cache.
Graphics Interface
Modify the GfxBench application to explore the front end of the
graphics pipeline. Modern graphics hardware allows for placing vertex
data in AGP memory or on-board video memory for increased geometry
performance. Use the NVIDIA "VertexArrayRange" extension to examine
the performance of using AGP and video memory for vertex data compared
to regular malloc'ed memory. Is one better than the other? Why is this?
(See the NVIDIA Opengl Extension spec for more
details.)
Homework is due Monday, October 29th at the start of class (2:30pm). If you need an extension please send email in advance.
You are allowed to work in groups of two. At least one person should be familiar with OpenGL programming. If you have not programmed in OpenGL, find someone else in the class who has to pair up with.
Submitting Your Results: Write up a web page which includes a complete report of your results, including source any source code wrote and graphs of your data. Email the URL of to cs448a@graphics.stanford.edu before class on Monday, October 29th.
Sample Code: The source code and compiled excutable for the GfxBench application can be found here:
It builds in Windows or Linux using Microsoft Visual Studio 6 or GNUMake.
Where to access to graphics hardware: The Raptor and Firebird clusters in the basement of Sweet hall have NVIDIA Geforce or Quadro boards. You are welcome to work on your own PC as long as it has a modern consumer graphics card like a NIVIDA Geforce or ATI Radeon (or better). Your welcome to work with Linux or Windows. Please make sure that you are using graphics hardware and are not testing against a software rasterizer like Mesa or Microsoft OpenGL. The GfxBench will display the vendor information of the OpenGL implementation installed on the machine.
Contact: For questions or help email cs448a@graphics.stanford.edu
Grading: A high grade will be awarded if you demonstrate a good understanding of how graphics hardware could work. Coming up with the correct value for a particular performance metric is less important than how you analyize your results. You are not expected to know all of the details regarding the system you benchmark. Rather your grade will be determined by the tests you design and your analysis of the results.