Commit Graph

2583 Commits

Author SHA1 Message Date
Tillmann Karras 7a6a5e2791 VertexLoaderX64: generate PIC
Address static memory relative to a base register, analog to what we're
doing with PPCSTATE in the CPU JIT. This allows executable memory for
the vertex loader JIT to be allocated anywhere, not just within 2 GiB of
static data.

Fixes issue 8180.
2015-06-03 02:27:37 +02:00
comex 0c5aa54606 Merge pull request #2470 from degasus/syncgpu
Common: Blocking Loop (extracted from Fifo.cpp)
2015-06-02 20:19:00 -04:00
comex a3b3f0522b Merge pull request #1556 from comex/project-moration
Rudimentary version of Wii IPC determinism.  Ported from my old udpnet branch.
2015-06-02 18:38:19 -04:00
Markus Wick aa2576a2c7 Merge pull request #2480 from phire/GamesDoWeirdShit
Fix invalid pointer errors in Burnout 2.
2015-05-31 23:26:55 +02:00
flacs a806feb10e Merge pull request #2474 from Tilka/zfreeze
zfreeze: fix 2-component positions
2015-05-31 06:35:21 +02:00
degasus bfa61105d5 Common: Update BlockingLoop to only use one atomic.
This merges two atomic<bool> into one atomic<int>.
We did move the bit from one bool to another, now we can use operator--.
2015-05-30 12:58:09 +02:00
degasus 02a3a063c3 Fifo: Extract syncing loop
It's now a new helper function within common.
2015-05-30 12:58:09 +02:00
Scott Mansell 7df6982973 Add a dirty flag for arraybases.
Only loop through and call getPointers when something has actually
changed.
Worth about 2-4% speedup un SMG over the previous commit.
2015-05-30 04:39:48 +12:00
Scott Mansell f57517f1a0 Clean up cached_arraybases. Update VideoSW to new scheme.
Move ownership of cached_arraybases from CPMemory to VertexLoaderManager
to better match it usage.
2015-05-30 04:09:27 +12:00
Tillmann Karras 4943b36259 zfreeze: fix 2-component positions 2015-05-29 13:43:12 +02:00
Scott Mansell 6d916762fb Fix invalid pointer errors in Burnout 2.
Yet another story of games loading weird shit into registers.

For some reason, Burnout 2 would (in rare situations) load invalid
addresses into cp_state.array_bases. What would the real hardware
do in this situation? Who knows, Burnout 2 doesn't actually enable
the vertex array with the invalid address so nothing kinky happens.

But dolphin tries to optimise things and starts using the address
as soon as it is loaded into memory. This causes GetPointer (which is
now much more vocal) to throw an error.

The Fix:  We don't call GetPointer until we are sure the vertex array
has been enabled.
2015-05-29 18:51:17 +12:00
Ryan Houdek cdbdff436b Merge pull request #2478 from degasus/fix_prefetching
HiresTexture: Fix prefetching with broken textures
2015-05-29 01:42:48 -04:00
degasus c69cc91f00 HiresTexture: Fix prefetching with broken textures 2015-05-29 07:31:11 +02:00
Lioncash ac26f8e79f Pass strings by const reference where possible 2015-05-28 20:54:55 -04:00
comex a225426510 Rewrite FileSearch and improve ScanDirectoryTree.
- FileSearch is now just one function, and it converts the original glob
  into a regex on all platforms rather than relying on native Windows
  pattern matching on there and a complete hack elsewhere.  It now
  supports recursion out of the box rather than manually expanding
  into a full list of directories in multiple call sites.

  - This adds a GCC >= 4.9 dependency due to older versions having
  outright broken <regex>.  MSVC is fine with it.

- ScanDirectoryTree returns the parent entry rather than filling parts
  of it in via reference.  The count is now stored in the entry like it
  was for subdirectories.

- .glsl file search is now done with DoFileSearch.

- IOCTLV_READ_DIR now uses ScanDirectoryTree directly and sorts the
  results after replacements for better determinism.
2015-05-28 19:14:42 -04:00
Lioncash 1ba3b4e7ac CommandProcessor: Replace volatile usages with atomics
Also remove said variables from being globals.
2015-05-27 03:53:29 -04:00
Lioncash ec03196267 PixelEngine: Replace volatile usages with atomics
Also removes two unused volatile variables.
2015-05-27 02:39:55 -04:00
Markus Wick a6b327751a Merge pull request #2463 from lioncash/fifo
Fifo: Replace usages of volatile with atomics
2015-05-27 08:03:39 +02:00
Lioncash 4cb55cc427 Fifo: Replace usages of volatile with atomics 2015-05-27 00:42:56 -04:00
Matthew Parlane 3135b4f3e4 Merge pull request #2461 from lioncash/barrier
Thread: Remove unused Barrier class
2015-05-27 13:21:14 +10:00
Lioncash 23c11b3f27 Thread: Remove unused Barrier class 2015-05-26 19:25:59 -04:00
galop1n 2975e53091 D3D: Depth range inversion.
Credits go to Galop1n for designing this technique and to BhaaLseN for cleaning up the commit.
2015-05-26 15:31:31 +02:00
Markus Wick a6412fb41e Merge pull request #2162 from degasus/prefetch_tex
CustomTexture: prefetch all available textures
2015-05-26 13:30:26 +02:00
Ryan Houdek 061848457a Merge pull request #2382 from RisingFog/vfwfix
Fix video dumping incorrect lengths for some games in Windows
2015-05-25 23:46:22 -04:00
Ryan Houdek dad5d8e13d Merge pull request #2357 from degasus/ogl_efb_poke_merge
ogl: efb poke merge
2015-05-25 23:26:39 -04:00
Ryan Houdek 69963dc4b0 Merge pull request #2274 from degasus/disable_bbox
Disable bbox
2015-05-25 08:46:12 -04:00
Tillmann Karras 30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
Tillmann Karras cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
Tillmann Karras 268f52e054 Add missing license headers 2015-05-25 13:11:47 +02:00
degasus 7e127da791 VideoCommon: Warn if bbox is disabled but used 2015-05-25 09:33:34 +02:00
degasus 029912681e VideoCommon: return 0 if bbox is disabled
Through just returning the last written value sounds better, this crashes Paper Mario.
In my opinion, gfx issues are fine on older GPUs, but crashes should not happen.
2015-05-25 09:33:34 +02:00
degasus 6b2a1e57e2 BBox: remove now unreachable SW bbox implementation 2015-05-25 09:33:34 +02:00
degasus acd074e291 VideoCommon: Make BBox emulation optional 2015-05-25 09:33:34 +02:00
Jules Blok e31982474c OGL: Depth range inversion. 2015-05-22 23:52:22 +02:00
Jules Blok 88cc91030e VertexShaderGen: Use correct depth output when glClipControl is supported. 2015-05-22 23:52:21 +02:00
degasus c7bae5ad11 VideoCommon: Merge EFB pokes 2015-05-20 10:39:21 +02:00
Jules Blok ef78941042 VideoBackends: Clamp depth to uint24 range. 2015-05-18 23:22:28 +02:00
degasus 562b9d4a9f VideoCommon: Abort texture prefetching on low RAM
There is no nice way to correctly "detect" the "used" memory, so we just say
we're fine to use 50% of the physical memory for custom textures.

This will fix out-of-memory crashes, but we still might run into swapping issues.
2015-05-16 15:39:36 +02:00
degasus 242f7d964d CustomTexture: prefetch all available textures 2015-05-16 15:12:07 +02:00
degasus 3d98f6ab9f PixelShaderGen: apply zfreeze before ztextures
The zfreeze option freezes the depth plane of the rasterization.
So this is done before the TEV stages, where the z-textures are applied.
2015-05-13 20:06:23 +02:00
Fog 16081a23f1 Fix video dumping incorrect lengths for some games 2015-05-09 02:28:48 -04:00
Jules Blok 1d745d632a PixelShaderGen: Clamp zCoord to the depth range. 2015-05-08 14:43:43 +02:00
Jules Blok d04af15ad4 TextureConversionShader: Use floating point values in clamp(). 2015-05-08 14:32:24 +02:00
Jules Blok 5dbb43ae1d PixelShaderGen: Use new multiplier everywhere and directly cast to int instead or rounding. 2015-05-08 14:32:23 +02:00
Jules Blok 0f2c72f0f8 VideoCommon: Clamp integer conversions. 2015-05-08 14:32:16 +02:00
Jules Blok c4f85a38e6 VideoBackends: Use proper floating point depth precision. 2015-05-08 14:29:29 +02:00
Markus Wick a76bfb1f55 Merge pull request #2356 from Armada651/dump-efb
VideoCommon: Implement EFB dumping for both backends.
2015-05-02 13:27:38 +02:00
Jules Blok 54f4443971 VideoCommon: Implement EFB dumping for both backends. 2015-05-02 13:23:33 +02:00
Ingve Skåra 5799824b22 Fix dead link 2015-05-01 21:42:50 +02:00
comex bac4167ff5 Merge pull request #2319 from comex/linted-fix-qualcomm-fail
(lint issues fixed) Fix OpenGLES 3.0 on Qualcomm's crappy driver, it can't bitshift sometimes.
2015-04-29 17:09:56 -04:00