Merge remote branch 'origin/master' into pipe-video
[mesa.git] / docs / perf.html
1 <HTML>
2
3 <TITLE>Performance Tips</TITLE>
4
5 <link rel="stylesheet" type="text/css" href="mesa.css"></head>
6
7 <BODY>
8
9 <H1>Performance Tips</H1>
10
11 <p>
12 Performance tips for software rendering:
13 </P>
14 <ol>
15
16 <li> Turn off smooth shading when you don't need it (glShadeModel)
17 <li> Turn off depth buffering when you don't need it.
18 <li> Turn off dithering when not needed.
19 <li> Use double buffering as it's often faster than single buffering
20 <li> Compile in the X Shared Memory extension option if it's supported
21 on your system by adding -DSHM to CFLAGS and -lXext to XLIBS for
22 your system in the Make-config file.
23 <li> Recompile Mesa with more optimization if possible.
24 <li> Try to maximize the amount of drawing done between glBegin/glEnd pairs.
25 <li> Use the MESA_BACK_BUFFER variable to find best performance in double
26 buffered mode. (X users only)
27 <li> Optimized polygon rasterizers are employed when:
28 rendering into back buffer which is an XImage
29 RGB mode, not grayscale, not monochrome
30 depth buffering is GL_LESS, or disabled
31 flat or smooth shading
32 dithered or non-dithered
33 no other rasterization operations enabled (blending, stencil, etc)
34 <li> Optimized line drawing is employed when:
35 rendering into back buffer which is an XImage
36 RGB mode, not grayscale, not monochrome
37 depth buffering is GL_LESS or disabled
38 flat shading
39 dithered or non-dithered
40 no other rasterization operations enabled (blending, stencil, etc)
41 <li> Textured polygons are fastest when:
42 using a 3-component (RGB), 2-D texture
43 minification and magnification filters are GL_NEAREST
44 texture coordinate wrap modes for S and T are GL_REPEAT
45 GL_DECAL environment mode
46 glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST )
47 depth buffering is GL_LESS or disabled
48 <li> Lighting is fastest when:
49 Two-sided lighting is disabled
50 GL_LIGHT_MODEL_LOCAL_VIEWER is false
51 GL_COLOR_MATERIAL is disabled
52 No spot lights are used (all GL_SPOT_CUTOFFs are 180.0)
53 No local lights are used (all position W's are 0.0)
54 All material and light coefficients are >= zero
55 <li> XFree86 users: if you want to use 24-bit color try starting your
56 X server in 32-bit per pixel mode for better performance. That is,
57 start your X server with
58 startx -- -bpp 32
59 instead of
60 startx -- -bpp 24
61 <li> Try disabling dithering with the MESA_NO_DITHER environment variable.
62 If this env var is defined Mesa will disable dithering and the
63 command glEnable(GL_DITHER) will be ignored.
64 </ol>
65
66
67 </BODY>
68 </HTML>