ChanServ changed the topic of #lima to: Development channel for open source lima driver for ARM Mali4** GPUs - Kernel driver has landed in mainline, userspace driver is part of mesa - Logs at https://oftc.irclog.whitequark.org/lima/
camus1 has quit []
camus has joined #lima
camus has quit [Remote host closed the connection]
camus has joined #lima
camus has quit [Remote host closed the connection]
camus has joined #lima
camus has quit [Remote host closed the connection]
camus has joined #lima
camus has quit []
camus has joined #lima
camus has quit []
camus has joined #lima
camus has quit [Remote host closed the connection]
yuq825 has joined #lima
sarbes has joined #lima
yuq825 has quit []
<sarbes>
Hi there. I have a question about MSAA.
<sarbes>
I'm tinkering with MSAA in Kodi. It sort of works, but I'm getting pretty low frame rates. About half of what it would be with MSAA disabled. But I can't quite figure out what I'm doing wrong.
<sarbes>
In my first attempt, I've just set the amount of samples when creating the EGL surface. This works on my desktop with GL and GLES, and on my Odroid C2. But on the latter, the framerate tanks. I suspect that the samples take a trip through main memory.
<sarbes>
For my current attempt, I'm trying EXT_multisampled_render_to_texture. Here I create a FBO and render to it. On my desktop, I'm resolving this buffer via glBlitFramebuffer(), which is not available on GLES 2.0.
<sarbes>
And from here, I'm unsure how to proceed. Could you give me some pointers?
<sarbes>
Or is the performance loss to be expected? ARM brags about the "almost zero" cost of MSAA 4x, so I'm a bit skeptical about that.
<anarsoul>
sarbes: it's zero when resolve is done in tile buffer, i.e. without full writeout
<anarsoul>
sarbes: I think you need to draw a textured quad on gles 2.0
drod has joined #lima
<sarbes>
I'm not sure I can follow. I want the resolve to be happening in the tile buffer. Is there fixed function hardware for it?
<anarsoul>
sarbes: use EXT_multisampled_render_to_texture then draw a textured quad
<sarbes>
I'm sorry, but I don't see how I could be possibly be faster than the driver.
<sarbes>
Quoting from the spec of FramebufferTexture2DMultisampleEXT():
<sarbes>
"While the implicit multisample buffer is attached, color sample values are automatically resolved to a single color in the texture level each time a pixel is updated. This has the effect of making the antialiasing appear to be automatic at the application level."
<sarbes>
That's almost what I want. Except for the default framebuffer, not FBOs.
<anarsoul>
sarbes: IIRC ARM driver is not compliant with the spec. Anyway, lima as a gallium driver does exactly what mesa asks for, this behavior is default for all the mesa drivers
<anarsoul>
technically it's possible to do in-place resolve for default fb, but it's not implemented in mesa