Possibly a silly question, but how does MLAA fit in when an application, let's say ETQW, asks for anti-aliasing? Does it ask for a specific method to be used, or is it up to the OpenGL implementation to provide whatever it thinks is fitting?
Rendering seems to be fine, both with the sphere and the images. Pretty cool to see this stuff running!
Average fps without MLAA is around 180 fps, with around 33.
Will try to run the test on G45/Eaglelake and an RV570 tomorrow.
Possibly a silly question, but how does MLAA fit in when an application, let's say ETQW, asks for anti-aliasing? Does it ask for a specific method to be used, or is it up to the OpenGL implementation to provide whatever it thinks is fitting?
New version uploaded that does print average fps for both on and off cases.
The app always asks for a specific type (MSAA usually, but FSAA is available, and the app can ask for vendor-specific things like CSAA etc too). MLAA is not in the GL spec, so it can't be requested.
The idea was to let the user specify (via driconf or env var) when to enable MLAA, similar to Catalyst. Having a Mesa-specific GL extension for this would not see much use.
Aha, that's good to know, thanks for the explanation!
So...this MLAA is entirely in software/shader, and not actual GPU anti-aliasing method?
I get the following output, and the sphere is definitely not aa.
I'm on mesa 7.10.3. Would switching to latest svn help?
[stephen@goodt60 MLAA-test-app]$ ./mlaatest
Irrlicht Engine version 1.7.2
Linux 2.6.39-ARCH #1 SMP PREEMPT Mon Jun 27 22:01:13 CEST 2011 i686
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
Using renderer: OpenGL 2.1
Gallium 0.4 on ATI RV515: X.Org R300 Project
OpenGL driver version is 1.2 or better.
GLSL version: 1.2
Loaded texture: AreaMap33
Unsupported texture format
GLSL shader failed to compile
0:4(12): warning: extension `GL_ARB_shader_texture_lod' unsupported in fragment shader
0:0(0): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'
0:16(86): error: `return' with wrong type , in function `tex2Doffset' returning vec4
0:0(0): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'
0:72(48): error: type mismatch
0:72(48): error: `return' with wrong type , in function `Area' returning vec2
0:0(0): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'
0:88(54): error: type mismatch
0:0(0): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'
0:89(54): error: type mismatch
0:0(0): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'
0:103(54): error: type mismatch
0:0(0): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'
0:104(54): error: type mismatch
Quit message received.
Ran 28.004s, average fps 198.50, min 1
that output is obviously wrong.Code:Irrlicht Engine version 1.8.0-alpha Linux 3.0.0-drm #1 SMP PREEMPT Tue Jul 5 18:40:40 CEST 2011 x86_64 Using renderer: OpenGL 2.1 Gallium 0.4 on AMD JUNIPER: X.Org OpenGL driver version is 1.2 or better. GLSL version: 1.2 Could not load sprite bank because the file does not exist: #DefaultFont Loaded texture: AreaMap33 Quit message received. Ran 122.932s, average fps 274.87, min 1 Average on fps 3033.53, average off fps 235.15 MLAA took on average 0.3ms
Beside this error: I'm wondering if the FPS output with the sphere is really right, but the sphere shows more FPS if the window is in the lower right corner (~600FPS). In the upper left corner I get ~250FPS. Both without MLAA. With MLAA it's ~77FPS and ~74FPS so it's not that visible but still the case.
Ok, I've compiled the latest mesa/ati-dri/libgl from git. My display is pretty wonkey so I won't be keeping this setup long (colours are all wrong e.g.)
However, here is the new output:
[stephen@goodt60 MLAA-test-app]$ ./mlaatest
Irrlicht Engine version 1.7.2
Linux 2.6.39-ARCH #1 SMP PREEMPT Mon Jun 27 22:01:13 CEST 2011 i686
ATTENTION: default value of option vblank_mode overridden by environment.
Using renderer: OpenGL 2.1
Gallium 0.4 on llvmpipe: VMware, Inc.
OpenGL driver version is 1.2 or better.
GLSL version: 1.2
Loaded texture: AreaMap33
Unsupported texture format
Quit message received.
Ran 16.368s, average fps 82.66, min 1
The title bar said MPAA: Off
Of course with such wonky display I couldn't really tell how it looked.