[PATCH] etnaviv: Fake occlusion query capability

Christian Gmeiner christian.gmeiner at gmail.com
Wed Jan 18 15:29:21 UTC 2017


Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>

2016-12-05 13:43 GMT+01:00 Wladimir J. van der Laan <laanwj at gmail.com>:
> This enables the PIPE_CAP_OCCLUSION_QUERY capability without adding an
> occlusion query type.
>
> This is necessary to get Mesa to report desktop GL 2.0 support (to run
> exciting things such as ioq3's OpenGL 2 renderer), and should be valid
> because exposing the capability does not guarantee that any
> counters are actually implemented.
> ---
>  src/gallium/drivers/etnaviv/etnaviv_screen.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
> index d632fd0..c3f270d 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
> @@ -287,9 +287,10 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>        return 1;
>
>     /* Timer queries. */
> +   case PIPE_CAP_OCCLUSION_QUERY: /* Not implemented - fake it for OpenGL2 */
> +      return 1;
> +
>     case PIPE_CAP_QUERY_TIME_ELAPSED:
> -   case PIPE_CAP_OCCLUSION_QUERY:
> -      return 0;
>     case PIPE_CAP_QUERY_TIMESTAMP:
>        return 1;
>     case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
> --
> 2.7.4
>

greets
--
Christian Gmeiner, MSc

https://www.youtube.com/user/AloryOFFICIAL
https://soundcloud.com/christian-gmeiner


More information about the etnaviv mailing list