Re: [Mesa-dev] [PATCH v3 1/7] radeonsi: Allocate buffers for DCC.
On Wed, Oct 21, 2015 at 9:56 AM, Axel Davywrote: > On 21/10/2015 00:10, Bas Nieuwenhuizen wrote: >> >> >> DCC is disabled for textures that can be shared as sharing the >> DCC buffers has not been implemented yet. >> >> >> + surf->dcc_enabled = !(surf->flags & RADEON_SURF_Z_OR_SBUFFER) && >> +!(surf->flags & RADEON_SURF_SCANOUT) && >> +!compressed && AddrDccIn.numSamples <= 1; >> + >> > > Testing if a surface is scanout is not enough to avoid shared surfaces. > > In practice, it may be true currently mesa, and glamor via gbm, would use > the scanout flag for shared > buffers. It seems however a bit weak to rely on that. > > I suggest rather to use the pipe shared bind flag. > > I noticed in some case of imported surfaces the bind flag is not > advertised, I'm going to send a patch to fix that. I think that using any BIND flag is weak. The best thing would be to make some decisions in texture_from_handle and texture_get_handle functions, not based on flags. Marek ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3 1/7] radeonsi: Allocate buffers for DCC.
On Wed, Oct 21, 2015 at 9:56 AM, Axel Davywrote: > On 21/10/2015 00:10, Bas Nieuwenhuizen wrote: >> >> >> DCC is disabled for textures that can be shared as sharing the >> DCC buffers has not been implemented yet. >> >> >> + surf->dcc_enabled = !(surf->flags & RADEON_SURF_Z_OR_SBUFFER) && >> +!(surf->flags & RADEON_SURF_SCANOUT) && >> +!compressed && AddrDccIn.numSamples <= 1; >> + >> > > Testing if a surface is scanout is not enough to avoid shared surfaces. > > In practice, it may be true currently mesa, and glamor via gbm, would use > the scanout flag for shared > buffers. It seems however a bit weak to rely on that. > > I suggest rather to use the pipe shared bind flag. > > I noticed in some case of imported surfaces the bind flag is not > advertised, I'm going to send a patch to fix that. The commit message indeed does not agree with the commit. Note that with the DCC decompress patches we essentially have the same behavior as the CMASK fast clear for shared non-displayable surfaces: after writing and before using it in another application you need to call flush_resource. - Bas ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3 1/7] radeonsi: Allocate buffers for DCC.
On 21/10/2015 00:10, Bas Nieuwenhuizen wrote: DCC is disabled for textures that can be shared as sharing the DCC buffers has not been implemented yet. + surf->dcc_enabled = !(surf->flags & RADEON_SURF_Z_OR_SBUFFER) && +!(surf->flags & RADEON_SURF_SCANOUT) && +!compressed && AddrDccIn.numSamples <= 1; + Testing if a surface is scanout is not enough to avoid shared surfaces. In practice, it may be true currently mesa, and glamor via gbm, would use the scanout flag for shared buffers. It seems however a bit weak to rely on that. I suggest rather to use the pipe shared bind flag. I noticed in some case of imported surfaces the bind flag is not advertised, I'm going to send a patch to fix that. Yours, Axel Davy ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev