1 | Viewperf Issues
|
---|
2 | ===============
|
---|
3 |
|
---|
4 | This page lists known issues with `SPEC Viewperf
|
---|
5 | 11 <https://gwpg.spec.org/benchmarks/benchmark/specviewperf-11/>`__ and
|
---|
6 | `SPEC Viewperf
|
---|
7 | 12 <https://gwpg.spec.org/benchmarks/benchmark/specviewperf-12/>`__ when
|
---|
8 | running on Mesa-based drivers.
|
---|
9 |
|
---|
10 | The Viewperf data sets are basically GL API traces that are recorded
|
---|
11 | from CAD applications, then replayed in the Viewperf framework.
|
---|
12 |
|
---|
13 | The primary problem with these traces is they blindly use features and
|
---|
14 | OpenGL extensions that were supported by the OpenGL driver when the
|
---|
15 | trace was recorded, but there's no checks to see if those features are
|
---|
16 | supported by the driver when playing back the traces with Viewperf.
|
---|
17 |
|
---|
18 | These issues have been reported to the SPEC organization in the hope
|
---|
19 | that they'll be fixed in the future.
|
---|
20 |
|
---|
21 | Viewperf 11
|
---|
22 | -----------
|
---|
23 |
|
---|
24 | Some of the Viewperf 11 tests use a lot of memory. At least 2GB of RAM
|
---|
25 | is recommended.
|
---|
26 |
|
---|
27 | Catia-03 test 2
|
---|
28 | ~~~~~~~~~~~~~~~
|
---|
29 |
|
---|
30 | This test creates over 38000 vertex buffer objects. On some systems this
|
---|
31 | can exceed the maximum number of buffer allocations. Mesa generates
|
---|
32 | GL_OUT_OF_MEMORY errors in this situation, but Viewperf does no error
|
---|
33 | checking and continues. When this happens, some drawing commands become
|
---|
34 | no-ops. This can also eventually lead to a segfault either in Viewperf
|
---|
35 | or the Mesa driver.
|
---|
36 |
|
---|
37 | Catia-03 tests 3, 4, 8
|
---|
38 | ~~~~~~~~~~~~~~~~~~~~~~
|
---|
39 |
|
---|
40 | These tests use features of the
|
---|
41 | :ext:`GL_NV_fragment_program2` and :ext:`GL_NV_vertex_program3` extensions
|
---|
42 | without checking if the driver supports them.
|
---|
43 |
|
---|
44 | When Mesa tries to compile the vertex/fragment programs it generates
|
---|
45 | errors (which Viewperf ignores). Subsequent drawing calls become no-ops
|
---|
46 | and the rendering is incorrect.
|
---|
47 |
|
---|
48 | sw-02 tests 1, 2, 4, 6
|
---|
49 | ~~~~~~~~~~~~~~~~~~~~~~
|
---|
50 |
|
---|
51 | These tests depend on the :ext:`GL_NV_primitive_restart` extension.
|
---|
52 |
|
---|
53 | If the Mesa driver doesn't support this extension the rendering will be
|
---|
54 | incorrect and the test will fail.
|
---|
55 |
|
---|
56 | Also, the color of the line drawings in test 2 seem to appear in a
|
---|
57 | random color. This is probably due to some uninitialized state
|
---|
58 | somewhere.
|
---|
59 |
|
---|
60 | sw-02 test 6
|
---|
61 | ~~~~~~~~~~~~
|
---|
62 |
|
---|
63 | The lines drawn in this test appear in a random color. That's because
|
---|
64 | texture mapping is enabled when the lines are drawn, but no texture
|
---|
65 | image is defined (glTexImage2D() is called with pixels=NULL). Since GL
|
---|
66 | says the contents of the texture image are undefined in that situation,
|
---|
67 | we get a random color.
|
---|
68 |
|
---|
69 | Lightwave-01 test 3
|
---|
70 | ~~~~~~~~~~~~~~~~~~~
|
---|
71 |
|
---|
72 | This test uses a number of mipmapped textures, but the textures are
|
---|
73 | incomplete because the last/smallest mipmap level (1 x 1 pixel) is never
|
---|
74 | specified.
|
---|
75 |
|
---|
76 | A trace captured with `API
|
---|
77 | trace <https://github.com/apitrace/apitrace>`__ shows this sequences of
|
---|
78 | calls like this:
|
---|
79 |
|
---|
80 | ::
|
---|
81 |
|
---|
82 | 2504 glBindTexture(target = GL_TEXTURE_2D, texture = 55)
|
---|
83 | 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))
|
---|
84 | 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))
|
---|
85 | 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))
|
---|
86 | [...]
|
---|
87 | 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))
|
---|
88 | 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))
|
---|
89 | 2514 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MIN_FILTER, param = GL_LINEAR_MIPMAP_LINEAR)
|
---|
90 | 2515 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_S, param = GL_REPEAT)
|
---|
91 | 2516 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_T, param = GL_REPEAT)
|
---|
92 | 2517 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MAG_FILTER, param = GL_NEAREST)
|
---|
93 |
|
---|
94 | Note that one would expect call 2514 to be glTexImage(level=9, width=1,
|
---|
95 | height=1) but it's not there.
|
---|
96 |
|
---|
97 | The minification filter is GL_LINEAR_MIPMAP_LINEAR and the texture's
|
---|
98 | GL_TEXTURE_MAX_LEVEL is 1000 (the default) so a full mipmap is expected.
|
---|
99 |
|
---|
100 | Later, these incomplete textures are bound before drawing calls.
|
---|
101 | According to the GL specification, if a fragment program or fragment
|
---|
102 | shader is being used, the sampler should return (0,0,0,1) ("black") when
|
---|
103 | sampling from an incomplete texture. This is what Mesa does and the
|
---|
104 | resulting rendering is darker than it should be.
|
---|
105 |
|
---|
106 | It appears that NVIDIA's driver (and possibly AMD's driver) detects this
|
---|
107 | case and returns (1,1,1,1) (white) which causes the rendering to appear
|
---|
108 | brighter and match the reference image (however, AMD's rendering is
|
---|
109 | *much* brighter than NVIDIA's).
|
---|
110 |
|
---|
111 | If the fallback texture created in \_mesa_get_fallback_texture() is
|
---|
112 | initialized to be full white instead of full black the rendering appears
|
---|
113 | correct. However, we have no plans to implement this work-around in
|
---|
114 | Mesa.
|
---|
115 |
|
---|
116 | Maya-03 test 2
|
---|
117 | ~~~~~~~~~~~~~~
|
---|
118 |
|
---|
119 | This test makes some unusual calls to glRotate. For example:
|
---|
120 |
|
---|
121 | .. code-block:: c
|
---|
122 |
|
---|
123 | glRotate(50, 50, 50, 1);
|
---|
124 | glRotate(100, 100, 100, 1);
|
---|
125 | glRotate(52, 52, 52, 1);
|
---|
126 |
|
---|
127 | These unusual values lead to invalid modelview matrices. For example,
|
---|
128 | the last glRotate command above produces this matrix with Mesa:
|
---|
129 |
|
---|
130 | .. math::
|
---|
131 |
|
---|
132 | \begin{matrix}
|
---|
133 | 1.08536 \times 10^{24} & 2.55321 \times 10^{-23} & -0.000160389 & 0\\
|
---|
134 | 5.96937 \times 10^{25} & 1.08536 \times 10^{24} & 103408 & 0\\
|
---|
135 | 103408 & -0.000160389 & 1.74755\times 10^{9} & 0\\
|
---|
136 | 0 & 0 & 0 & nan
|
---|
137 | \end{matrix}
|
---|
138 |
|
---|
139 | and with NVIDIA's OpenGL:
|
---|
140 |
|
---|
141 | .. math::
|
---|
142 |
|
---|
143 | \begin{matrix}
|
---|
144 | 1.4013 \times 10^{-45} & 0 & -nan & 0\\
|
---|
145 | 0 & 1.4013 \times 10^{-45} & 1.4013 \times 10^{-45} & 0\\
|
---|
146 | 1.4013 \times 10^{-45} & -nan & 1.4013 \times 10^{-45} & 0\\
|
---|
147 | 0 & 0 & 0 & 1.4013 \times 10^{-45}
|
---|
148 | \end{matrix}
|
---|
149 |
|
---|
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
|
---|
152 | enabled.
|
---|
153 |
|
---|
154 | Proe-05 test 1
|
---|
155 | ~~~~~~~~~~~~~~
|
---|
156 |
|
---|
157 | This uses depth testing but there's two problems:
|
---|
158 |
|
---|
159 | #. The glXChooseFBConfig() call doesn't request a depth buffer
|
---|
160 | #. The test never calls glClear(GL_DEPTH_BUFFER_BIT) to initialize the
|
---|
161 | depth buffer
|
---|
162 |
|
---|
163 | If the chosen visual does not have a depth buffer, you'll see the
|
---|
164 | wireframe car model but it won't be rendered correctly.
|
---|
165 |
|
---|
166 | If (by luck) the chosen visual has a depth buffer, its initial contents
|
---|
167 | will be undefined so you may or may not see parts of the model.
|
---|
168 |
|
---|
169 | Interestingly, with NVIDIA's driver most visuals happen to have a depth
|
---|
170 | buffer and apparently the contents are initialized to 1.0 by default so
|
---|
171 | this test just happens to work with their drivers.
|
---|
172 |
|
---|
173 | Finally, even if a depth buffer was requested and the
|
---|
174 | glClear(GL_COLOR_BUFFER_BIT) calls were changed to
|
---|
175 | glClear(GL_COLOR_BUFFER_BIT \| GL_DEPTH_BUFFER_BIT) the problem still
|
---|
176 | wouldn't be fixed because GL_DEPTH_WRITEMASK=GL_FALSE when glClear is
|
---|
177 | called so clearing the depth buffer would be a no-op anyway.
|
---|
178 |
|
---|
179 | Proe-05 test 6
|
---|
180 | ~~~~~~~~~~~~~~
|
---|
181 |
|
---|
182 | This test draws an engine model with a two-pass algorithm. The first
|
---|
183 | pass is drawn with polygon stipple enabled. The second pass is drawn
|
---|
184 | without polygon stipple but with blending and GL_DEPTH_FUNC=GL_LEQUAL.
|
---|
185 | If either of the two passes happen to use a software fallback of some
|
---|
186 | sort, the Z values of fragments may be different between the two passes.
|
---|
187 | This leads to incorrect rendering.
|
---|
188 |
|
---|
189 | For example, the VMware SVGA Gallium driver uses a special semi-fallback
|
---|
190 | path for drawing with polygon stipple. Since the two passes are rendered
|
---|
191 | with different vertex transformation implementations, the rendering
|
---|
192 | doesn't appear as expected. Setting the SVGA_FORCE_SWTNL environment
|
---|
193 | variable to 1 will force the driver to use the software vertex path all
|
---|
194 | the time and clears up this issue.
|
---|
195 |
|
---|
196 | According to the OpenGL invariance rules, there's no guarantee that the
|
---|
197 | pixels produced by these two rendering states will match. To achieve
|
---|
198 | invariance, both passes should enable polygon stipple and blending with
|
---|
199 | appropriate patterns/modes to ensure the same fragments are produced in
|
---|
200 | both passes.
|
---|
201 |
|
---|
202 | Viewperf 12
|
---|
203 | -----------
|
---|
204 |
|
---|
205 | Note that Viewperf 12 only runs on 64-bit Windows 7 or later.
|
---|
206 |
|
---|
207 | catia-04
|
---|
208 | ~~~~~~~~
|
---|
209 |
|
---|
210 | One of the catia tests calls wglGetProcAddress() to get some
|
---|
211 | :ext:`GL_EXT_direct_state_access` functions (such as
|
---|
212 | glBindMultiTextureEXT) and some :ext:`GL_NV_half_float` functions (such
|
---|
213 | as glMultiTexCoord3hNV). If the extension/function is not supported,
|
---|
214 | wglGetProcAddress() can return NULL. Unfortunately, Viewperf doesn't check
|
---|
215 | for null pointers and crashes when it later tries to use the pointer.
|
---|
216 |
|
---|
217 | Another catia test uses OpenGL 3.1's primitive restart feature. But when
|
---|
218 | Viewperf creates an OpenGL context, it doesn't request version 3.1 If
|
---|
219 | the driver returns version 3.0 or earlier all the calls related to
|
---|
220 | primitive restart generate an OpenGL error. Some of the rendering is
|
---|
221 | then incorrect.
|
---|
222 |
|
---|
223 | energy-01
|
---|
224 | ~~~~~~~~~
|
---|
225 |
|
---|
226 | This test creates a 3D luminance texture of size 1K x 1K x 1K. If the
|
---|
227 | OpenGL driver/device doesn't support a texture of this size the
|
---|
228 | glTexImage3D() call will fail with GL_INVALID_VALUE or GL_OUT_OF_MEMORY
|
---|
229 | and all that's rendered is plain white polygons. Ideally, the test would
|
---|
230 | use a proxy texture to determine the max 3D texture size. But it does
|
---|
231 | not do that.
|
---|
232 |
|
---|
233 | maya-04
|
---|
234 | ~~~~~~~
|
---|
235 |
|
---|
236 | This test generates many GL_INVALID_OPERATION errors in its calls to
|
---|
237 | glUniform(). Causes include:
|
---|
238 |
|
---|
239 | - Trying to set float uniforms with glUniformi()
|
---|
240 | - Trying to set float uniforms with glUniform3f()
|
---|
241 | - Trying to set matrix uniforms with glUniform() instead of
|
---|
242 | glUniformMatrix().
|
---|
243 |
|
---|
244 | Apparently, the indexes returned by glGetUniformLocation() were
|
---|
245 | hard-coded into the application trace when it was created. Since
|
---|
246 | different implementations of glGetUniformLocation() may return different
|
---|
247 | values for any given uniform name, subsequent calls to glUniform() will
|
---|
248 | be invalid since they refer to the wrong uniform variables. This causes
|
---|
249 | many OpenGL errors and leads to incorrect rendering.
|
---|
250 |
|
---|
251 | medical-01
|
---|
252 | ~~~~~~~~~~
|
---|
253 |
|
---|
254 | This test uses a single GLSL fragment shader which contains a GLSL 1.20
|
---|
255 | array initializer statement, but it neglects to specify ``#version 120``
|
---|
256 | at the top of the shader code. So, the shader does not compile and all
|
---|
257 | that's rendered is plain white polygons.
|
---|
258 |
|
---|
259 | Also, the test tries to create a very large 3D texture that may exceed
|
---|
260 | the device driver's limit. When this happens, the glTexImage3D call
|
---|
261 | fails and all that's rendered is a white box.
|
---|
262 |
|
---|
263 | showcase-01
|
---|
264 | ~~~~~~~~~~~
|
---|
265 |
|
---|
266 | This is actually a DX11 test based on Autodesk's Showcase product. As
|
---|
267 | such, it won't run with Mesa.
|
---|