Lines Matching refs:q

110    struct nv30_query *q = CALLOC_STRUCT(nv30_query);  in nv30_query_create()  local
111 if (!q) in nv30_query_create()
114 q->type = type; in nv30_query_create()
116 switch (q->type) { in nv30_query_create()
119 q->enable = 0x0000; in nv30_query_create()
120 q->report = 1; in nv30_query_create()
123 q->enable = NV30_3D_QUERY_ENABLE; in nv30_query_create()
124 q->report = 1; in nv30_query_create()
130 q->enable = 0x1804; in nv30_query_create()
131 q->report = 2 + (q->type - NV30_QUERY_ZCULL_0); in nv30_query_create()
134 FREE(q); in nv30_query_create()
138 return (struct pipe_query *)q; in nv30_query_create()
151 struct nv30_query *q = nv30_query(pq); in nv30_query_begin() local
154 switch (q->type) { in nv30_query_begin()
156 q->qo[0] = nv30_query_object_new(nv30->screen); in nv30_query_begin()
157 if (q->qo[0]) { in nv30_query_begin()
159 PUSH_DATA (push, (q->report << 24) | q->qo[0]->hw->start); in nv30_query_begin()
166 PUSH_DATA (push, q->report); in nv30_query_begin()
170 if (q->enable) { in nv30_query_begin()
171 BEGIN_NV04(push, SUBC_3D(q->enable), 1); in nv30_query_begin()
181 struct nv30_query *q = nv30_query(pq); in nv30_query_end() local
184 q->qo[1] = nv30_query_object_new(screen); in nv30_query_end()
185 if (q->qo[1]) { in nv30_query_end()
187 PUSH_DATA (push, (q->report << 24) | q->qo[1]->hw->start); in nv30_query_end()
190 if (q->enable) { in nv30_query_end()
191 BEGIN_NV04(push, SUBC_3D(q->enable), 1); in nv30_query_end()
202 struct nv30_query *q = nv30_query(pq); in nv30_query_result() local
203 volatile uint32_t *ntfy0 = nv30_ntfy(screen, q->qo[0]); in nv30_query_result()
204 volatile uint32_t *ntfy1 = nv30_ntfy(screen, q->qo[1]); in nv30_query_result()
213 switch (q->type) { in nv30_query_result()
215 q->result = *(uint64_t *)&ntfy1[0]; in nv30_query_result()
218 q->result = *(uint64_t *)&ntfy1[0] - *(uint64_t *)&ntfy0[0]; in nv30_query_result()
221 q->result = ntfy1[2]; in nv30_query_result()
225 nv30_query_object_del(screen, &q->qo[0]); in nv30_query_result()
226 nv30_query_object_del(screen, &q->qo[1]); in nv30_query_result()
229 *res64 = q->result; in nv30_query_result()
238 struct nv30_query *q = nv30_query(pq); in nv40_query_render_condition() local
254 PUSH_DATA (push, 0x02000000 | q->qo[1]->hw->start); in nv40_query_render_condition()