Commit Graph

59 Commits

Author SHA1 Message Date
Rob Clark 1632b0eac0 freedreno: fix coverity negative array index warning
Never can happen, since query would not have been created in the first
place if pidx(query_type) return negative.  Lets let coverity realize
this.

CID 1362460

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-06-02 15:44:07 -04:00
Rob Clark 37d540ba70 freedreno: expose time-elapsed query
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-02-17 10:41:55 -05:00
Rob Clark 87eb406791 freedreno/query: fix refcnt'ing issue
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-02-17 10:41:55 -05:00
Rob Clark 0e91dccf9c freedreno/query: some queries don't have ->begin_query()
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-02-17 10:41:55 -05:00
Rob Clark 9d23d7b7cb freedreno/query: align counter snapshot locations
Some hw queries need their sample memory locations to have certain
alignment.  At the moment that isn't an issue, since the only hw query
is occlusion, so all samples have the same size.  But when others are
added with different sample sizes, this starts to be a problem.

All current and immediately upcoming hw queries simply need their
sample address aligned to their size, so let's use that for now.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-02-17 10:41:55 -05:00
Rob Clark 8529e210ec freedreno/query: add optional enable hook
Add enable hook for hw query providers.  Some will need to configure
perfctr selector registers, which we want to do at the start of the
submit.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-02-17 10:41:55 -05:00
Samuel Pitoiset 96f164f6f0 gallium: make pipe_context::begin_query return a boolean
GL_AMD_performance_monitor must return an error when a monitoring
session cannot be started.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Martin Peres <martin.peres@free.fr>
2015-05-06 00:03:36 +03:00
Rob Clark 7297bdbd50 freedreno: query fixes
Fixes a few issues, including a potential empty-IB (which triggers gpu
hangs in piglit occlusion_query_meta_no_fragments)

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-10-03 14:19:52 -04:00
Rob Clark b8f78e1890 freedreno: add support for hw queries
Real GPU queries need some infrastructure to track samples per tile and
accumulate the results.  But fortunately this can be shared across GPU
generation.

See:
https://github.com/freedreno/freedreno/wiki/Queries#hardware-queries

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-05-13 18:33:19 -04:00