Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4358 | Serge | 1 | |
2 | |||
3 | |||
4 | |||
5 |
|
||
6 | |||
7 | |||
8 | |||
9 | |||
10 | |||
11 |
|
||
12 | |||
13 | |||
14 | |||
15 | |||
16 | |||
17 |
|
||
18 | |||
19 | |||
20 | This page lists known issues with |
||
21 | SPEC Viewperf 11 |
||
22 | when running on Mesa-based drivers. |
||
23 | |||
24 | |||
25 | |||
26 | The Viewperf data sets are basically GL API traces that are recorded from |
||
27 | CAD applications, then replayed in the Viewperf framework. |
||
28 | |||
29 | |||
30 | |||
31 | The primary problem with these traces is they blindly use features and |
||
32 | OpenGL extensions that were supported by the OpenGL driver when the trace |
||
33 | was recorded, |
||
34 | but there's no checks to see if those features are supported by the driver |
||
35 | when playing back the traces with Viewperf. |
||
36 | |||
37 | |||
38 | |||
39 | These issues have been reported to the SPEC organization in the hope that |
||
40 | they'll be fixed in the future. |
||
41 | |||
42 | |||
43 | |||
44 | Some of the Viewperf tests use a lot of memory. |
||
45 | At least 2GB of RAM is recommended. |
||
46 | |||
47 | |||
48 | |||
49 |
|
||
50 | |||
51 | |||
52 | This test creates over 38000 vertex buffer objects. On some systems |
||
53 | this can exceed the maximum number of buffer allocations. Mesa |
||
54 | generates GL_OUT_OF_MEMORY errors in this situation, but Viewperf |
||
55 | does no error checking and continues. When this happens, some drawing |
||
56 | commands become no-ops. This can also eventually lead to a segfault |
||
57 | either in Viewperf or the Mesa driver. |
||
58 | |||
59 | |||
60 | |||
61 | |||
62 |
|
||
63 | |||
64 | |||
65 | These tests use features of the |
||
66 | |||
67 | target="_main"> |
||
68 | GL_NV_fragment_program2 and |
||
69 | |||
70 | target="_main"> |
||
71 | GL_NV_vertex_program3 extensions without checking if the driver supports |
||
72 | them. |
||
73 | |||
74 | |||
75 | When Mesa tries to compile the vertex/fragment programs it generates errors |
||
76 | (which Viewperf ignores). |
||
77 | Subsequent drawing calls become no-ops and the rendering is incorrect. |
||
78 | |||
79 | |||
80 | |||
81 | |||
82 |
|
||
83 | |||
84 | |||
85 | These tests depend on the |
||
86 | |||
87 | target="_main">GL_NV_primitive_restart extension. |
||
88 | |||
89 | |||
90 | |||
91 | If the Mesa driver doesn't support this extension the rendering will |
||
92 | be incorrect and the test will fail. |
||
93 | |||
94 | |||
95 | |||
96 | Also, the color of the line drawings in test 2 seem to appear in a random |
||
97 | color. This is probably due to some uninitialized state somewhere. |
||
98 | |||
99 | |||
100 | |||
101 | |||
102 |
|
||
103 | |||
104 | |||
105 | The lines drawn in this test appear in a random color. |
||
106 | That's because texture mapping is enabled when the lines are drawn, but no |
||
107 | texture image is defined (glTexImage2D() is called with pixels=NULL). |
||
108 | Since GL says the contents of the texture image are undefined in that |
||
109 | situation, we get a random color. |
||
110 | |||
111 | |||
112 | |||
113 | |||
114 |
|
||
115 | |||
116 | |||
117 | This test uses a number of mipmapped textures, but the textures are |
||
118 | incomplete because the last/smallest mipmap level (1 x 1 pixel) is |
||
119 | never specified. |
||
120 | |||
121 | |||
122 | |||
123 | A trace captured with |
||
124 | API trace |
||
125 | shows this sequences of calls like this: |
||
126 | |||
127 | |||
128 | 2504 glBindTexture(target = GL_TEXTURE_2D, texture = 55) |
||
129 | 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)) |
||
130 | 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)) |
||
131 | 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)) |
||
132 | [...] |
||
133 | 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)) |
||
134 | 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)) |
||
135 | 2514 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MIN_FILTER, param = GL_LINEAR_MIPMAP_LINEAR) |
||
136 | 2515 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_S, param = GL_REPEAT) |
||
137 | 2516 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_WRAP_T, param = GL_REPEAT) |
||
138 | 2517 glTexParameteri(target = GL_TEXTURE_2D, pname = GL_TEXTURE_MAG_FILTER, param = GL_NEAREST) |
||
139 | |||
140 | |||
141 | |||
142 | Note that one would expect call 2514 to be glTexImage(level=9, width=1, |
||
143 | height=1) but it's not there. |
||
144 | |||
145 | |||
146 | |||
147 | The minification filter is GL_LINEAR_MIPMAP_LINEAR and the texture's |
||
148 | GL_TEXTURE_MAX_LEVEL is 1000 (the default) so a full mipmap is expected. |
||
149 | |||
150 | |||
151 | |||
152 | Later, these incomplete textures are bound before drawing calls. |
||
153 | According to the GL specification, if a fragment program or fragment shader |
||
154 | is being used, the sampler should return (0,0,0,1) ("black") when sampling |
||
155 | from an incomplete texture. |
||
156 | This is what Mesa does and the resulting rendering is darker than it should |
||
157 | be. |
||
158 | |||
159 | |||
160 | |||
161 | It appears that NVIDIA's driver (and possibly AMD's driver) detects this case |
||
162 | and returns (1,1,1,1) (white) which causes the rendering to appear brighter |
||
163 | and match the reference image (however, AMD's rendering is much |
||
164 | brighter than NVIDIA's). |
||
165 | |||
166 | |||
167 | |||
168 | If the fallback texture created in _mesa_get_fallback_texture() is |
||
169 | initialized to be full white instead of full black the rendering appears |
||
170 | correct. |
||
171 | However, we have no plans to implement this work-around in Mesa. |
||
172 | |||
173 | |||
174 | |||
175 |
|
||
176 | |||
177 | |||
178 | This test makes some unusual calls to glRotate. For example: |
||
179 | |||
180 | |||
181 | glRotate(50, 50, 50, 1); |
||
182 | glRotate(100, 100, 100, 1); |
||
183 | glRotate(52, 52, 52, 1); |
||
184 | |||
185 | |||
186 | These unusual values lead to invalid modelview matrices. |
||
187 | For example, the last glRotate command above produces this matrix with Mesa: |
||
188 | |||
189 | 1.08536e+24 2.55321e-23 -0.000160389 0 |
||
190 | 5.96937e-25 1.08536e+24 103408 0 |
||
191 | 103408 -0.000160389 1.74755e+09 0 |
||
192 | |||
193 | |||
194 | and with NVIDIA's OpenGL: |
||
195 | |||
196 | 1.4013e-45 0 -nan 0 |
||
197 | |||
198 | 1.4013e-45 -nan 1.4013e-45 0 |
||
199 | |||
200 | |||
201 | |||
202 | This causes the object in question to be drawn in a strange orientation |
||
203 | and with a semi-random color (between white and black) since GL_FOG is enabled. |
||
204 | |||
205 | |||
206 | |||
207 |
|
||
208 | |||
209 | |||
210 | This uses depth testing but there's two problems: |
||
211 | |||
212 | |||
213 | |||
214 | |||
215 | |||
216 | If the chosen visual does not have a depth buffer, you'll see the wireframe |
||
217 | car model but it won't be rendered correctly. |
||
218 | |||
219 | If (by luck) the chosen visual has a depth buffer, its initial contents |
||
220 | will be undefined so you may or may not see parts of the model. |
||
221 | |||
222 | Interestingly, with NVIDIA's driver most visuals happen to have a depth buffer |
||
223 | and apparently the contents are initialized to 1.0 by default so this test |
||
224 | just happens to work with their drivers. |
||
225 | |||
226 | |||
227 | |||
228 | Finally, even if a depth buffer was requested and the glClear(GL_COLOR_BUFFER_BIT) |
||
229 | calls were changed to glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) |
||
230 | the problem still wouldn't be fixed because GL_DEPTH_WRITEMASK=GL_FALSE when |
||
231 | glClear is called so clearing the depth buffer would be a no-op anyway. |
||
232 | |||
233 | |||
234 | |||
235 |
|
||
236 | |||
237 | |||
238 | This test draws an engine model with a two-pass algorithm. |
||
239 | The first pass is drawn with polygon stipple enabled. |
||
240 | The second pass is drawn without polygon stipple but with blending |
||
241 | and GL_DEPTH_FUNC=GL_LEQUAL. |
||
242 | If either of the two passes happen to use a software fallback of some |
||
243 | sort, the Z values of fragments may be different between the two passes. |
||
244 | This leads to incorrect rendering. |
||
245 | |||
246 | |||
247 | |||
248 | For example, the VMware SVGA gallium driver uses a special semi-fallback path |
||
249 | for drawing with polygon stipple. |
||
250 | Since the two passes are rendered with different vertex transformation |
||
251 | implementations, the rendering doesn't appear as expected. |
||
252 | Setting the SVGA_FORCE_SWTNL environment variable to 1 will force the |
||
253 | driver to use the software vertex path all the time and clears up this issue. |
||
254 | |||
255 | |||
256 | |||
257 | According to the OpenGL invariance rules, there's no guarantee that |
||
258 | the pixels produced by these two rendering states will match. |
||
259 | To achieve invariance, both passes should enable polygon stipple and |
||
260 | blending with appropriate patterns/modes to ensure the same fragments |
||
261 | are produced in both passes. |
||
262 | |||
263 | |||
264 | |||
265 | |||
266 | |||
267 | !DOCTYPE> |