On Thu, 2009-02-05 at 17:40 -0500, Kristian Høgsberg wrote:
> On Thu, Feb 5, 2009 at 4:46 PM, Peter Clifton <[email protected]> wrote:
> > On Fri, 2009-01-30 at 11:51 -0500, Kristian Høgsberg wrote:
> >> On Thu, Jan 29, 2009 at 6:08 PM, Eric Anholt <[email protected]> wrote:
> >> > We can support any combination of (a8r8g8b8, x8r8g8b8, r5g6b5) x
> >> > (z0,z24,z24s8)
> >> > on either class of chipsets. The only restriction is no mixing bpp when
> >> > also
> >> > mixing tiling. This shouldn't be occurring currently.
> >>
> >> Cool, that should fix it. Or at least let the compositing managers
> >> pick the right fbconfig. We should probably fix all drivers to report
> >> RGB visuals, and then we can yank the reset-alpha-channel hack in the
> >> tfp sw fallback.
> >
> > It doesn't fix it on its own.. certainly not for the intel driver.
> >
> > The setTexBuffer hook still explicitly sets the format of the texture to
> > be BGRA, and I assume it ought to be setting this information based on
> > the FBconfig (now hopefully correct) of the GLXPixmap the texture is
> > being mapped from.
> >
> > Does anyone have any hints how start fixing that?
>
> Something like the attached patch? Haven't tested it...
I've not tried it yet, but I'm looking at the 965 brw code, and am not
sure the right format is going to make it...
In the brw_update_texture_surface function (brw_wm_surface_state.c),
the bo key's texture format is set to firstImage->TexFormat->MesaFormat
in the case where there is no format override (e.g. from the DRI1 TFP
hack).
The code path then goes via brw_create_texture_surface(), and since the
key->bo field is set, the following code-path is taken:
if (key->bo)
surf.ss0.surface_format = translate_tex_format(key->format,
key->depthmode);
That code-path has no conditional which ends up returning the desired:
BRW_SURFACEFORMAT_B8G8R8X8_UNORM, as might be hit in the DRI1 override
path where no bo is set, and the alternative code-path sets that format
type for the case where key->depth == 24.
Any ideas what MESA format will be appropriate to select the above
BRW_SURFACEFORMAT_B8G8R8X8_UNORM for inside translate_tex_format() ?
(And I presume there might be other fixes required for the non 965
drivers.)
Best regards,
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev