[PATCH] etnaviv: Fake occlusion query capability
Christian Gmeiner
christian.gmeiner at gmail.com
Wed Jan 18 16:45:42 UTC 2017
After a second look at it...
2017-01-18 16:29 GMT+01:00 Christian Gmeiner <christian.gmeiner at gmail.com>:
> 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;
Removing the 'return 0' looks wrong.
>> case PIPE_CAP_QUERY_TIMESTAMP:
>> return 1;
>> case PIPE_CAP_QUERY_PIPELINE_STATISTICS:
>> --
>> 2.7.4
>>
st/mesa has no logic to set the various "bits" numbers to 0
(GL_QUERY_COUNTER_BITS_ARB).
So this need some extra work by introducing e.g
PIPE_CAP_MAX_OCCLUSION_QUERY_BITS
and extend st/mesa to make use of it.
greets
--
Christian Gmeiner, MSc
https://www.youtube.com/user/AloryOFFICIAL
https://soundcloud.com/christian-gmeiner
More information about the etnaviv
mailing list