* parm[3] = MSB of start value
* parm[4] = desired sequence
* parm[5] = actual sequence
+ * parm[6] = query high address
+ * parm[7] = query low address
*/
.section #mme9097_query_buffer_write
parm $r2
parm $r3
parm $r4
- parm $r5 maddr 0x16c2 /* QUERY_SEQUENCE */
+ parm $r5 maddr 0x16c0 /* QUERY_ADDRESS_HIGH */
parm $r6
parm $r7
mov $r6 (sub $r7 $r6) /* actual - desired */
mov $r6 (sbb 0x0 0x0) /* if there was underflow, not reached yet */
- braz annul $r6 #qbw_ready
- exit
+ parm $r7
+ exit braz $r6 #qbw_ready
+ parm $r6
qbw_ready:
mov $r2 (sub $r2 $r4)
braz $r1 #qbw_postclamp
qbw_clamp:
mov $r2 $r1
qbw_postclamp:
+ send $r7
+ send $r6
send $r2
+ branz $r1 #qbw_done
mov $r4 0x1000
- branz annul $r1 #qbw_done
send (extrinsrt 0x0 $r4 0x0 0x10 0x10)
- maddr 0x16c2 /* QUERY_SEQUENCE */
+ maddr 0x16c0 /* QUERY_ADDRESS_HIGH */
+ mov $r5 0x4
+ mov $r6 (add $r6 $r5)
+ mov $r7 (adc $r7 0x0)
+ send $r7
+ send $r6
send $r3
qbw_done:
exit send (extrinsrt 0x0 $r4 0x0 0x10 0x10)
- nop
+ maddrsend 0x44
nouveau_pushbuf_space(push, 32, 2, 0);
PUSH_REFN (push, hq->bo, NOUVEAU_BO_GART | NOUVEAU_BO_RD);
PUSH_REFN (push, buf->bo, buf->domain | NOUVEAU_BO_WR);
- BEGIN_NVC0(push, NVC0_3D(QUERY_ADDRESS_HIGH), 2);
- PUSH_DATAh(push, buf->address + offset);
- PUSH_DATA (push, buf->address + offset);
- BEGIN_1IC0(push, NVC0_3D(MACRO_QUERY_BUFFER_WRITE), 7);
+ BEGIN_1IC0(push, NVC0_3D(MACRO_QUERY_BUFFER_WRITE), 9);
if (q->type == PIPE_QUERY_OCCLUSION_PREDICATE) /* XXX what if 64-bit? */
PUSH_DATA(push, 0x00000001);
else if (result_type == PIPE_QUERY_TYPE_I32)
nouveau_pushbuf_data(push, hq->bo, hq->offset,
4 | NVC0_IB_ENTRY_1_NO_PREFETCH);
}
+ PUSH_DATAh(push, buf->address + offset);
+ PUSH_DATA (push, buf->address + offset);
if (buf->mm) {
nouveau_fence_ref(nvc0->screen->base.fence.current, &buf->fence);