Mesa (master): freedreno: fix PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE
Rob Clark
robclark at kemper.freedesktop.org
Mon Oct 2 12:45:28 UTC 2017
Module: Mesa
Branch: master
Commit: d304c467ba3cdda4ad85a31ca9981cb039e3c1f3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d304c467ba3cdda4ad85a31ca9981cb039e3c1f3
Author: Rob Clark <robdclark at gmail.com>
Date: Sun Oct 1 15:29:24 2017 -0400
freedreno: fix PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE
Fixes an assert in fd_acc_query_register_provider() about query provider
not already registered.
Fixes: 3f6b3d9d ("gallium: add PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE")
Signed-off-by: Rob Clark <robdclark at gmail.com>
---
src/gallium/drivers/freedreno/freedreno_batch.h | 2 +-
src/gallium/drivers/freedreno/freedreno_query.h | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.h b/src/gallium/drivers/freedreno/freedreno_batch.h
index d6a818a3b7..41356e3519 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.h
+++ b/src/gallium/drivers/freedreno/freedreno_batch.h
@@ -55,7 +55,7 @@ enum fd_render_stage {
FD_STAGE_ALL = 0xff,
};
-#define MAX_HW_SAMPLE_PROVIDERS 4
+#define MAX_HW_SAMPLE_PROVIDERS 5
struct fd_hw_sample_provider;
struct fd_hw_sample;
diff --git a/src/gallium/drivers/freedreno/freedreno_query.h b/src/gallium/drivers/freedreno/freedreno_query.h
index b8fa0951de..a391a7a0ff 100644
--- a/src/gallium/drivers/freedreno/freedreno_query.h
+++ b/src/gallium/drivers/freedreno/freedreno_query.h
@@ -85,15 +85,16 @@ int pidx(unsigned query_type)
case PIPE_QUERY_OCCLUSION_COUNTER:
return 0;
case PIPE_QUERY_OCCLUSION_PREDICATE:
- case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE:
return 1;
+ case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE:
+ return 2;
/* TODO currently queries only emitted in main pass (not in binning pass)..
* which is fine for occlusion query, but pretty much not anything else.
*/
case PIPE_QUERY_TIME_ELAPSED:
- return 2;
- case PIPE_QUERY_TIMESTAMP:
return 3;
+ case PIPE_QUERY_TIMESTAMP:
+ return 4;
default:
return -1;
}
More information about the mesa-commit
mailing list