[Mesa-dev] [PATCH] r300g: fix comparison of hyperz flush time.

Marek Olšák maraeo at gmail.com
Fri Nov 30 04:48:38 PST 2012


Hi Dave,

thanks for pointing it out. The conditional should be:
else if (r300->hyperz_time_of_last_flush > 2000000) {

With that, this is:

Reviewed-by: Marek Olšák <maraeo at gmail.com>

Marek

On Fri, Nov 30, 2012 at 9:28 AM, Dave Airlie <airlied at gmail.com> wrote:
> I haven't confirmed this is doing the correct thing, but at
> least this might make someone review it!
>
> Reported by internal RH coverity scan.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/gallium/drivers/r300/r300_flush.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c
> index 2266b48..5d09db5 100644
> --- a/src/gallium/drivers/r300/r300_flush.c
> +++ b/src/gallium/drivers/r300/r300_flush.c
> @@ -107,7 +107,7 @@ void r300_flush(struct pipe_context *pipe,
>      /* Update Hyper-Z status. */
>      if (r300->num_z_clears) {
>          r300->hyperz_time_of_last_flush = os_time_get();
> -    } else if (!r300->hyperz_time_of_last_flush > 2000000) {
> +    } else if (!(r300->hyperz_time_of_last_flush > 2000000)) {
>          /* 2 seconds without a Z clear pretty much means a dead context
>           * for HyperZ. */
>
> --
> 1.7.11.7
>
> _______________________________________________
> 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