citra-emu/citra — pull request #284 by neobrain (2014-12-16 00:37:40+00:00)
Title: Pica progress: Texturing, shaders, cleanups & more

This branch makes a number of big leaps towards more complete GPU emulation:
* Multitexturing: Supports up to 3 textures now
* Texture formats: Supports almost all uncompressed texture formats now
* Texture wrapping: Supports some texture wrapping modes now
* Tev emulation: Supports more features of the texture environment
* Shader input negation: The SRC2 input is now negated where required
* Shader instructions: The shader instructions MOVA, CMP, IFC, IFU and MAX are now supported. Additionally, bad emulation of the NOP and END instructions was corrected. The fact that not all instructions use the full 6 opcode bits is now considered.
* PrimitiveAssembly: Triangle strips are now supported.

Also fixes a number of bugs:
* The CommandProcessor code was written under the assumption that index arrays and vertex attribute arrays are stored in the same memory region (FCRAM<->VRAM). This obviously need not be the case.
* Ocarina of Time 3D tells us to use 8 input attributes, but only gives 2. Something's odd here, not sure what yet. Added a safety check to skip `nullptr`s, for now.

Additionally:
* we can now add breakpoints in the GPU debugger for individual input vertices (this will become very powerful once the shader debugger is complete).
* this branch imports nihstro as a hard dependency. nihstro's headers are used for decoding shader instructions and dumping shaders as SHBIN. nihstro's .cpp files are untouched for now.