Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-30 Thread Marek Olšák
I don't plan to expose the GCN functionality. If I wanted to, I would add the sample count into the rasterizer state, because it only affects gl_SampleMaskIn. Marek On Fri, Nov 30, 2018 at 5:12 PM Rob Clark wrote: > I guess as long as it is just a single draw, it works out to the same > thing.

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-30 Thread Rob Clark
I guess as long as it is just a single draw, it works out to the same thing. Maybe to expose the GCN functionality we could do something like PIPE_CAP_SURFACE_SAMPLE_COUNT: 0 - unsupported 1 - msaa per draw 2 - msaa per renderpass ?? BR, -R On Fri, Nov 30, 2018 at 3:41 PM Marek

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-30 Thread Marek Olšák
GCN calls it overrasterization multisampling, but it's really only useful for polygon smoothing, because there is no temporary buffer. Marek On Fri, Nov 30, 2018 at 3:35 PM Rob Clark wrote: > On Fri, Nov 30, 2018 at 3:25 PM Marek Olšák wrote: > > > > Suggestions: > > -

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-30 Thread Rob Clark
On Fri, Nov 30, 2018 at 3:25 PM Marek Olšák wrote: > > Suggestions: > - PIPE_CAP_TILED_BASED_MSAA_OVERSAMPLING > - pipe_surface::tile_based_oversample_count > > I'm assuming this feature isn't possible without tile-based rendering. I guess technically an IMR could do it, with an internal

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-30 Thread Marek Olšák
Suggestions: - PIPE_CAP_TILED_BASED_MSAA_OVERSAMPLING - pipe_surface::tile_based_oversample_count I'm assuming this feature isn't possible without tile-based rendering. Marek On Fri, Nov 30, 2018 at 1:23 PM Kristian Høgsberg wrote: > On Fri, Nov 30, 2018 at 10:17 AM Marek Olšák wrote: > > >

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-30 Thread Kristian Høgsberg
On Fri, Nov 30, 2018 at 10:17 AM Marek Olšák wrote: > > On Fri, Nov 30, 2018 at 1:13 PM Kristian Høgsberg wrote: >> >> On Fri, Nov 16, 2018 at 7:48 PM Marek Olšák wrote: >> > >> > I think the name PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE is slightly >> > misleading, because it doesn't imply

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-30 Thread Marek Olšák
On Fri, Nov 30, 2018 at 1:13 PM Kristian Høgsberg wrote: > On Fri, Nov 16, 2018 at 7:48 PM Marek Olšák wrote: > > > > I think the name PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE is slightly > misleading, because it doesn't imply anything about the OpenGL ES behavior, > which is that a texture is

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-30 Thread Kristian Høgsberg
On Fri, Nov 16, 2018 at 7:48 PM Marek Olšák wrote: > > I think the name PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE is slightly > misleading, because it doesn't imply anything about the OpenGL ES behavior, > which is that a texture is multisampled in the cache, but single-sampled in > memory. This

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-30 Thread Kristian Høgsberg
On Tue, Nov 6, 2018 at 6:26 PM Roland Scheidegger wrote: > > Am 07.11.18 um 00:03 schrieb Kristian Høgsberg: > > On Tue, Nov 6, 2018 at 2:44 PM Axel Davy wrote: > >> > >> Hi, > >> > >> Is there anything to be done in the nine state trackers (or other state > >> trackers). > >> > >> Nine uses

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-16 Thread Marek Olšák
I think the name PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE is slightly misleading, because it doesn't imply anything about the OpenGL ES behavior, which is that a texture is multisampled in the cache, but single-sampled in memory. This should be mentioned somewhere. Marek On Tue, Nov 6, 2018 at

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-06 Thread Roland Scheidegger
Am 07.11.18 um 00:03 schrieb Kristian Høgsberg: > On Tue, Nov 6, 2018 at 2:44 PM Axel Davy wrote: >> >> Hi, >> >> Is there anything to be done in the nine state trackers (or other state >> trackers). >> >> Nine uses create_surface. Should it expect the field to be filled >> properly by the driver

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-06 Thread Kristian Høgsberg
On Tue, Nov 6, 2018 at 2:44 PM Axel Davy wrote: > > Hi, > > Is there anything to be done in the nine state trackers (or other state > trackers). > > Nine uses create_surface. Should it expect the field to be filled > properly by the driver ? Nothing is required from any state tracker, but if

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-06 Thread Axel Davy
Hi, Is there anything to be done in the nine state trackers (or other state trackers). Nine uses create_surface. Should it expect the field to be filled properly by the driver ? On 06/11/2018 23:09, Kristian H. Kristensen wrote: + /** +* If a driver doesn't advertise

[Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-06 Thread Kristian H. Kristensen
This new pipe cap and the new nr_samples field in pipe_surface lets a state tracker bind a render target with a different sample count than the resource. This allows for implementing EXT_multisampled_render_to_texture and EXT_multisampled_render_to_texture2. Signed-off-by: Kristian H. Kristensen