filename | src/pvr2/tacore.c |
changeset | 753:1fe39c3a9bbc |
prev | 736:a02d1475ccfd |
next | 801:92b518a2e915 |
author | nkeynes |
date | Wed Jul 30 22:50:44 2008 +0000 (15 years ago) |
permissions | -rw-r--r-- |
last change | Bug #61: OpenBSD support (Modified) patch from bsdmaniak, thanks! |
file | annotate | diff | log | raw |
1.1 --- a/src/pvr2/tacore.c Mon Jul 14 07:44:42 2008 +00001.2 +++ b/src/pvr2/tacore.c Wed Jul 30 22:50:44 2008 +00001.3 @@ -1161,7 +1161,22 @@1.5 }1.7 -1.8 +/**1.9 + * Find the first polygon or sprite context in the supplied buffer of TA1.10 + * data.1.11 + * @return A pointer to the context, or NULL if it cannot be found1.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.25 /**1.26 * Write a block of data to the tile accelerator, adding the data to the
.