Commit Graph

4646 Commits

Author SHA1 Message Date
8afa81ac1b Merge pull request #2871 from wwylele/sw-spotlight
SwRasterizer/Lighting: implement spot light
2017-08-19 20:10:24 -06:00
5d0a1e7efd Added missing parts in libnetwork (#2838)
* Network: Set and send the game information over enet

Added Callbacks for RoomMember and GetMemberList to Room in preparation for web_services.
2017-08-19 11:14:33 -06:00
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.
2017-08-19 10:13:20 +03:00
8285ca4ad8 pica/shader/jit: implement SETEMIT and EMIT 2017-08-19 10:13:20 +03:00
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.
2017-08-19 10:13:20 +03:00
bb63ae3052 correct constness 2017-08-19 10:13:20 +03:00
28128348f2 pica/shader/interpreter: implement SETEMIT and EMIT 2017-08-19 10:13:20 +03:00
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
2017-08-19 10:13:20 +03:00
223bd35450 motion_emu: no need to include thread in header 2017-08-19 07:21:02 +03:00
21204ba488 Merge pull request #2881 from MerryMage/dsp-firm-check
dsp_dsp: Remove size assertion in LoadComponent
2017-08-15 20:14:41 -07:00
b67c2dc82c dsp_dsp: Remove size assertion in LoadComponent 2017-08-15 10:16:50 +01:00
bf71fc0342 Fix Spelling/English mistakes 2017-08-14 09:15:39 +12:00
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)
2017-08-12 10:27:57 -05:00
686fb3e78c gl_shader_gen: don't call SampleTexture when bump map is not used 2017-08-11 18:35:00 +03:00
188194908c move MotionEmu from core/frontend to input_common as a InputDevice 2017-08-11 11:05:08 +03:00
867eabd6b7 HID: use MotionDevice for Accelerometer and Gyroscope 2017-08-11 11:03:18 +03:00
53ef90d1bd Merge pull request #2874 from danzel/spelling-1
Fix some spelling mistakes
2017-08-11 11:02:14 +03:00
8d3f48d0a3 Fix some spelling mistakes 2017-08-11 19:51:16 +12:00
945f9a1b04 SwRasterizer/Lighting: implement spot light 2017-08-11 01:19:10 +03:00
14ee32c46a SwRasterizer/Lighting: implement geometric factor 2017-08-11 01:18:43 +03:00
aaf5161344 Merge pull request #2863 from wwylele/pad-state-zero
HID: zero unused PadState bits
2017-08-10 17:50:18 +03:00
599de29ea3 HID: zero unused PadState bits 2017-08-10 17:01:03 +03:00
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
2017-08-10 12:19:58 +03:00
db309b2423 pica/regs: layout geometry shader configuration regs
All the register meanings are derived from ctrulib (3dbrew is outdated for most of them)
2017-08-10 01:53:08 +03:00
c2466a2f19 Merge pull request #2862 from j-selby/update-cryptopp
Update CryptoPP (byte ambiguity)
2017-08-09 16:18:43 -04:00
792dee47a7 Merge pull request #2822 from wwylele/sw_lighting-2
Implement fragment lighting in the sw renderer (take 2)
2017-08-09 18:54:29 +03:00
93ab46e500 Merge pull request #2856 from wwylele/shader-share
pica: upload shared shader code & swizzle to both unit
2017-08-09 18:52:30 +03:00
a6273dd56a Service/dlp: Update function tables according 3dbrew 2017-08-09 16:14:07 +03:00
1a44949ef7 Update cryptopp 2017-08-08 17:50:09 +10:00
177e8ce655 Services/APT: Use the AppletAttributes union directly when dealing with applet attrs. 2017-08-07 16:09:55 -05:00
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.
2017-08-07 14:53:58 -05:00
baa24f4ea9 pica: upload shared shader code to both unit 2017-08-07 10:30:05 +03:00
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.
2017-08-04 23:11:27 -04:00
fb8de89859 telemetry: Add field for OsPlatform. 2017-08-03 20:10:38 -04:00
9390d54bb3 telemetry: Add field for BuildName. 2017-08-03 20:10:37 -04:00
5c631ec9c5 telemetry: Add field for RequiresSharedFont. 2017-08-03 20:10:37 -04:00
a621ab6853 telemetry_session: Log BuildDate and ProgramName fields. 2017-08-03 20:10:37 -04:00
f44a1e0291 common: Add build timestamp to scm_rev. 2017-08-03 20:10:37 -04:00
9b8e5bea66 core: Expose AppLoader as a public interface. 2017-08-03 20:10:37 -04:00
f5cf9960d9 loader: Expose program title. 2017-08-03 20:10:37 -04:00
2252a63f80 SwRasterizer/Lighting: shorten file name 2017-08-03 13:51:22 +03:00
eda28266fb SwRasterizer/Lighting: move to its own file 2017-08-02 22:20:40 +03:00
48b4105871 SwRasterizer/Lighting: reduce confusion 2017-08-02 22:07:15 +03:00
c59ed47608 SwRasterizer/Lighting: move quaternion normalization to the caller 2017-08-02 22:05:53 +03:00
941a722ff1 Handle invalid filenames when renaming files/directories 2017-07-31 17:11:53 +10:00
60024ad7c2 Merge pull request #2848 from wwylele/shader-loop-fix
pica/shader_interpreter: fix off-by-one in LOOP
2017-07-29 12:34:28 +03:00
05a38e307c Merge pull request #2679 from MerryMage/interp-tests
DynCom VFP tests
2017-07-27 11:21:36 -04:00
f15e5522dc Merge pull request #2840 from Subv/apt_parameter
Services/APT: Corrected the behavior of the Receive/Send/Glance/CancelParameter functions
2017-07-27 11:14:27 -04:00
c89f804a01 pica/shader_interpreter: fix off-by-one in LOOP 2017-07-27 13:48:27 +03:00
a724fb3657 Merge pull request #2837 from wwylele/shader-debugger-fix
Misc shader debugger fixes
2017-07-26 16:00:10 -04:00