On Mon, Nov 16, 2009 at 10:37 AM, Keith Whitwell <kei...@vmware.com> wrote: > On Thu, 2009-11-12 at 12:26 -0800, Christoph Bumiller wrote: >> Hi, I just noticed I get the stipple pattern in gallium in a wrong >> byte ordering (as if they were 32 bit buggy endian words). > > It is specified as an array of 32 bit words. On the mesa state-tracker, > the bitmap is a direct memcpy of what is in ctx->PolygonStipple. > >> Is there a good reason why we mess up the bitmap ? > > This is a good format to use if you're doing a software rasterizer, ie > something like (stipple[y%32] & (1<<(x%32)), regardless of endian > issues. > >> If so I'll just >> byte swap again in the pipe driver, but, I just thought normally you >> wouldn't expect that you'd have to do that, thanks, > > Since polygon stipple is really a GL concept, I'd probably prefer to > follow the Mesa representation. In other words, if you want to change > this, you need to bug Brian about ctx->PolygonStipple...
There shouldn't be any big/little endian issues with polygon stipple. The polygon stipple unpack code in _mesa_unpack_polygon_stipple() in image.c already is written with little/big endian taken into consideration. The representation in ctx->PolygonStipple[] is a 32-element array of 32-bit words and that's propagated through gallium too. Christoph, what platform are you on? Which driver are you using? What does progs/redbook/polys.c look like? You are talking about polygon stipple, right? And not line stipple? You could also experiement with glPixelStorei(GL_UNPACK_SWAP_BYTE, GL_TRUE) and see if that does anything. -Brian ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev