etnaviv: Fake occlusion query capability
authorWladimir J. van der Laan <laanwj@gmail.com>
Mon, 5 Dec 2016 12:43:55 +0000 (13:43 +0100)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Wed, 18 Jan 2017 15:58:18 +0000 (16:58 +0100)
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.

Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_screen.c

index fa762262d00ccc3703d5283cef84f2f761fe241c..bf66168232ac972e2c2040a44c634a820a4d6d12 100644 (file)
@@ -292,9 +292,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: