Commit Graph

4450 Commits

Author SHA1 Message Date
Brett Lawson
c1c8a3745a Correctly handling vertex shader semantic mappings. 2016-07-17 20:25:15 -07:00
Brett Lawson
9fb6eb1a33 Added constant to control the use of persistent buffer mapping.
Mapping buffers accross multiple frames is not supported by
NSight in the majority of cases.  This flag allows you to unmap
buffers between frames, which allows Nsight to behave properly.
2016-07-17 20:25:10 -07:00
Brett Lawson
9620717440 Update GLSL2 transpiler to handle shadow samplers properly.
We now use the instructions themselves to determine whether or
not to use a shadow sampler or not.
2016-07-17 20:25:05 -07:00
Andrew Church
fa4e7bbc44 Add a --time-scale option to control the emulated clock speed.
Mainly useful when running under Valgrind, to prevent games from
thinking threads have locked up.
2016-07-18 10:25:33 +09:00
James Benton
e7cefcaff4 tests/hle: Add some basic tests for frameheap. 2016-07-17 23:32:34 +01:00
James Benton
70c2c31cf1 coreinit: Rewrite frame heap to be closer to implementation in coreinit.rpl
This refactors frame heaps for issue #147.
2016-07-17 22:06:55 +01:00
James Benton
d1de8c3c6f Fix some formatting. 2016-07-17 15:00:55 +01:00
Brett Lawson
c27da3fe5c Fix issue where JIT might not track Core* properly. 2016-07-17 03:44:31 -07:00
Brett Lawson
40d1f47fc6 Implement tw instruction as a decaf_abort.
This gives slightly more useful information than before
when the application hits a tw.
2016-07-17 03:44:31 -07:00
Brett Lawson
80c7ab9f3f Handle core switching during interrupts properly.
Previously, a thread performing a core-switch during its
interrupt handling, when running on the interpreter, would
cause other core states to become corrupted.
2016-07-17 03:44:31 -07:00
Brett Lawson
eea5357ec7 Added virtual memory allocation coreinit functions.
Our implementation does not handle the full range of possible
cases, but I believe it will cover the range with which most
applications will use.  I hope... *crosses fingers*.
2016-07-17 03:44:31 -07:00
Brett Lawson
3a30578234 Added stub for the dot syscall section of RPL's. 2016-07-17 03:44:30 -07:00
Brett Lawson
c7995ceded Allow use of zero'd mutexes as if they were initialised. 2016-07-17 03:44:30 -07:00
Brett Lawson
4c5c5078cb Avoid relocating things to invalid sections.
This is neccessary as some naughty games are giving us
relocations to $UNDEF and such symbols before they apply
true relocations to those addresses.  People are crazy.
2016-07-17 03:44:30 -07:00
Brett Lawson
858fc34724 Improve trampoline generation assertions.
This helps understand the reasoning behind the loader
failing to properly relocate a particular function.
2016-07-17 03:44:30 -07:00
Brett Lawson
a4d70476d5 Use application memory to allocate loader temporary data. 2016-07-17 03:44:29 -07:00
James Benton
2d91f54e51 decaf-cli: Fix oopsy semicolon. 2016-07-16 12:58:45 +01:00
James Benton
ad7e212c0c decaf: Log the config path and game path. 2016-07-16 12:38:10 +01:00
James Benton
cd7ed3a6f8 decaf: Fix makeConfigPath to use HostPath so we use the platform's path separators. 2016-07-16 12:37:31 +01:00
James Benton
939e301a2d decaf: Add missing platform header include for filesystem host path. 2016-07-16 12:36:16 +01:00
James Benton
cce346a1d2 decaf: Improve default config options. 2016-07-16 12:35:30 +01:00
James Benton
e0076a5541 common: Implement Windows getConfigDirectory.
Uses the %APPDATA% Roaming folder.
2016-07-16 12:35:01 +01:00
Andrew Church
2176535637 Add --config option to set the configuration file location. 2016-07-16 12:05:23 +01:00
Andrew Church
9b58729d2f Store configuration files in a platform-standard directory.
Not yet implemented for Windows.
2016-07-16 12:05:22 +01:00
Brett Lawson
636deedb31 Add Linux support to the JIT by selecting proper registers. 2016-07-16 02:47:49 -07:00
Brett Lawson
fd28b011e6 Updated JitFinale calls to use semantic register names.
This is a prerequisite of remapping those names to different
registers to support the System-V calling convention used by
non-Windows systems.
2016-07-16 02:47:49 -07:00
Brett Lawson
10ae1a530d Pregenerate the basic relocation code and use asmjit.
This updates the relocation code generator to avoid doing
some repetative work when generating by creating a base
template to use when the runtime is set up.  The code also
now generates the assembly using asmjit to support altering
which registers it is using.
2016-07-16 02:47:48 -07:00
Brett Lawson
47cfb5ad2d Move membaseReg to a new home that is platform-agnostic. 2016-07-16 02:47:48 -07:00
Brett Lawson
048e43ccee Fix bug causing OSWaitCond could fail to wake.
We rescheduled before sleeping the thread, this meant that
if another thread preempted this thread in the first
reschedule and signalled the condition, it would not wake
the thread which was trying to wait.
2016-07-15 22:04:19 -07:00
Brett Lawson
196c1a8bb3 LC DMA does not actually check if it is enabled.
It appears to be used internally as a hint instead.
2016-07-15 22:04:19 -07:00
Brett Lawson
4c86750ba2 Implement some more snd_core voice related stubs. 2016-07-15 22:04:19 -07:00
Brett Lawson
0ed09718e6 Properly handle reading data from shadow samplers. 2016-07-15 22:04:19 -07:00
Brett Lawson
5dd5735516 Increase number of available uniform blocks when compiling glsl. 2016-07-15 22:04:19 -07:00
Andrew Church
49f294008e opengl: Fix disassembly of VTX_FETCH instructions in shader comments. 2016-07-16 13:43:59 +09:00
James Benton
e31ed5873b opengl: Implement cubemap texture uploading.
Apparently we just do the same as a 2D array when uploading using DSA.
2016-07-16 02:45:12 +01:00
James Benton
365e103292 coreinit: Rename coreinit_unitheap.* to coreinit_memunitheap.*
To reflect the refactor.
2016-07-16 02:24:15 +01:00
Brett Lawson
d5ff0c9773 Use temporary scopes to reduce JIT register pressure.
Add some scoping for temporaries so we can reduce our
register pressure for operations which do lots of things
with temporaries.
2016-07-15 18:04:37 -07:00
Brett Lawson
552d5ef4c4 Do not waste a register on truncateToSingleSd. 2016-07-15 18:04:37 -07:00
Brett Lawson
8ce314dde5 jit: Replicate PS[0] to PS[1] for many floating point instructions. 2016-07-15 18:04:37 -07:00
Brett Lawson
eeed38bcd0 Handle strange PowerPC multiply-single RHS truncation. 2016-07-15 18:04:37 -07:00
Brett Lawson
97f6aaa4c9 Use entirety of SSE registers for paired singles registers. 2016-07-15 18:04:37 -07:00
Brett Lawson
392fd40f39 Implement missing icbi instruction in JIT. 2016-07-15 18:04:36 -07:00
James
fa494df270 Merge pull request #186 from achurch/r11g11b10-fix
opengl: Return correct data type for R11G11B10 formats.
2016-07-16 00:14:57 +01:00
James
ff9ea49199 Merge pull request #187 from achurch/color-buffer-masking
opengl: Disable color buffers which are masked off at draw time.
2016-07-15 23:36:03 +01:00
Brett Lawson
9f6f4010d8 Merge pull request #188 from achurch/breakpoint-fix
libcpu: Fix debugger selecting wrong core on breakpoint.
2016-07-15 14:59:47 -07:00
James Benton
78f703c9d4 coreinit: Rewrite unit heap to be closer to the implementation in coreinit.
This does unit heaps for issue #147
2016-07-15 22:58:16 +01:00
Andrew Church
8a22590b38 libcpu: Fix debugger selecting wrong core on breakpoint.
There is no need to interrupt other cores from libcpu, since the
debugger will do so on its own.
2016-07-16 06:54:15 +09:00
James Benton
306213e187 coreinit: Fix registering of internal function dumpUnitHeap. 2016-07-15 22:04:56 +01:00
James Benton
43971ba044 coreinit: Implement MEM{Get,Set}FillValForHeap. 2016-07-15 22:04:02 +01:00
James Benton
28eda1fdaa coreinit: Refactor some memory heap stuff. 2016-07-15 21:51:23 +01:00