This is not the correct solution. Mono8x8PatternRectHelper needs a pattern, yet the API doesn't pass one. It was intended that it be passed in pCache->pat, yet that wasn't set up. There was a scratch cache structure set aside for that type of thing.
Can you try the attached patch? MArk. On Wed, 19 Mar 2003, Mark Vojkovich wrote: > > There's definitely a bug there. I'm not sure if that's the > correct solution, or there is a bigger problem. I will review > this code tonight. Thanks for pointing this out. > > > Mark. > > > On Wed, 19 Mar 2003, Alexandr Andreev wrote: > > > Hi, > > Possible, there is a bug in the Mono8x8PatternRectHelper() function. > > Lets look at XAAFillPolygonStippled(): > > Assume: > > 1. type == DO_MONO_8x8, > > 2. infoRec->Mono8x8PatternFillFlags: > > HARDWARE_PATTERN_SCREEN_ORIGIN is NOT set, > > HARDWARE_PATTERN_PROGRAMMED_BITS is set, > > HARDWARE_PATTERN_PROGRAMMED_ORIGIN is NOT set. > > In this case, pCache == NULL, and RectFunc = Mono8x8PatternRectHelper > > > > Later, in Mono8x8PatternRectHelper() we will crash when trying to access > > pCache->pat0. > > I think that this patch may help, but i'm not sure. > > > > > >
*** xaaFillPoly.c.old Thu Mar 20 10:46:51 2003 --- xaaFillPoly.c Thu Mar 20 10:54:21 2003 *************** *** 770,776 **** pCache = (*infoRec->CacheMono8x8Pattern)( infoRec->pScrn, patx, paty); patx = pCache->x; paty = pCache->y; ! } RectFunc = Mono8x8PatternRectHelper; } --- 770,780 ---- pCache = (*infoRec->CacheMono8x8Pattern)( infoRec->pScrn, patx, paty); patx = pCache->x; paty = pCache->y; ! } else { ! pCache = &(infoRec->ScratchCacheInfoRec); ! pCache->pat0 = patx; ! pCache->pat1 = paty; ! } RectFunc = Mono8x8PatternRectHelper; }