[Mesa-dev] [PATCH] swr: use swr_query_result type instead of void

Cherniak, Bruce bruce.cherniak at intel.com
Fri Jun 30 18:20:15 UTC 2017


Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com> 

> On Jun 30, 2017, at 11:52 AM, Tim Rowley <timothy.o.rowley at intel.com> wrote:
> 
> Tag pStat field in swr_draw_context structure so gen_llvm_types.py
> can deal with the actual structure type instead of using void.
> 
> Code cleanup, no functional change.
> ---
> src/gallium/drivers/swr/swr_context.cpp | 4 ++--
> src/gallium/drivers/swr/swr_context.h   | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/gallium/drivers/swr/swr_context.cpp b/src/gallium/drivers/swr/swr_context.cpp
> index 11ce346..f2d971a 100644
> --- a/src/gallium/drivers/swr/swr_context.cpp
> +++ b/src/gallium/drivers/swr/swr_context.cpp
> @@ -422,7 +422,7 @@ swr_UpdateStats(HANDLE hPrivateContext, const SWR_STATS *pStats)
>    if (!pDC)
>       return;
> 
> -   struct swr_query_result *pqr = (struct swr_query_result *)pDC->pStats;
> +   struct swr_query_result *pqr = pDC->pStats;
> 
>    SWR_STATS *pSwrStats = &pqr->core;
> 
> @@ -439,7 +439,7 @@ swr_UpdateStatsFE(HANDLE hPrivateContext, const SWR_STATS_FE *pStats)
>    if (!pDC)
>       return;
> 
> -   struct swr_query_result *pqr = (struct swr_query_result *)pDC->pStats;
> +   struct swr_query_result *pqr = pDC->pStats;
> 
>    SWR_STATS_FE *pSwrStats = &pqr->coreFE;
>    p_atomic_add(&pSwrStats->IaVertices, pStats->IaVertices);
> diff --git a/src/gallium/drivers/swr/swr_context.h b/src/gallium/drivers/swr/swr_context.h
> index 93e6f05..3ff4bf3 100644
> --- a/src/gallium/drivers/swr/swr_context.h
> +++ b/src/gallium/drivers/swr/swr_context.h
> @@ -101,7 +101,7 @@ struct swr_draw_context {
>    uint32_t polyStipple[32];
> 
>    SWR_SURFACE_STATE renderTargets[SWR_NUM_ATTACHMENTS];
> -   void *pStats;
> +   struct swr_query_result *pStats; // @llvm_struct
> };
> 
> /* gen_llvm_types FINI */
> -- 
> 2.7.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list