mamedev/mame — pull request #67 by yz70s (2014-12-04 22:10:00+00:00)
Title: Chihiro vertex programs update [Samuele Zannoli]

- the most important feature is the inclusion of the first version of a vertex program (shader) simulator: now, when vertex shading is enabled (most of the time), all the vertices are sent through it to compute the x,y screen coordinates needed for polygon rasterization
- moved the video emulation part into the dedicated chihiro.c and chihiro.h files that are put in the src\mame\video and \src\mame\includes folders
- correction for a possible bug in file src\emu\video\poly.h in the round_coordinate() routine

About the bug in round_coordinate(): since it uses the floor() function and assigns the result to an integer variable, if the floating point parameter is bigger that the highest possible integer value, it will return -2147483648 and this is going to cause an hangup later. With the patch round_coordinate() will check if the parameter is positive and the result negative, and if so it will return INT_MAX-1