[Mesa-dev] radeon/r200 clear() inconsistency

Brian Paul brianp at vmware.com
Fri Mar 9 06:52:44 PST 2012


Dave, it looks like you were the last person to touch this code.

-Brian

On 03/09/2012 07:33 AM, Brian Paul wrote:
>
> I happened to be looking at radeonClear() and r200Clear() in the
> legacy DRI drivers. I think there's a bug in one function or the other
> in the hyperz/fastclear test:
>
>  From radeon_ioctl.c:
>
> if (rmesa->using_hyperz) {
> flags |= RADEON_USE_COMP_ZBUF;
> /* if (rmesa->radeon.radeonScreen->chipset & RADEON_CHIPSET_TCL)
> flags |= RADEON_USE_HIERZ; */
> if (((flags & RADEON_DEPTH) && (flags & RADEON_STENCIL) &&
> ((rmesa->radeon.state.stencil.clear & RADEON_STENCIL_WRITE_MASK) ==
> RADEON_STENCIL_WRITE_MASK))) {
> flags |= RADEON_CLEAR_FASTZ;
> }
> }
>
>  From r200_ioctl.c:
>
> if (rmesa->using_hyperz) {
> flags |= RADEON_USE_COMP_ZBUF;
> /* if (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R200)
> flags |= RADEON_USE_HIERZ; */
> if (!((flags & RADEON_DEPTH) && (flags & RADEON_STENCIL) &&
> ((rmesa->radeon.state.stencil.clear & R200_STENCIL_WRITE_MASK) ==
> R200_STENCIL_WRITE_MASK))) {
> flags |= RADEON_CLEAR_FASTZ;
> }
> }
>
>
> Note that the later version has a '!' operator in the second
> if-statement that's not present in the former. I suspect the ! should
> be removed.
>
> Can someone familiar with this code take a look?
>
> -Brian
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list