[Intel-gfx] [PATCH] drm/i915: Make sample_c messages go faster on Haswell.

Xiang, Haihao haihao.xiang at intel.com
Mon Jan 5 23:15:39 PST 2015


On Mon, 2015-01-05 at 23:03 -0800, Kenneth Graunke wrote:
> On Tuesday, January 06, 2015 02:39:36 PM Xiang, Haihao wrote:
> > On Mon, 2015-01-05 at 21:54 -0800, Kenneth Graunke wrote:
> > > On Tuesday, January 06, 2015 01:11:53 PM Xiang, Haihao wrote:
> > > > 
> > > > Hi Kenneth,
> > > > 
> > > > How did you test OSD ? I can't reproduce the issue you mentioned, OSD
> > > > works well for me when using mplayer-vaapi with the latest
> > > > libva/libva-intel-driver master branch.
> > > > 
> > > > I tried your patch, what surprised me is OSD still works well after
> > > > applying your patch. It seems your patch didn't disable the palette.
> > > > 
> > > > Thanks
> > > > Haihao
> > > 
> > > I ran:
> > > 
> > > mplayer -osdlevel 3 -vo vaapi big_buck_bunny_720p_stereo.ogg
> > > 
> > > For me, the OSD text is solid green, with hard edges.
> > 
> > The OSD text is white for me when using mplayer -osdlevel 3 -vo vaapi
> > xxx. If possible, could you update your mplayer ?
> 
> Huh.  I'm using the Arch Linux package of mplayer-vaapi 36265-13,
> which seems to be the most recent subversion commit ID.  I've never seen
> white text on my Haswell system - it seems to be consistently dark green.

> > > If you use "-vo gl" or "-vo xv", the OSD is solid white text with a black
> > > border around it.  I presume that it's supposed to be white with vaapi as
> > > well, but I guess I'm not entirely sure.
> > > 
> > > It's possible that the optimization doesn't affect the palette as long as
> > > you never use sample_c with the paletted textures.
> > 
> > I verified the palette takes effect in the following way:
> > 
> > 1. Only support P8A8 format in the driver
> > 
> > 2. ran the above command and I saw white OSD text
> > 
> > 3. Only support P4A4 format in the driver and don't use
> > 3DSTATE_SAMPLER_PALETTE_LOAD0 to load the value to the texture palette,
> > so the palette keeps unchanged. 
> > 
> > 4. ran the above command and I saw black OSD text.
> > 
> > 5. Load the right value to the texture palette and ran the above command
> > again, I saw white OSD text.
> > 
> > Hence I think sample_c with the paletted textures is used in the driver.
> 
> That sounds like the palette is actually working, then.  Great :)
> 
> I doubt that libva would use sample_c - sampling with a shadow comparison?
> It looks like it just uses sample and sample+killpix.

You are right, libva driver doesn't use sample_c message. 

> I'm pretty sure the sample_c optimization just uses the palette memory as
> storage for some stuff, so it's quite possible it just works if you're
> only using sample and sample+killpix.

Thanks for the explanation, it makes sense to me.

> 
> --Ken




More information about the Intel-gfx mailing list