On Mon, Apr 5, 2010 at 12:49 PM, Chia-I Wu <olva...@gmail.com> wrote:
> On Sun, Apr 4, 2010 at 6:31 PM, Dave Airlie <airl...@gmail.com> wrote:
>> Hey,
>>
>> So I was trying to fix tfp test on r300g, and ran into an issue with
>> dri st I think.
>>
>> So the way TFP works we get dri2_set_tex_buffer, which then validates the
>> attachment, but ignores the format passed in. So r300g picks up the kernel
>> buffer from the handle and sets up the texture + texture state without
>> the format
>> information.
>>
>> Once we've validated, we call ctx->st->teximage and can give it a different
>> format however at no point does r300g get any place to change the texture 
>> format
>> and update its internal state.
>>
>> I'm not sure if either r300g should delay setting up its internal
>> state for emission
>> until later or whether we need to enhance the st interface.
>>
>> The main issue with we get a TFP with a B8G8R8X8 but the visual is B8G8R8A8
>> which triggers this.
> The attached patch fixes tfp test for me (with i915g).  Could you see if r300g
> passes the test with the patch?
>
> The teximage callback has an internal_format parameter that specifies how the
> pipe texture should be treated.  It can differ from the format of the texture.
> It seems to suffice for TFP.  I was lazy enough not to use it :(
>

That was my first attempt also, however it fails as the texture is
already created, and
in r300g we already have worked out the hw state assuming the texture
format won't
change. This seems to be what gallium expects. So in this case you end
up recreating
a new texture at finalise because the formats don't match and you lose
the pixmap.

Dave.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to