Commit Graph

5404 Commits (8e51c61dbce925e0992e27c2c33311583645bd6f)
 

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 223bd35450 motion_emu: no need to include thread in header 8 years ago
Yuri Kunde Schlesner 21204ba488 Merge pull request #2881 from MerryMage/dsp-firm-check
dsp_dsp: Remove size assertion in LoadComponent
8 years ago
MerryMage b67c2dc82c dsp_dsp: Remove size assertion in LoadComponent 8 years ago
bunnei 595070c901 Merge pull request #2879 from danzel/patch-1
Fix Spelling/English mistakes
8 years ago
Dave Leaver bf71fc0342 Fix Spelling/English mistakes 8 years ago
Sebastian Valle d59f503729 Merge pull request #2843 from Subv/applet_slots
Services/APT: Use an array to hold data about the 4 possible concurrent applet types (Application, Library, HomeMenu, System)
8 years ago
Weiyi Wang 7cd8a65949 Merge pull request #2875 from wwylele/bump-skip
gl_shader_gen: don't call SampleTexture when bump map is not used
8 years ago
wwylele 686fb3e78c gl_shader_gen: don't call SampleTexture when bump map is not used 8 years ago
James Rowe 8fd28244e4 Merge pull request #2869 from j-selby/docker-build
Travis: Use Docker to build for Linux
8 years ago
James Rowe a3aa8617bc Merge pull request #2867 from j-selby/tag-naming
Implement correct folder structure for CI builds
8 years ago
wwylele 188194908c move MotionEmu from core/frontend to input_common as a InputDevice 8 years ago
wwylele 867eabd6b7 HID: use MotionDevice for Accelerometer and Gyroscope 8 years ago
Weiyi Wang 53ef90d1bd Merge pull request #2874 from danzel/spelling-1
Fix some spelling mistakes
8 years ago
danzel 8d3f48d0a3 Fix some spelling mistakes 8 years ago
wwylele 945f9a1b04 SwRasterizer/Lighting: implement spot light 8 years ago
wwylele 14ee32c46a SwRasterizer/Lighting: implement geometric factor 8 years ago
Weiyi Wang aaf5161344 Merge pull request #2863 from wwylele/pad-state-zero
HID: zero unused PadState bits
8 years ago
wwylele 599de29ea3 HID: zero unused PadState bits 8 years ago
James fa64309aac Travis: Use Docker to build for Linux 8 years ago
Weiyi Wang 2415bad9ad Merge pull request #2868 from wwylele/swr-tuple
SwRasterizer/Lighting: use make_tuple instead of constructor
8 years ago
wwylele 5d9d42f0d0 SwRasterizer/Lighting: use make_tuple instead of constructor
implicit tuple constructor is a c++17 thing, which is not supported by some not-so-old libraries. Play safe for now
8 years ago
j-selby 80f85b429c Implement correct folder structure for CI builds 8 years ago
James Rowe 9f6868ad9b Merge pull request #2857 from j-selby/deploy-fix
Travis/AppVeyor: Deploy based upon tags
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
Subv 177e8ce655 Services/APT: Use the AppletAttributes union directly when dealing with applet attrs. 8 years ago
Subv 73fba0de46 Services/APT: Use an array to hold data about the 4 possible concurrent applet types (Application, Library, HomeMenu, System).
This gives each applet type its own set of events as per the real NS module.
8 years ago
wwylele baa24f4ea9 pica: upload shared shader code to both unit 8 years ago
j-selby 8bda0ca68d Travis/AppVeyor: Deploy based upon tags 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