Re: [Mesa-dev] [PATCH v2 3/6] gallium: add pipe->invalidate_surface()

2018-12-14 Thread Marek Olšák
The way I see it, pipe_surface is a render target view for pipe_framebuffer_state. The fact that other functions also accept pipe_surface is a historic artifact. resource_copy_region used to accept 2 pipe_surfaces before it was changed to 2 pipe_resources + parameters. Somebody might decide to chan

Re: [Mesa-dev] [PATCH v2 3/6] gallium: add pipe->invalidate_surface()

2018-12-14 Thread Rob Clark
I don't mind renaming it to invalidate_subsurface() if you prefer that, but I really prefer that it takes a surface rather than a resource... pipe_resource is the wrong level to do this. Even though surfaces are transient, tracking the invalidate state in the surface works out much easier in the d

Re: [Mesa-dev] [PATCH v2 3/6] gallium: add pipe->invalidate_surface()

2018-12-14 Thread Marek Olšák
Can you please call it invalidate_subresource and inline relevant pipe_surface variables inside the parameters? Thanks, Marek On Wed, Dec 12, 2018 at 10:48 AM Rob Clark wrote: > A new API to implement glInvalidateFramebuffer() and friends. It is > similar to invalidate_resource() but can be us

[Mesa-dev] [PATCH v2 3/6] gallium: add pipe->invalidate_surface()

2018-12-12 Thread Rob Clark
A new API to implement glInvalidateFramebuffer() and friends. It is similar to invalidate_resource() but can be used to invalidate a specific layer/level, so it is suitable to use for user FBOs in addition to window system framebuffer. Signed-off-by: Rob Clark --- src/gallium/docs/source/contex