Clone of mesa.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

viewperf.html 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <HTML>
  2. <TITLE>Viewperf Issues</TITLE>
  3. <link rel="stylesheet" type="text/css" href="mesa.css"></head>
  4. <BODY>
  5. <h1>Viewperf Issues</h1>
  6. <p>
  7. This page lists known issues with
  8. <a href="http://www.spec.org/gwpg/gpc.static/vp11info.html" target="_main">SPEC Viewperf 11</a>
  9. when running on Mesa-based drivers.
  10. </p>
  11. <p>
  12. The Viewperf data sets are basically GL API traces that are recorded from
  13. CAD applications, then replayed in the Viewperf framework.
  14. </p>
  15. <p>
  16. The primary problem with these traces is they blindly use features and
  17. OpenGL extensions that were supported by the OpenGL driver when the trace
  18. was recorded,
  19. but there's no checks to see if those features are supported by the driver
  20. when playing back the traces with Viewperf.
  21. </p>
  22. <p>
  23. These issues have been reported to the SPEC organization in the hope that
  24. they'll be fixed in the future.
  25. </p>
  26. <p>
  27. Some of the Viewperf tests use a lot of memory.
  28. At least 2GB of RAM is recommended.
  29. </p>
  30. <h2>Catia-03 test 2</h2>
  31. <p>
  32. This test creates over 38000 vertex buffer objects. On some systems
  33. this can exceed the maximum number of buffer allocations. Mesa
  34. generates GL_OUT_OF_MEMORY errors in this situation, but Viewperf
  35. does no error checking and continues. When this happens, some drawing
  36. commands become no-ops. This can also eventually lead to a segfault
  37. either in Viewperf or the Mesa driver.
  38. </p>
  39. <h2>Catia-03 tests 3, 4, 8</h2>
  40. <p>
  41. These tests use features of the
  42. <a href="http://www.opengl.org/registry/specs/NV/fragment_program2.txt"
  43. target="_main">
  44. GL_NV_fragment_program2</a> and
  45. <a href="http://www.opengl.org/registry/specs/NV/vertex_program3.txt"
  46. target="_main">
  47. GL_NV_vertex_program3</a> extensions without checking if the driver supports
  48. them.
  49. </p>
  50. <p>
  51. When Mesa tries to compile the vertex/fragment programs it generates errors
  52. (which Viewperf ignores).
  53. Subsequent drawing calls become no-ops and the rendering is incorrect.
  54. </p>
  55. <h2>sw-02 tests 1, 2, 4, 6</h2>
  56. <p>
  57. These tests depend on the
  58. <a href="http://www.opengl.org/registry/specs/NV/primitive_restart.txt"
  59. target="_main">GL_NV_primitive_restart</a> extension.
  60. </p>
  61. <p>
  62. If the Mesa driver doesn't support this extension the rendering will
  63. be incorrect and the test will fail.
  64. </p>
  65. <h2>sw-02 test 6</h2>
  66. <p>
  67. The lines drawn in this test appear in a random color.
  68. That's because texture mapping is enabled when the lines are drawn, but no
  69. texture image is defined (glTexImage2D() is called with pixels=NULL).
  70. Since GL says the contents of the texture image are undefined in that
  71. situation, we get a random color.
  72. </p>
  73. <h2>Lightwave-01 test 3</h2>
  74. <p>
  75. This test uses a number of mipmapped textures, but the textures are
  76. incomplete because the last/smallest mipmap level (1 x 1 pixel) is
  77. never specified.
  78. </p>
  79. <p>
  80. A trace captured with
  81. <a href="https://github.com/apitrace/apitrace" target="_main">API trace</a>
  82. shows this sequences of calls like this:
  83. <pre>
  84. 2504 glBindTexture(target = GL_TEXTURE_2D, texture = 55)
  85. 2505 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat = GL_RGBA, width = 512, height = 512, border = 0, format = GL_RGB, type = GL_UNSIGNED_SHORT, pixels = blob(1572864))
  86. 2506 glTexImage2D(target = GL_TEXTURE_2D, level = 1, internalformat = GL_RGBA, width = 256, height = 256, border = 0, format = GL_RGB, type = GL_UNSIGNED_SHORT, pixels = blob(393216))
  87. 2507 glTexImage2D(target = GL_TEXTURE_2D, level = 2, internalformat = GL_RGBA, width = 128, height = 128, border = 0, format = GL_RGB, type = GL_UNSIGNED_SHORT, pixels = blob(98304))
  88. [...]
  89. 2512 glTexImage2D(target = GL_TEXTURE_2D, level = 7, internalformat = GL_RGBA, width = 4, height = 4, border = 0, format = GL_RGB, type = GL_UNSIGNED_SHORT, pixels = blob(96))
  90. 2513 glTexImage2D(target = GL_TEXTURE_2D, level = 8, internalformat = GL_RGBA, width = 2, height = 2, border = 0, format = GL_RGB, type = GL_UNSIGNED_SHORT, pixels = blob(24))
  91. 2514 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MIN_FILTER, param = GL_LINEAR_MIPMAP_LINEAR)
  92. 2515 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_S, param = GL_REPEAT)
  93. 2516 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_T, param = GL_REPEAT)
  94. 2517 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MAG_FILTER, param = GL_NEAREST)
  95. </pre>
  96. <p>
  97. Note that one would expect call 2514 to be glTexImage(level=9, width=1,
  98. height=1) but it's not there.
  99. </p>
  100. <p>
  101. The minification filter is GL_LINEAR_MIPMAP_LINEAR and the texture's
  102. GL_TEXTURE_MAX_LEVEL is 1000 (the default) so a full mipmap is expected.
  103. </p>
  104. <p>
  105. Later, these incomplete textures are bound before drawing calls.
  106. According to the GL specification, if a fragment program or fragment shader
  107. is being used, the sampler should return (0,0,0,1) ("black") when sampling
  108. from an incomplete texture.
  109. This is what Mesa does and the resulting rendering is darker than it should
  110. be.
  111. </p>
  112. <p>
  113. It appears that NVIDIA's driver (and possibly AMD's driver) detects this case
  114. and returns (1,1,1,1) (white) which causes the rendering to appear brighter
  115. and match the reference image (however, AMD's rendering is <em>much</em>
  116. brighter than NVIDIA's).
  117. </p>
  118. <p>
  119. If the fallback texture created in _mesa_get_fallback_texture() is
  120. initialized to be full white instead of full black the rendering appears
  121. correct.
  122. However, we have no plans to implement this work-around in Mesa.
  123. </p>
  124. <h2>Maya-03 test 2</h2>
  125. <p>
  126. This test makes some unusual calls to glRotate. For example:
  127. </p>
  128. <pre>
  129. glRotate(50, 50, 50, 1);
  130. glRotate(100, 100, 100, 1);
  131. glRotate(52, 52, 52, 1);
  132. </pre>
  133. <p>
  134. These unusual values lead to invalid modelview matrices.
  135. For example, the last glRotate command above produces this matrix with Mesa:
  136. <pre>
  137. 1.08536e+24 2.55321e-23 -0.000160389 0
  138. 5.96937e-25 1.08536e+24 103408 0
  139. 103408 -0.000160389 1.74755e+09 0
  140. 0 0 0 nan
  141. </pre>
  142. and with NVIDIA's OpenGL:
  143. <pre>
  144. 1.4013e-45 0 -nan 0
  145. 0 1.4013e-45 1.4013e-45 0
  146. 1.4013e-45 -nan 1.4013e-45 0
  147. 0 0 0 1.4013e-45
  148. </pre>
  149. <p>
  150. This causes the object in question to be drawn in a strange orientation
  151. and with a semi-random color (between white and black) since GL_FOG is enabled.
  152. </p>
  153. </BODY>
  154. </HTML>