From: Chia-I Wu <ol...@gm...> - 2010-04-05 02:49:21
|
On Sun, Apr 4, 2010 at 6:31 PM, Dave Airlie <ai...@gm...> 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 :( -- ol...@Lu... |