> -----Original Message----- > From: Chris Wilson [mailto:chris at chris-wilson.co.uk] > Sent: Wednesday, December 14, 2011 2:20 AM > To: zhigang.gong at linux.intel.com > Cc: intel-gfx at lists.freedesktop.org; zhigang.gong at gmail.com; > zhigang.gong at linux.intel.com > Subject: Re: [PATCH] uxa/glamor: Enable the rest glamor rendering > functions. > > On Tue, 13 Dec 2011 22:31:41 +0800, zhigang.gong at linux.intel.com > wrote: > > From: Zhigang Gong <zhigang.gong at linux.intel.com> > > > > This commit enable all the rest glamor rendering functions. > > Tested with latest glamor master branch, can pass rendercheck. > > > > One thing need to be pointed out is the picture's handling. > > Pictures support many different color formats, but glamor's texture > > only support a few color formats. And the most common scenario is that > > we create a pixmap with a color depth and then attach it to a picture > > which has a specific color format with the same color depth. But there > > is no way to change a texture's internal format after the texture was > > allocated. > > If you do that, the OpenGL will allocate a new texture. And then the > > glamor side and UXA side will be inconsitence. So for all the picture > > related operations, we can't fallback to UXA path directly, even it is > > rather a strainth forward operation. So for the get_image, Addtraps.., > > we have to add wrappers function for them to jump into glamor firstly. > > Can we create multiple textures referencing the same bo but with > different formats? AFAIK, it's impossible to match all possible picture formats to a OpenGL internal format. We have to have a new texture attached to glamor for incompatible format. The old texture is created from DDX's BO and has incorrect internal format. IMO, we can't make any use of this wrong texture within glamor, so I just don't create it and return a false to DDX layer to notify the DDX to unlink the BO. All the consequent rendering operation on this pixmap will be handled within glamor scope and target to the new texture with correct format. > Or are we going to run afoul of the coherency model > with GL? My understanding is, if the picture's format is incompatible with OpenGL's internal format. --Zhigang > -Chris > > -- > Chris Wilson, Intel Open Source Technology Centre