Commit Graph

5287 Commits

Author SHA1 Message Date
wwylele 2814d0fba2 EmuWindow: refactor touch input into a TouchDevice 2017-08-24 15:00:56 +03:00
wwylele 5ec879dfaa HID: use TouchDevice for touch pad 2017-08-24 13:56:43 +03:00
James Rowe 35e185309b Merge pull request #2839 from Subv/global_kernel_lock
Kernel/HLE: Use a mutex  to synchronize access to the HLE kernel state between the cpu thread and any other possible threads that might touch the kernel (network thread, etc).
2017-08-23 18:17:44 -06:00
bunnei add21dee2f Merge pull request #2893 from Subv/not_schedule_main_thread
Kernel/Threads: Don't immediately switch to the new main thread when loading a new process.
2017-08-22 17:45:47 -04:00
Subv 36220f3873 Kernel/Memory: Acquire the global HLE lock when a memory read/write operation falls outside of the fast path, for it might perform an MMIO operation. 2017-08-22 09:30:58 -05:00
Subv 9cf64ca2cf Kernel/HLE: Use a mutex to synchronize access to the HLE kernel state between the cpu thread and any other possible threads that might touch the kernel (network thread, etc).
This mutex is acquired in SVC::CallSVC, ie, as soon as the guest application enters the HLE kernel, and should be acquired by the aforementioned threads before modifying kernel structures.
2017-08-22 09:30:55 -05:00
James Rowe 95ccb3a6e6 Merge pull request #2888 from Subv/warnings
Fixed some warnings in the core project.
2017-08-22 08:09:09 -06:00
bunnei d5d688d05b Merge pull request #2894 from wwylele/motion-emu-fix
motion_emu: fix initialization order
2017-08-22 09:36:38 -04:00
wwylele 56684ad10b motion_emu: fix initialization order 2017-08-22 11:43:44 +03:00
wwylele 709d362609 gl_rasterizer/lighting: more accurate CP formula 2017-08-22 09:34:44 +03:00
wwylele 6813c61423 SwRasterizer/Lighting: implement LUT input CP 2017-08-22 09:34:44 +03:00
wwylele f75c6b4d36 SwRasterizer/Lighting: implement bump mapping 2017-08-22 09:34:44 +03:00
Subv 733dfe220e Kernel/Threads: Don't immediately switch to the new main thread when loading a new process.
This is necessary for loading multiple processes at the same time.
The main thread will be automatically scheduled when necessary once the scheduler runs.
2017-08-21 20:54:29 -05:00
bunnei 9c7c909980 Merge pull request #2884 from wwylele/clip
gl_rasterizer: add clipping plane z<=0 defined in PICA
2017-08-21 13:24:12 -04:00
bunnei 2a921cfc68 Merge pull request #2889 from Schplee/updated-logo-svg
Updated master logo to new logo svg
2017-08-21 13:22:23 -04:00
Subv 1c6f3ee4ba GPU/Warnings: Explicitly cast the screen refresh ticks to u64. 2017-08-21 08:34:30 -05:00
Subv f94bd67a0d Warnings: Add UNREACHABLE macros to switches that contemplate all possible values. 2017-08-21 08:34:28 -05:00
Subv ecfad8a134 HLE/Applets: Fixed some conversion warnings when creating the framebuffer shared memory objects. 2017-08-21 08:34:27 -05:00
Subv 690eed4d9e CPU/Dynarmic: Fixed a warning when incrementing the number of ticks in ExecuteInstructions. 2017-08-21 08:34:25 -05:00
Subv 015a96a59b Dyncom: Use size_t instead of int to store the instruction offsets in the instruction cache.
Fixes a few warnings.
2017-08-21 08:34:23 -05:00
Subv b2d8872e56 Dyncom: Fixed a conversion warning when decoding thumb instructions. 2017-08-21 08:20:36 -05:00
wwylele c0bc013929 swrasterizer: remove invalid TODO
This function is called in clipping, before the pespective divide, and is not used in later rasterization. Thus it doesn't need perspective correction.
2017-08-21 08:03:07 +03:00
wwylele a931e4974e swrasterizer/clipper: remove tested TODO
hwtested. Current implementation is the correct behavior
2017-08-21 08:03:07 +03:00
wwylele a8499f3adb gl_shader_gen: simplify and clarify the depth transformation between vertex shader and fragment shader 2017-08-21 08:03:07 +03:00
wwylele d332ede188 gl_rasterizer: add clipping plane z<=0 defined in PICA 2017-08-21 08:03:07 +03:00
Yuri Kunde Schlesner d7d434cbc7 Merge pull request #2872 from wwylele/sw-geo-factor
SwRasterizer/Lighting: implement geometric factor
2017-08-20 17:49:42 -07:00
Yuri Kunde Schlesner 157b736203 Merge branch 'update-soundtouch' (PR #2885) 2017-08-20 17:30:22 -07:00
MerryMage 48aecbfbd3 externals: Update soundtouch 2017-08-20 17:30:05 -07:00
James Rowe df206639cf Merge pull request #2861 from wwylele/motion-refactor
Refactor MotionEmu into a InputDevice
2017-08-19 23:43:01 -06:00
wwylele 13014535c1 HID: fix a comment and a warning 2017-08-20 08:37:48 +03:00
James Rowe 989749253e Merge pull request #2871 from wwylele/sw-spotlight
SwRasterizer/Lighting: implement spot light
2017-08-19 20:10:24 -06:00
Schplee 8b593c6772 Updated master logo to new logo svg 2017-08-19 18:33:44 -07:00
B3n30 95fd4a5e9d 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
wwylele 35b3fef422 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
wwylele 6d51febdc4 pica/shader/jit: implement SETEMIT and EMIT 2017-08-19 10:13:20 +03:00
wwylele ab3e6dba1f 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
wwylele 4283f4b244 correct constness 2017-08-19 10:13:20 +03:00
wwylele 4d4dbc83a7 pica/shader/interpreter: implement SETEMIT and EMIT 2017-08-19 10:13:20 +03:00
wwylele 2599928707 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
wwylele 6e56beafbf motion_emu: no need to include thread in header 2017-08-19 07:21:02 +03:00
Yuri Kunde Schlesner e24db32ae8 Merge pull request #2881 from MerryMage/dsp-firm-check
dsp_dsp: Remove size assertion in LoadComponent
2017-08-15 20:14:41 -07:00
MerryMage 98edc03737 dsp_dsp: Remove size assertion in LoadComponent 2017-08-15 10:16:50 +01:00
bunnei bc7a8e7f38 Merge pull request #2879 from danzel/patch-1
Fix Spelling/English mistakes
2017-08-13 20:22:24 -04:00
Dave Leaver 4c281049aa Fix Spelling/English mistakes 2017-08-14 09:15:39 +12:00
Sebastian Valle ebc3701d0e 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
Weiyi Wang b5493813d7 Merge pull request #2875 from wwylele/bump-skip
gl_shader_gen: don't call SampleTexture when bump map is not used
2017-08-12 01:23:45 +03:00
wwylele a26768503a gl_shader_gen: don't call SampleTexture when bump map is not used 2017-08-11 18:35:00 +03:00
James Rowe 5a532aa414 Merge pull request #2869 from j-selby/docker-build
Travis: Use Docker to build for Linux
2017-08-11 08:39:14 -06:00
James Rowe 708208c17b Merge pull request #2867 from j-selby/tag-naming
Implement correct folder structure for CI builds
2017-08-11 08:36:04 -06:00
wwylele d500f79b8e move MotionEmu from core/frontend to input_common as a InputDevice 2017-08-11 11:05:08 +03:00