Clone of mesa.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

cell.html 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <HTML>
  2. <TITLE>Cell Driver</TITLE>
  3. <link rel="stylesheet" type="text/css" href="mesa.css"></head>
  4. <BODY>
  5. <H1>Mesa/Gallium Cell Driver</H1>
  6. <p>
  7. The Mesa
  8. <a href="http://en.wikipedia.org/wiki/Cell_%28microprocessor%29" target="_parent">Cell</a>
  9. driver is part of the
  10. <a href="http://www.tungstengraphics.com/wiki/index.php/Gallium3D" target="_parent">Gallium3D</a>
  11. architecture.
  12. </p>
  13. <p>
  14. <a href="http://www.tungstengraphics.com/" target="_parent">Tungsten Graphics</a>
  15. is leading the project.
  16. Two phases are planned.
  17. First, to implement the framework for parallel rasterization using the Cell
  18. SPEs, including texture mapping.
  19. Second, to implement a full-featured OpenGL driver with support for GLSL, etc.
  20. The second phase is now underway.
  21. </p>
  22. <H2>Source Code</H2>
  23. <p>
  24. The latest Cell driver source code is on the <code>gallium-0.2</code> branch
  25. of the Mesa git repository.
  26. After you've cloned the repository, check out the branch with:
  27. </p>
  28. <pre>
  29. git-checkout -b gallium-0.2 origin/gallium-0.2
  30. </pre>
  31. <p>
  32. To build the driver you'll need the IBM Cell SDK (version 2.1 or 3.0).
  33. To use the driver you'll need a Cell system, such as a PS3 running Linux,
  34. or the Cell Simulator (untested, though).
  35. </p>
  36. <p>
  37. If using Cell SDK 2.1, see the configs/linux-cell file for some
  38. special changes.
  39. </p>
  40. <p>
  41. To compile the code, run <code>make linux-cell</code>.
  42. To build in debug mode, run <code>make linux-cell-debug</code>.
  43. </p>
  44. <p>
  45. To use the library, make sure <code>LD_LIBRARY_PATH</code> points the Mesa/lib/
  46. directory that contains <code>libGL.so</code>.
  47. </p>
  48. <p>
  49. Verify that the Cell driver is being used by running <code>glxinfo</code>
  50. and looking for:
  51. <pre>
  52. OpenGL renderer string: Gallium 0.2, Cell on Xlib
  53. </pre>
  54. <H2>Driver Implementation Summary</H2>
  55. <p>
  56. Rasterization is parallelized across the SPUs in a tiled-based manner.
  57. Batches of transformed triangles are sent to the SPUs (actually, pulled by from
  58. main memory by the SPUs).
  59. Each SPU loops over a set of 32x32-pixel screen tiles, rendering the triangles
  60. into each tile.
  61. Because of the limited SPU memory, framebuffer tiles are paged in/out of
  62. SPU local store as needed.
  63. Similarly, textures are tiled and brought into local store as needed.
  64. </p>
  65. <H2>Status</H2>
  66. <p>
  67. As of September 2008, the driver supports smooth/flat shaded triangle rendering
  68. with Z testing and simple texture mapping.
  69. Simple demos like gears run successfully.
  70. To test texture mapping, try progs/demos/texcyl (press right mouse button for
  71. rendering options).
  72. </p>
  73. <p>
  74. Runtime/dynamic code generation is being done for per-fragment
  75. operations (Z test, blend, etc) and for fragment programs (though only a
  76. few opcodes are implemented now).
  77. </p>
  78. <p>
  79. In general, however, the driver is rather slow because all vertex
  80. transformation is being done by an interpreter running on the PPU.
  81. Programs with many vertices or complex vertex shaders will run especially
  82. slow.
  83. This will be addressed in the future.
  84. </p>
  85. <H2>Debug Options</H2>
  86. <p>
  87. The CELL_DEBUG env var can be set to a comma-separated list of one or
  88. more of the following debug options:
  89. </p>
  90. <ul>
  91. <li><b>checker</b> - use a different background clear color for each SPU.
  92. This lets you see which SPU is rendering which screen tiles.
  93. <li><b>sync</b> - wait/synchronize after each DMA transfer
  94. </ul>
  95. <p>
  96. If the GALLIUM_NOCELL env var is set, the softpipe driver will be used
  97. intead of the Cell driver.
  98. This is useful for comparison/validation.
  99. </p>
  100. <H2>Contributing</H2>
  101. <p>
  102. If you're interested in contributing to the effort, familiarize yourself
  103. with the code, join the <a href="lists.html">mesa3d-dev mailing list</a>,
  104. and describe what you'd like to do.
  105. </p>
  106. </BODY>
  107. </HTML>