diff options
Diffstat (limited to 'docs/perf.rst')
-rw-r--r-- | docs/perf.rst | 112 |
1 files changed, 41 insertions, 71 deletions
diff --git a/docs/perf.rst b/docs/perf.rst index 64e7763c58..5907a7fe8b 100644 --- a/docs/perf.rst +++ b/docs/perf.rst @@ -1,74 +1,44 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html lang="en"><head> - <meta content="text/html; charset=utf-8" http-equiv="content-type"/> - <title>Performance Tips</title> - <link href="mesa.css" rel="stylesheet" type="text/css"/> -</head> -<body> +Performance Tips +================ - - - - - -<h1>Performance Tips</h1> - -<p> Performance tips for software rendering: -</p> -<ol> - -<li> Turn off smooth shading when you don't need it (glShadeModel) -</li><li> Turn off depth buffering when you don't need it. -</li><li> Turn off dithering when not needed. -</li><li> Use double buffering as it's often faster than single buffering -</li><li> Compile in the X Shared Memory extension option if it's supported - on your system by adding -DSHM to CFLAGS and -lXext to XLIBS for - your system in the Make-config file. -</li><li> Recompile Mesa with more optimization if possible. -</li><li> Try to maximize the amount of drawing done between glBegin/glEnd pairs. -</li><li> Use the MESA_BACK_BUFFER variable to find best performance in double - buffered mode. (X users only) -</li><li> Optimized polygon rasterizers are employed when: - rendering into back buffer which is an XImage - RGB mode, not grayscale, not monochrome - depth buffering is GL_LESS, or disabled - flat or smooth shading - dithered or non-dithered - no other rasterization operations enabled (blending, stencil, etc) -</li><li> Optimized line drawing is employed when: - rendering into back buffer which is an XImage - RGB mode, not grayscale, not monochrome - depth buffering is GL_LESS or disabled - flat shading - dithered or non-dithered - no other rasterization operations enabled (blending, stencil, etc) -</li><li> Textured polygons are fastest when: - using a 3-component (RGB), 2-D texture - minification and magnification filters are GL_NEAREST - texture coordinate wrap modes for S and T are GL_REPEAT - GL_DECAL environment mode - glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST ) - depth buffering is GL_LESS or disabled -</li><li> Lighting is fastest when: - Two-sided lighting is disabled - GL_LIGHT_MODEL_LOCAL_VIEWER is false - GL_COLOR_MATERIAL is disabled - No spot lights are used (all GL_SPOT_CUTOFFs are 180.0) - No local lights are used (all position W's are 0.0) - All material and light coefficients are >= zero -</li><li> XFree86 users: if you want to use 24-bit color try starting your - X server in 32-bit per pixel mode for better performance. That is, - start your X server with - startx -- -bpp 32 - instead of - startx -- -bpp 24 -</li><li> Try disabling dithering with the MESA_NO_DITHER environment variable. - If this env var is defined Mesa will disable dithering and the - command glEnable(GL_DITHER) will be ignored. -</li></ol> - - - -</body></html>
\ No newline at end of file +#. Turn off smooth shading when you don't need it (glShadeModel) +#. Turn off depth buffering when you don't need it. +#. Turn off dithering when not needed. +#. Use double buffering as it's often faster than single buffering +#. Compile in the X Shared Memory extension option if it's supported on + your system by adding -DSHM to CFLAGS and -lXext to XLIBS for your + system in the Make-config file. +#. Recompile Mesa with more optimization if possible. +#. Try to maximize the amount of drawing done between glBegin/glEnd + pairs. +#. Use the MESA\_BACK\_BUFFER variable to find best performance in + double buffered mode. (X users only) +#. Optimized polygon rasterizers are employed when: rendering into back + buffer which is an XImage RGB mode, not grayscale, not monochrome + depth buffering is GL\_LESS, or disabled flat or smooth shading + dithered or non-dithered no other rasterization operations enabled + (blending, stencil, etc) +#. Optimized line drawing is employed when: rendering into back buffer + which is an XImage RGB mode, not grayscale, not monochrome depth + buffering is GL\_LESS or disabled flat shading dithered or + non-dithered no other rasterization operations enabled (blending, + stencil, etc) +#. Textured polygons are fastest when: using a 3-component (RGB), 2-D + texture minification and magnification filters are GL\_NEAREST + texture coordinate wrap modes for S and T are GL\_REPEAT GL\_DECAL + environment mode glHint( GL\_PERSPECTIVE\_CORRECTION\_HINT, + GL\_FASTEST ) depth buffering is GL\_LESS or disabled +#. Lighting is fastest when: Two-sided lighting is disabled + GL\_LIGHT\_MODEL\_LOCAL\_VIEWER is false GL\_COLOR\_MATERIAL is + disabled No spot lights are used (all GL\_SPOT\_CUTOFFs are 180.0) No + local lights are used (all position W's are 0.0) All material and + light coefficients are >= zero +#. XFree86 users: if you want to use 24-bit color try starting your X + server in 32-bit per pixel mode for better performance. That is, + start your X server with startx -- -bpp 32 instead of startx -- -bpp + 24 +#. Try disabling dithering with the MESA\_NO\_DITHER environment + variable. If this env var is defined Mesa will disable dithering and + the command glEnable(GL\_DITHER) will be ignored. |