Search
lxdream.org :: lxdream/src/pvr2/tacore.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/tacore.c
changeset 753:1fe39c3a9bbc
prev736:a02d1475ccfd
next801:92b518a2e915
author nkeynes
date Sun Jul 20 11:36:48 2008 +0000 (15 years ago)
permissions -rw-r--r--
last change Initial implementation for sort-dma channel
file annotate diff log raw
1.1 --- a/src/pvr2/tacore.c Mon Jul 14 07:44:42 2008 +0000
1.2 +++ b/src/pvr2/tacore.c Sun Jul 20 11:36:48 2008 +0000
1.3 @@ -1161,7 +1161,22 @@
1.4
1.5 }
1.6
1.7 -
1.8 +/**
1.9 + * Find the first polygon or sprite context in the supplied buffer of TA
1.10 + * data.
1.11 + * @return A pointer to the context, or NULL if it cannot be found
1.12 + */
1.13 +uint32_t *pvr2_ta_find_polygon_context( uint32_t *buf, uint32_t length )
1.14 +{
1.15 + uint32_t *poly;
1.16 + for( poly = buf; poly < buf+(length>>2); poly += 8 ) {
1.17 + if( TA_CMD(*poly) == TA_CMD_POLYGON_CONTEXT ||
1.18 + TA_CMD(*poly) == TA_CMD_SPRITE_CONTEXT ) {
1.19 + return poly;
1.20 + }
1.21 + }
1.22 + return NULL;
1.23 +}
1.24
1.25 /**
1.26 * Write a block of data to the tile accelerator, adding the data to the
.