mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 04:30:10 +01:00
ilo: add PIPE_QUERY_OCCLUSION_PREDICATE support
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
This commit is contained in:
parent
c260175677
commit
0d04ec2fd2
3 changed files with 12 additions and 1 deletions
|
|
@ -71,6 +71,7 @@ query_process_bo(const struct ilo_context *ilo, struct ilo_query *q)
|
|||
|
||||
switch (q->type) {
|
||||
case PIPE_QUERY_OCCLUSION_COUNTER:
|
||||
case PIPE_QUERY_OCCLUSION_PREDICATE:
|
||||
case PIPE_QUERY_TIME_ELAPSED:
|
||||
case PIPE_QUERY_PRIMITIVES_GENERATED:
|
||||
case PIPE_QUERY_PRIMITIVES_EMITTED:
|
||||
|
|
@ -157,6 +158,7 @@ ilo_init_draw_query(struct ilo_context *ilo, struct ilo_query *q)
|
|||
|
||||
switch (q->type) {
|
||||
case PIPE_QUERY_OCCLUSION_COUNTER:
|
||||
case PIPE_QUERY_OCCLUSION_PREDICATE:
|
||||
case PIPE_QUERY_TIME_ELAPSED:
|
||||
case PIPE_QUERY_PRIMITIVES_GENERATED:
|
||||
case PIPE_QUERY_PRIMITIVES_EMITTED:
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ static const struct {
|
|||
#define INFOX(prefix) { NULL, NULL, NULL, NULL, }
|
||||
|
||||
[PIPE_QUERY_OCCLUSION_COUNTER] = INFO(draw),
|
||||
[PIPE_QUERY_OCCLUSION_PREDICATE] = INFOX(draw),
|
||||
[PIPE_QUERY_OCCLUSION_PREDICATE] = INFO(draw),
|
||||
[PIPE_QUERY_TIMESTAMP] = INFO(draw),
|
||||
[PIPE_QUERY_TIMESTAMP_DISJOINT] = INFOX(draw),
|
||||
[PIPE_QUERY_TIME_ELAPSED] = INFO(draw),
|
||||
|
|
@ -75,6 +75,7 @@ ilo_create_query(struct pipe_context *pipe, unsigned query_type, unsigned index)
|
|||
|
||||
switch (query_type) {
|
||||
case PIPE_QUERY_OCCLUSION_COUNTER:
|
||||
case PIPE_QUERY_OCCLUSION_PREDICATE:
|
||||
case PIPE_QUERY_TIMESTAMP:
|
||||
case PIPE_QUERY_TIME_ELAPSED:
|
||||
case PIPE_QUERY_PRIMITIVES_GENERATED:
|
||||
|
|
@ -163,6 +164,12 @@ query_serialize(const struct ilo_query *q, void *buf)
|
|||
dst[0] = q->result.u64;
|
||||
}
|
||||
break;
|
||||
case PIPE_QUERY_OCCLUSION_PREDICATE:
|
||||
{
|
||||
uint64_t *dst = buf;
|
||||
dst[0] = !!q->result.u64;
|
||||
}
|
||||
break;
|
||||
case PIPE_QUERY_PIPELINE_STATISTICS:
|
||||
{
|
||||
const struct pipe_query_data_pipeline_statistics *stats =
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ ilo_render_get_query_len(const struct ilo_render *render,
|
|||
|
||||
switch (query_type) {
|
||||
case PIPE_QUERY_OCCLUSION_COUNTER:
|
||||
case PIPE_QUERY_OCCLUSION_PREDICATE:
|
||||
case PIPE_QUERY_TIMESTAMP:
|
||||
case PIPE_QUERY_TIME_ELAPSED:
|
||||
/* no reg */
|
||||
|
|
@ -268,6 +269,7 @@ ilo_render_emit_query(struct ilo_render *render,
|
|||
|
||||
switch (q->type) {
|
||||
case PIPE_QUERY_OCCLUSION_COUNTER:
|
||||
case PIPE_QUERY_OCCLUSION_PREDICATE:
|
||||
pipe_control_dw1 = GEN6_PIPE_CONTROL_DEPTH_STALL |
|
||||
GEN6_PIPE_CONTROL_WRITE_PS_DEPTH_COUNT;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue