[Mesa-dev] Anybody still need clear_depth_stencil() or clear_render_target()?

2013-12-02 Thread Andreas Hartmetz
Hello, I've been lurking for a while, this seems to be my first post. While trying to make some easy (ha) improvements in radeonsi I looked around in all the surrounding code to get a good picture of how things work. So I noticed something: All the Gallium drivers need to implement

Re: [Mesa-dev] Anybody still need clear_depth_stencil() or clear_render_target()?

2013-12-02 Thread Erik Faye-Lund
On Mon, Dec 2, 2013 at 11:08 PM, Andreas Hartmetz ahartm...@gmail.com wrote: Hello, I've been lurking for a while, this seems to be my first post. While trying to make some easy (ha) improvements in radeonsi I looked around in all the surrounding code to get a good picture of how things

Re: [Mesa-dev] Anybody still need clear_depth_stencil() or clear_render_target()?

2013-12-02 Thread Marek Olšák
clear_render_target and clear_depth_stencil require changing the framebuffer state, which is more costly than just drawing the quad in the state tracker. Also, separate color and depth clear isn't very efficient if you can do both with a single quad. Adding scissor support to the clear function

Re: [Mesa-dev] Anybody still need clear_depth_stencil() or clear_render_target()?

2013-12-02 Thread Roland Scheidegger
Am 02.12.2013 23:08, schrieb Andreas Hartmetz: Hello, I've been lurking for a while, this seems to be my first post. While trying to make some easy (ha) improvements in radeonsi I looked around in all the surrounding code to get a good picture of how things work. So I noticed something:

Re: [Mesa-dev] Anybody still need clear_depth_stencil() or clear_render_target()?

2013-12-02 Thread Marek Olšák
The glClearBuffer functions don't change the framebuffer state in most cases, but the clear_render_target function does, so using it is out of the question. Yeah, the implementation of glClearBuffer seems to be incomplete. Marek On Tue, Dec 3, 2013 at 12:54 AM, Roland Scheidegger

Re: [Mesa-dev] Anybody still need clear_depth_stencil() or clear_render_target()?

2013-12-02 Thread Roland Scheidegger
Well you could detect if it belongs to the current fb, in which case you wouldn't need to change the fb. And if not (which shouldn't happen with OpenGL state tracker admittedly) then if you wouldn't have that function the state tracker would need to swap out the fb instead, which isn't going to be