On Wednesday 03 February 2010 09:19:43 Igor Oliveira wrote: > A new version and a little improvement. > Makes more sense adding the texture in paint bind samplers than mask > bind samplers. > > Igor > > On Wed, Feb 3, 2010 at 6:21 AM, Igor Oliveira > > <igor.olive...@openbossa.org> wrote: > > This patch fix segfaults in mask.cpp and mask4.cpp binding a missing > > texture in mask bind samplers.
What's the stack trace again? I don't have a working vg setup right now. I'm a bit confused why it's crashing when we never sample from those units. The issue is that while right now alpha_mask texture is unconditionally there that's actually a bug - there's no guarantee that the alpha mask will be always present (obviously for egl configs that didn't ask for it, it shouldn't be there). Meaning that for stuff like filter and lookup it's perfectly ok for it to be null. I think ideally what we'd do is fix all those static sampler texture assignment. E.g. right now 0 - paint sampler/texture for gradient/pattern 1 - mask sampler/texture 2 - blend sampler/texture 3 - image sampler/texture meaning that if there's no paint, mask and blend and we only draw image then we have 0 - dummy 1 - dummy 2 - dummy 3 - image We had to do it this way when we had the hand written text assembly to have some semblance of sanity but now that we use ureg we could fix it properly e.g. in asm_fill.c in mask(...) instead of doing sampler[1], we'd simply do *sampler and change the combine_shaders to pass the correct the sampler to the function. If you need to fix the crash just to move forward on something I can commit it but please just add a /* FIXME: the texture might not be there */ and debug_assert(ctx->draw_buffer->alpha_mask);. z ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev