Commit Graph

5028 Commits (0f35755572fe63534813528de9a0710193f2e335)
 

Author SHA1 Message Date
wwylele 0f35755572 pica/command_processor: build geometry pipeline and run geometry shader
The geometry pipeline manages data transfer between VS, GS and primitive assembler. It has known four modes:
 - no GS mode: sends VS output directly to the primitive assembler (what citra currently does)
 - GS mode 0: sends VS output to GS input registers, and sends GS output to primitive assembler
 - GS mode 1: sends VS output to GS uniform registers, and sends GS output to primitive assembler. It also takes an index from the index buffer at the beginning of each primitive for determine the primitive size.
 - GS mode 2: similar to mode 1, but doesn't take the index and uses a fixed primitive size.
hwtest shows that immediate mode also supports GS (at least for mode 0), so the geometry pipeline gets refactored into its own class for supporting both drawing mode.
In the immediate mode, some games don't set the pipeline registers to a valid value until the first attribute input, so a geometry pipeline reset flag is set in `pipeline.vs_default_attributes_setup.index` trigger, and the actual pipeline reconfigure is triggered in the first attribute input.
In the normal drawing mode with index buffer, the vertex cache is a little bit modified to support the geometry pipeline. Instead of OutputVertex, it now holds AttributeBuffer, which is the input to the geometry pipeline. The AttributeBuffer->OutputVertex conversion is done inside the pipeline vertex handler. The actual hardware vertex cache is believed to be implemented in a similar way (because this is the only way that makes sense).
Both geometry pipeline and GS unit rely on states preservation across drawing call, so they are put into the global state. In the future, the other three vertex shader units should be also placed in the global state, and a scheduler should be implemented on top of the four units. Note that the current gs_unit already allows running VS on it in the future.
8 years ago
wwylele 8285ca4ad8 pica/shader/jit: implement SETEMIT and EMIT 8 years ago
wwylele 36981a5aa6 pica/primitive_assembly: Handle winding for GS primitive
hwtest shows that, although GS always emit a group of three vertices as one primitive, it still respects to the topology type, as if the three vertices are input into the primitive assembler independently and sequentially. It is also shown that the winding flag in SETEMIT only takes effect for Shader topology type, which is believed to be the actual difference between List and Shader (hence removed the TODO). However, only Shader topology type is observed in official games when GS is in use, so the other mode seems to be just unintended usage.
8 years ago
wwylele bb63ae3052 correct constness 8 years ago
wwylele 28128348f2 pica/shader/interpreter: implement SETEMIT and EMIT 8 years ago
wwylele 46c6973d2b pica/shader: extend UnitState for GS
Among four shader units in pica, a special unit can be configured to run both VS and GS program. GSUnitState represents this unit, which extends UnitState (which represents the other three normal units) with extra state for primitive emitting. It uses lots of raw pointers to represent internal structure in order to keep it standard layout type for JIT to access.
This unit doesn't handle triangle winding (inverting) itself; instead, it calls a WindingSetter handler. This will be explained in the following commits
8 years ago
wwylele db309b2423 pica/regs: layout geometry shader configuration regs
All the register meanings are derived from ctrulib (3dbrew is outdated for most of them)
8 years ago
bunnei c2466a2f19 Merge pull request #2862 from j-selby/update-cryptopp
Update CryptoPP (byte ambiguity)
8 years ago
Weiyi Wang 792dee47a7 Merge pull request #2822 from wwylele/sw_lighting-2
Implement fragment lighting in the sw renderer (take 2)
8 years ago
Weiyi Wang 93ab46e500 Merge pull request #2856 from wwylele/shader-share
pica: upload shared shader code & swizzle to both unit
8 years ago
bunnei 437526e782 Merge pull request #2864 from mailwl/dlp-update
Service/dlp: Update function tables according 3dbrew
8 years ago
mailwl a6273dd56a Service/dlp: Update function tables according 3dbrew 8 years ago
James 1a44949ef7 Update cryptopp 8 years ago
wwylele baa24f4ea9 pica: upload shared shader code to both unit 8 years ago
James Rowe 343bbfdabc Merge pull request #2860 from anodium/patch-1
Quickfix typo in OpenGL 3.3 error message
8 years ago
Andrea Pascal f55b7aefd9 Quickfix typo in OpenGL 3.3 error message
User pointed out on the Discord server that "nothave" is erroneously concatenated. Added a space to prevent it.
8 years ago
James Rowe 0dc285dcfd Merge pull request #2855 from bunnei/telemetry-additional-fields
Telemetry: Add several more useful fields
8 years ago
bunnei fb8de89859 telemetry: Add field for OsPlatform. 8 years ago
bunnei 9390d54bb3 telemetry: Add field for BuildName. 8 years ago
bunnei 5c631ec9c5 telemetry: Add field for RequiresSharedFont. 8 years ago
bunnei a621ab6853 telemetry_session: Log BuildDate and ProgramName fields. 8 years ago
bunnei f44a1e0291 common: Add build timestamp to scm_rev. 8 years ago
bunnei 9b8e5bea66 core: Expose AppLoader as a public interface. 8 years ago
bunnei f5cf9960d9 loader: Expose program title. 8 years ago
wwylele 2252a63f80 SwRasterizer/Lighting: shorten file name 8 years ago
wwylele eda28266fb SwRasterizer/Lighting: move to its own file 8 years ago
wwylele 48b4105871 SwRasterizer/Lighting: reduce confusion 8 years ago
wwylele c59ed47608 SwRasterizer/Lighting: move quaternion normalization to the caller 8 years ago
Yuri Kunde Schlesner 035716d57b Merge pull request #2850 from j-selby/fix_invalid_paths
Handle invalid filenames when renaming files/directories
8 years ago
James 941a722ff1 Handle invalid filenames when renaming files/directories 8 years ago
Weiyi Wang 60024ad7c2 Merge pull request #2848 from wwylele/shader-loop-fix
pica/shader_interpreter: fix off-by-one in LOOP
8 years ago
James Rowe fc43e027f6 Merge pull request #2849 from j-selby/master
Produce 7zip artifacts on Travis and Appveyor
8 years ago
j-selby a7dae7fd70 Produce 7zip artifacts on Travis and Appveyor 8 years ago
bunnei 05a38e307c Merge pull request #2679 from MerryMage/interp-tests
DynCom VFP tests
8 years ago
bunnei f15e5522dc Merge pull request #2840 from Subv/apt_parameter
Services/APT: Corrected the behavior of the Receive/Send/Glance/CancelParameter functions
8 years ago
wwylele c89f804a01 pica/shader_interpreter: fix off-by-one in LOOP 8 years ago
bunnei a724fb3657 Merge pull request #2837 from wwylele/shader-debugger-fix
Misc shader debugger fixes
8 years ago
bunnei 7dbe3c18f1 Merge pull request #2847 from B3n30/network_linux_fix
Fixed build error "too many initializers for ‘const MacAddress"
8 years ago
B3n30 718423e506 Network: Moved NintendoOUI initalization to RoomMember constructor 8 years ago
Weiyi Wang f2f39102fa Merge pull request #2844 from jroweboy/nightlyfix
Use WinSSPI instead of OpenSSL
8 years ago
James Rowe 0f81e18793 Use WinSSPI instead of OpenSSL
Appveyor has OpenSSL installed, so cURL tries to link against it.
This causes dll not found errors because we would also need to ship
OpenSSL, so we link against Windows SSPI instead.
8 years ago
MerryMage a08edd67eb tests: Add tests for vadd 8 years ago
MerryMage 567c3a2ee7 tests: Arm testing framework 8 years ago
Sebastian Valle c6a2e519ef Merge pull request #2816 from wwylele/proctex-lutlutlut
gl_rasterizer: use texture buffer for proctex LUT
8 years ago
Sebastian Valle e646bd902d Merge pull request #2834 from wwylele/depth-enable-fix
gl_rasterizer_cache: fix using_depth_fb
8 years ago
Weiyi Wang 045d0b5bbd Merge pull request #2799 from yuriks/virtual-cached-range-flush
Add address conversion functions returning optional, Add function to flush virtual region from rasterizer cache
8 years ago
Subv e59ab7c1d6 Service/APT: Log Send/Cancel/Receive/GlanceParameter calls even if they return an error. 8 years ago
Subv 68596a7068 Services/APT: Return the proper error code when calling SendParameter with an outstanding parameter already in memory. 8 years ago
Subv a9bc417f59 Services/APT: Reset the APT parameter inside CancelParameter if the conditions are met. 8 years ago
Subv e403638d9b Services/APT: Properly clear the apt parameter after a successful ReceiveParameter call. 8 years ago