mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-24 00:40:36 +02:00
Added OUT_RING* debugging macros. Compile with NOUVEAU_RING_DEBUG to use.
This commit is contained in:
parent
2d2d617dbc
commit
1ebe921228
1 changed files with 22 additions and 1 deletions
|
|
@ -48,9 +48,28 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
* - WAIT_RING waits for size (in uint32_ts) to be available in the fifo
|
||||
*/
|
||||
|
||||
/* Enable for ring debugging. Prints out writes to the ring buffer
|
||||
* but does not actually write to it.
|
||||
*/
|
||||
#ifdef NOUVEAU_RING_DEBUG
|
||||
|
||||
#define OUT_RINGp(ptr,sz) do { \
|
||||
int i; printf("OUT_RINGp:\n"); for(i=0;i<sz;i+=4) printf(" 0x%8x\n", ptr+sz); \
|
||||
}while(0)
|
||||
|
||||
#define OUT_RING(n) do { \
|
||||
printf("OUT_RINGn: 0x%8x\n", n); \
|
||||
}while(0)
|
||||
|
||||
#define OUT_RINGf(n) do { \
|
||||
printf("OUT_RINGf: 0x%8x\n", f); \
|
||||
}while(0)
|
||||
|
||||
#else
|
||||
|
||||
#define OUT_RINGp(ptr,sz) do{ \
|
||||
memcpy(nmesa->fifo.buffer+nmesa->fifo.current,ptr,sz); \
|
||||
nmesa->fifo.current+=sz; \
|
||||
nmesa->fifo.current+=(sz/sizeof(*ptr)); \
|
||||
}while(0)
|
||||
|
||||
#define OUT_RING(n) do { \
|
||||
|
|
@ -61,6 +80,8 @@ nmesa->fifo.buffer[nmesa->fifo.current++]=n; \
|
|||
*((float*)(nmesa->fifo.buffer+nmesa->fifo.current++))=n; \
|
||||
}while(0)
|
||||
|
||||
#endif
|
||||
|
||||
extern void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size);
|
||||
|
||||
#define BEGIN_RING_PRIM(subchannel,tag,size) do { \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue