Commit graph

2761 commits

Author SHA1 Message Date
skidau
cdff138c67 Show no more than one FIFO error per session. 2015-03-13 23:25:15 +11:00
Tillmann Karras
3987725217 VertexLoaderX64: fix harmless off-by-one error 2015-03-08 04:43:59 +01:00
degasus
35373c5185 TextureCache: load all mipmap levels from custom textures
This drops the "feature" to load level 0 from the custom texture
and all other levels from the native one if the size matches.
But in my opinion, when a custom texture only provide one level,
no more should be used at all.
2015-03-02 00:09:09 +01:00
magumagu
7f7973efa5 Merge pull request #2148 from Tilka/fifo_cleanup
Small FIFO-related cleanup
2015-03-01 13:06:43 -08:00
degasus
7ca24f90d1 TexCache: increase TEXTURE_KILL_THRESHOLD
Xenoblade uses more than 40 textures alternately per frame for eg water effects.
So don't try to drop them as aggressive.
2015-03-01 13:41:14 +01:00
Tillmann Karras
9493c713dd Fifo: small cleanup 2015-02-28 15:40:01 +01:00
Tillmann Karras
e28c97f6bd Fifo: drop unused functions 2015-02-28 15:40:00 +01:00
Lioncash
d10571a86a PixelShaderManager: Remove unnecessary casts.
EFBToScaledXf and EFBScaledYf return a float, so the cast isn't needed here.
2015-02-28 00:04:05 -05:00
Lioncash
7408de7e79 Merge pull request #2058 from Stevoisiak/Codemaid-Cleanup-Take2
Basic Formatting/Whitespace Cleanup
2015-02-25 18:07:56 -05:00
Stevoisiak
93b16a4a2d Formatting/Whitespace Cleanup
Various fixes to formatting and whitespace
2015-02-25 10:48:21 -05:00
degasus
967eaad8df VideoCommon: rename efb2tex and efb2ram 2015-02-24 23:10:13 +01:00
degasus
1313d3461f VideoCommon: always enable efb copy 2015-02-24 23:01:01 +01:00
Tillmann Karras
e2fec13ab6 Fix some -Wsign-compare warnings 2015-02-24 10:29:59 +01:00
Tillmann Karras
f298f00e1b Clean up the intrinsics #ifdef mess 2015-02-24 01:02:36 +01:00
skidau
593563e16c Merge pull request #2087 from Armada651/epsilon-3d
VertexShaderManager: Turn the epsilon hack back on for 3D Vision.
2015-02-23 13:12:55 +11:00
skidau
f8e51a1a26 Merge pull request #2050 from Tilka/reset_vertex_loader_stats
VertexLoaderManager: reset stats properly
2015-02-23 13:10:38 +11:00
degasus
b35fa222f5 VideoCommon: perf querys by async events 2015-02-22 08:41:15 +01:00
degasus
edbd402101 VideoCommon: bbox by async events 2015-02-22 08:41:15 +01:00
degasus
ad7264da7d VideoCommon: implement swap requests in the full async way 2015-02-22 08:41:15 +01:00
degasus
bc248f8941 VideoCommon: use a new async event system for efb access 2015-02-22 08:41:15 +01:00
Jules Blok
ff4127cf50 VertexShaderManager: Turn the epsilon hack back on for 3D Vision.
The bug is fixed in version 347.52 of the drivers.
2015-02-21 12:09:49 +01:00
Jules Blok
139ad3b2b9 TextureConversionShader: Use a Texture2DArray to match the shader resource view. 2015-02-21 11:50:20 +01:00
Markus Wick
6bbf774507 Merge pull request #2075 from magumagu/titantron-fix
Partially fix WWE12 titantron videos.
2015-02-21 10:09:47 +01:00
Scott Mansell
355be1719e Fix regression with directx when zfreeze=true and ztest=false. 2015-02-21 10:52:29 +13:00
magumagu
074397c12d Explicitly set up AllocateTexture configuration for palette conversion.
No functional change.
2015-02-19 15:57:05 -08:00
magumagu
ddc815dd7a Remove TextureAddress struct. 2015-02-19 15:36:32 -08:00
magumagu
c0a4760f0e Decode EFB copies used as paletted textures.
A number of games make an EFB copy in I4/I8 format, then use it as a
texture in C4/C8 format.  Detect when this happens, and decode the copy on
the GPU using the specified palette.

This has a few advantages: it allows using EFB2Tex for a few more games,
it, it preserves the resolution of scaled EFB copies, and it's probably a
bit faster.

D3D only at the moment, but porting to OpenGL should be straightforward..
2015-02-19 15:09:27 -08:00
magumagu
4cdf9f543f Partially fix WWE12 titantron videos.
The obvious question here is, why does it matter if we round or truncate?
The key is that GC/Wii does fixed-point interpolation, where PC GPUs do
floating-point interpolation. Discarding fractional bits makes the conversion
from floating-point to fixed point give more consistent results.

I'm not confident this is really the right fix, or that my explanation is
completely correct; ideally, we don't want to depend on floating-point
interpolation at all.
2015-02-18 19:41:00 -08:00
mimimi085181
2f8e0c9bb9 Allow multiple texture cache entries for textures at the same address
This is the same trick which is used for Metroid's fonts/texts, but for all textures. If 2 different textures at the same address are loaded during the same frame, create a 2nd entry instead of overwriting the existing one. If the entry was overwritten in this case, there wouldn't be any caching, which results in a big performance drop.

The restriction to textures, which are loaded during the same frame, prevents creating lots of textures when textures are used in the regular way. This restriction is new. Overwriting textures, instead of creating new ones is faster, if the old ones are unlikely to be used again.

Since this would break efb copies, don't do it for efb copies.

Castlevania 3 goes from 80 fps to 115 fps for me.

There might be games that need a higher texture cache accuracy with this, but those games should also see a performance boost from this PR.

Some games, which use paletted textures, which are not efb copies, might be faster now. And also not require a higher texture cache accuracy anymore. (similar sitation as PR https://github.com/dolphin-emu/dolphin/pull/1916)
2015-02-18 23:54:40 +01:00
Ryan Houdek
3aa605236d Merge pull request #2041 from Sonicadvance1/AArch64_vertex_loader
[AArch64] Vertex loader and things
2015-02-17 00:51:51 -06:00
Ryan Houdek
ed008c3a69 [AArch64] Change the vertex loader over to using unscaled loadstores.
In nearly all direct loadstore cases we can use unscaled loadstores.
Still have a fallback in case we hit a situation that we /can't/ do a unscaled loadstore.
2015-02-16 22:03:09 -06:00
Ryan Houdek
b4b03641b3 [AArch64] Implement vertex loader recompiler.
Shows a noticeable reduction in time spent in the vertex loader.
2015-02-16 16:51:32 -06:00
Pierre Bourdon
3500740dd4 Windows AVIDump: support "silent" frame dumping
When enabled, the silent option will avoid popping up dialog boxes for
overwrite confirmation or codec selection. The codec selection defaults to
uncompressed RGB.

This is required for FifoCI on Windows which needs to drive Dolphin from the
command line exclusively.
2015-02-14 23:38:14 +01:00
Markus Wick
405444d4fe Merge pull request #1803 from lioncash/rgb
OnScreenDisplay: Allow for different colored messages
2015-02-14 10:47:47 +01:00
Tillmann Karras
1a52cff1c9 VertexLoaderManager: reset stats properly 2015-02-14 02:30:05 +01:00
Ryan Houdek
15e41c67f8 Change RunVertices' function arguments.
This reduces some dumb state shuffling when calling the emitted vertex loaders.
2015-02-13 12:16:06 -06:00
degasus
c404e87226 ShaderGen: Fix pixel offset correction
We want to move the vertex by 1/12 pixel, but the old code
did miss the perspective division. So by multiplying with pos.w,
the position is moved correctly after the perspective division.
2015-02-11 20:54:15 +01:00
magumagu
d9988ee9b5 Merge pull request #1987 from magumagu/thread-safety
Cleanup usage of atomic/threadsafe functions
2015-02-10 13:48:12 -08:00
Lioncash
9d5c6c55fe OnScreenDisplay: Allow for different colored messages 2015-02-07 17:35:21 -05:00
Lioncash
e07679114b Use emplace_* functions where in-place construction is preferable 2015-02-04 11:39:08 -05:00
magumagu
57d94de2ad Fix regression for D3D EFB depth copies.
On D3D, we read from the depth buffer using the format
DXGI_FORMAT_R24_UNORM_X8_TYPELESS (essentially, the "r" component contains
the depth, and the other components contain nothing).
2015-02-03 11:27:27 -08:00
Markus Wick
3c475b91ea Merge pull request #1993 from Armada651/line-perspective
GeometryShaderGen: Perspective divide the line coordinates before comparing the angle.
2015-01-31 23:45:54 +01:00
Jules Blok
8c55ec0d51 GeometryShaderGen: Perspective divide the line coordinates before comparing the angle. 2015-01-31 23:32:23 +01:00
Tillmann Karras
1aac65f988 VertexLoaderManager: assimilate GetVertexSize() 2015-01-31 09:23:50 +01:00
magumagu
47be9d8e6b Clean up usage of ScheduleEvent_Threadsafe. 2015-01-30 14:48:23 -08:00
degasus
20628b6e5d OpcodeDecoder: Calculate decoding time for vertices 2015-01-29 19:55:28 +01:00
Gabriel Corona
a4adfe194a JitRegister: overload Register with a [start,end) variant 2015-01-28 09:50:19 +01:00
Markus Wick
beaa9905a6 Merge pull request #1966 from magumagu/unify-efb-encode
Unify EFB encoding shader generation
2015-01-27 23:14:18 +01:00
Markus Wick
43605f8716 Merge pull request #1948 from magumagu/remove-efb-cache
Remove EFB to RAM cache, and simplify code.
2015-01-27 09:42:15 +01:00
Tillmann Karras
3dbd6cd384 VertexLoaderX64: save XMM0 if the ABI requires it 2015-01-26 22:24:06 +01:00
Tillmann Karras
8416a86b6d VertexLoaderBase: fix crash on invalid formats 2015-01-26 22:24:06 +01:00
Tillmann Karras
66f28707e7 VertexLoader: small clean up 2015-01-26 22:24:06 +01:00
magumagu
b56025e6eb Don't use boolean negation. 2015-01-25 23:28:59 -08:00
magumagu
92189823f3 Fix RGBA8 encoding. 2015-01-25 22:53:30 -08:00
magumagu
b0b99b6922 Fix shader so it's possible to use with D3D Map().
Well, that's not strictly true, but trying to memcpy between two buffers
using different row lengths and different strides is at minimum extremely
unintuitive.
2015-01-25 19:57:09 -08:00
magumagu
6c1bdfe04c More work. 2015-01-25 19:57:07 -08:00
magumagu
ef75f3005d WIP. 2015-01-25 15:49:35 -08:00
Jules Blok
5c4ee2f71e PostProcessing: Move default pixel shader to PostProcessingShaderConfiguration.
Reduces code complexity and fixes a bug where the shader is not properly invalidated.
2015-01-25 23:08:49 +01:00
Jules Blok
262c3b19ec PostProcessing: Add support for user-supplied anaglyph shaders.
There are lots of different anaglyph glasses out there and there may be even more creative uses for stereoscopic post-processing shaders.
2015-01-25 22:07:03 +01:00
Scott Mansell
61215e7180 Fix a buffer underrun in CalculateZSlope. 2015-01-25 20:31:20 +13:00
Lioncash
9cdfe889af Coding style cleanup from the zfreeze merge 2015-01-24 15:16:48 -05:00
Markus Wick
ae514cb0f2 Merge pull request #1955 from degasus/master
TexCache: Rewrite the texID generation for paletted textures
2015-01-24 15:37:25 +01:00
degasus
51990fcdfa TexCache: Rewrite the texID generation for paletted textures
This changes the behavior if both texture are available. The old code did
try to load the modfied texID, the new code tries the unmodified texID first.
2015-01-24 13:58:20 +01:00
Markus Wick
4f6d0049a7 Merge pull request #1951 from Sonicadvance1/Remove_old_defines
Remove an old GLES define that I missed.
2015-01-24 13:38:26 +01:00
Tony Wasserka
43036af944 Merge pull request #1812 from phire/real_zfreeze
Add proper zfreeze support.
2015-01-24 13:29:57 +01:00
Scott Mansell
14baf038e7 Stop doing nastly shit to OpenGL stream buffers.
Instead we keep the loaded vertices in CPU memory.
2015-01-24 14:41:51 +13:00
Ryan Houdek
189528171b Remove an old GLES define that I missed. 2015-01-23 14:30:23 -06:00
magumagu
6659c15bed Remove EFB to RAM cache, and simplify code. 2015-01-23 10:48:15 -08:00
Scott Mansell
5510c86b81 Move Zfreeze code out individual backends into videoCommon
Also:
 * Implement support for per-vertex PosMatrixIndex
 * Only update zslope constant once when zfreeze is activated.
 * Added a bunch of comments.
2015-01-24 03:22:27 +13:00
Scott Mansell
daf760b202 A few small cleanups based on code review. 2015-01-23 04:38:36 +13:00
Scott Mansell
e88c02dece Ensure that ZSlopes save/restore state correctly.
Had to re-do *ShaderManager so they saved their constant arrays
instead of completly rebuilding them on restore state.
2015-01-23 03:32:31 +13:00
Scott Mansell
128d303656 Reduce number of divisions in screenspace transform.
This is closer to what the hardware does anyway.
2015-01-23 03:32:31 +13:00
NanoByte011
add59b3bea Fixes Mario Tennis Gimmick Courts and adds support for FastDepthCalc
- Calculate ZSlope every flush but only set PixelShader Constant on Reset Buffer when zfreeze
- Fixed another Pixel Shader bug in D3D that was giving me grief
2015-01-23 03:32:31 +13:00
Scott Mansell
6d5065c58d Fix pixelshader constant offsets. 2015-01-23 03:32:31 +13:00
Scott Mansell
88c7afd315 Make zfreeze use screenspace coordinates independant of IR.
OpenGL requires the y coordinates to be flipped.

Also refactored PixelGen code to remove duplicate code.
2015-01-23 03:32:31 +13:00
Scott Mansell
418296961c Fix various issues with zfreeze implemntation.
Results are still not correct, but things are getting closer.

 * Don't cull CULLALL primitives so early so they can be used as reference
        planes.
 * Convert CalculateZSlope to screenspace coordinates.
 * Convert Pixelshader to screenspace coordinates (instead of worldspace
        xy coordinates, which is totally wrong)
 * Divide depth by 2^24 instead of clamping to 0.0-1.0 as was done
        before.

Progress:
 * Rouge Squadron 2/3 appear correct in game (videos in rs2 save file
         selection are missing)
 * Shadows draw 100% correctly in NHL 2003.
 * Mario golf menu renders correctly.
 * NFS: HP2, shadows sometimes render on top of car or below the road.
 * Mario Tennis, courts and shadows render correctly, but at wrong depth
 * Blood Omen 2, doesn't work.
2015-01-23 03:32:31 +13:00
NanoByte011
613781c765 Cleanup and refactor of zfreeze port
Based on the feedback from pull request #1767 I have put in most of
degasus's suggestions in here now.

I think we have a real winner here as moving the code to
VertexManagerBase for a function has allowed OGL to utilize zfreeze now
:)

Correct use of the vertex pointer has also corrected most of the issue
found in pull request #1767 that JMC47 stated.  Which also for me now
has Mario Tennis working with no polygon spikes on the characters
anymore!  Shadows are still an issue and probably in the other games
with shadow problems.  Rebel Strike also seems better but random skybox
glitches can show up.
2015-01-23 03:32:31 +13:00
NanoByte011
937844b9e3 Initial port of zfreeze branch (3.5-1729)
Initial port of original zfreeze branch (3.5-1729) by neobrain into
most recent build of Dolphin.

Makes Rogue Squadron 2 very playable at full speed thanks to recent core
speedups made to Dolphin. Works on DirectX Video plugin only for now.

Enjoy!  and Merry Xmas!!
2015-01-23 03:31:54 +13:00
skidau
d27bd9d291 Merge pull request #1885 from degasus/custom_texture
CustomTexture: new name format
2015-01-23 00:43:39 +11:00
NanoByte011
0a9257ad37 Cleaned up whitespace
Fixed Directional Attenuation (assumed, data was light dir vector already, but it was not!)
2015-01-21 22:30:41 -07:00
NanoByte011
f475e367f2 Lighting Attenuation Fixes 2015-01-21 15:55:32 -07:00
degasus
7cf4dd63e4 CustomTexture: fix texture format 2015-01-21 23:33:42 +01:00
degasus
1d0557a5e6 CustomTexture: use xxhash 2015-01-21 21:47:18 +01:00
degasus
84c8645d22 CustomTexture: Convert old format automatically 2015-01-21 21:22:55 +01:00
degasus
f9ced4eb13 CustomTexture: also support the legacy format 2015-01-21 21:22:55 +01:00
degasus
62402efa6c CustomTexture: Mark textures with mipmaps 2015-01-21 21:22:55 +01:00
degasus
ee9d05d67f CustomTexture: Use another file name with wildcards 2015-01-21 21:22:55 +01:00
degasus
a353ead3cb CustomTexture: Use always safe texture hash 2015-01-21 21:22:55 +01:00
degasus
eeaad06a07 CustomTexture: check for min/max index on paletted textures 2015-01-21 21:22:55 +01:00
Ryan Houdek
1c62c2f935 Merge pull request #1924 from degasus/xxhash
VideoCommon: xxhash
2015-01-21 14:19:35 -06:00
Ryan Houdek
80e6367e46 Merge pull request #1869 from Stevoisiak/GeneralConsistency
Minor consistency changes
2015-01-21 13:46:53 -06:00
Ryan Houdek
50d495b581 Merge pull request #1916 from mimimi085181/master
Make efb to texture less broken for paletted textures that are efb copies
2015-01-21 13:40:36 -06:00
Ryan Houdek
7fba4856ce Merge pull request #1931 from Sonicadvance1/Fix_PP_Config
Fix the Post Processing shader configuration dialog.
2015-01-21 13:29:01 -06:00
degasus
402fb4bd20 xxhash: Add cmake + VS files
Based on riking's PR.
2015-01-21 07:35:34 +01:00
Ryan Houdek
d348bfea46 Fix the Post Processing shader configuration dialog.
On locales that don't use period as a separator this would break us.
For vector values in a configuration, we use comma as a separator which causes the configuration to balloon to massive sizes due to never saving them
correctly. Loading would then break since it would load a million configuration options.
Fixes issue #7569.
2015-01-20 16:40:46 -06:00
Jules Blok
f40cd04a29 PixelShaderGen: Fix uninitialized variables. 2015-01-20 23:15:01 +01:00
Tillmann Karras
1dcf49237b VertexLoaderX64: support VAT.ByteDequant=0 2015-01-20 09:23:15 +01:00
Tillmann Karras
46ab5d63d6 VertexLoader: never reset alpha in 8888 colors
Fixes the opening menu of Xenoblade Chronicles.
2015-01-20 09:22:55 +01:00
Tillmann Karras
80617ec6bd VertexLoader: remove weird line 2015-01-20 01:53:52 +01:00
Tillmann Karras
873902b4a3 VertexLoader: remove non-JIT SSE code 2015-01-20 01:51:07 +01:00
Markus Wick
0d0f7ec662 Merge pull request #1894 from Armada651/exclusive-fix
D3D: Fix Dolphin immediately exiting exclusive fullscreen.
2015-01-19 23:29:43 +01:00
Jules Blok
332d5888eb VideoConfig: Add exclusive mode flag.
Allows the UI to easily check the current exclusive mode state.
This simplifies a few checks and prevents the user from ever getting stuck in fullscreen.
2015-01-19 22:55:21 +01:00
Tillmann Karras
804341d4fe VertexLoader: fix position offset bug 2015-01-19 17:38:40 +01:00
Tillmann Karras
4b323096ec VertexLoader_Position: remove old JIT ideas 2015-01-19 17:36:24 +01:00
Ryan Houdek
7e64869185 Merge pull request #1887 from Tilka/vertex_loader_jit
VertexLoader: rewrite x64 JIT
2015-01-18 19:48:14 -06:00
mimimi085181
0d3343d093 Make efb to texture less broken for paletted textures that are efb copies
Don't change the texID depending on the tlut_hash for paletted textures that are efb copies and don't have an entry in the cache for texID ^ tlut_hash. This makes those textures less broken when using efb to texture.

This is not really fixing those textures, but it's a step forward. The mini map in Twilight Princess for example is in grayscales with this and is more or less usable.
2015-01-19 01:31:41 +01:00
Tillmann Karras
d3f49097c5 VertexLoaderX64: register symbol for code page 2015-01-18 23:20:44 +01:00
degasus
9f13a77799 TexCache: don't try to aggressive reuse the entry
As we pool them now, freeing and reallocating them is quite fast.
2015-01-18 19:58:33 +01:00
degasus
8565f02699 TexCache: use an unordered_multimap for the tex pool 2015-01-18 19:58:33 +01:00
degasus
4639d3b1bc TexCache: also incude textures within the render target pool 2015-01-18 19:47:48 +01:00
degasus
6cd6e6546f TexCache: merge texture and rendertarget factory function 2015-01-18 19:47:48 +01:00
degasus
615ae9f106 TexCache: remove PC_TexFormat
We only support rgba32 for a while now, so there is no need to have everything in common configureable.
2015-01-18 19:47:48 +01:00
Tillmann Karras
bc5cf10ad5 VertexLoaderX64: optimize color conversions 2015-01-18 17:47:18 +01:00
Tillmann Karras
7d0cff05e9 VertexLoaderX64: make table lookup deterministic 2015-01-18 16:22:21 +01:00
Tillmann Karras
1855d56f1a VertexLoaderX64: fix a bunch of stuff
Suggestions by @degasus and @FioraAeterna.
2015-01-18 13:31:28 +01:00
Tillmann Karras
dc01e261d1 VertexLoaderX64: fix duplicate register allocation
Thanks to @shuffle2 for noticing this.
2015-01-18 13:30:21 +01:00
Tillmann Karras
f5545477e3 VertexLoaderX64: suggestions by @magumagu
- avoid register merges
- avoid redundant MOV
2015-01-18 13:30:19 +01:00
Tillmann Karras
b27ba3802e VertexLoaderX64: implement pre-Haswell fallbacks 2015-01-18 13:29:34 +01:00
Tillmann Karras
e82e9f97f5 VertexLoader: add new JIT 2015-01-18 13:29:34 +01:00
Tillmann Karras
20ded4c1e5 VertexLoader: remove old JIT 2015-01-18 12:59:33 +01:00
Tillmann Karras
bec30068a6 VertexLoader_TextCoord: reorder function list 2015-01-18 12:59:33 +01:00
Tillmann Karras
d86957944a VertexLoader_Color: clean up 2015-01-18 12:59:33 +01:00
Tillmann Karras
6a26771cd5 VertexLoader_Normal: use shorter notation 2015-01-18 12:59:33 +01:00
Tillmann Karras
20bc18cd5d VertexLoaderManager: make it nicer to read 2015-01-18 12:59:33 +01:00
Tillmann Karras
b0df4b08ec VertexLoaderTester: fix a few problems 2015-01-18 12:59:33 +01:00
Tillmann Karras
2cedc0034d DataReader: turn WritePointer into GetPointer 2015-01-18 12:59:33 +01:00
mimimi085181
96bcb09fb2 Fix another small bug with the efb2ram cache
Textures that are directly next to each other were falsely detected as overlapping.
2015-01-17 19:10:00 +01:00
Markus Wick
7069450ce5 Merge pull request #1872 from degasus/texcache
Texcache cleanup 2
2015-01-13 22:45:49 +01:00
Markus Wick
980ce440ef Merge pull request #1813 from Armada651/convergence
Add UI for per-game stereoscopy settings.
2015-01-13 00:25:38 +01:00
Markus Wick
5be85cf928 Merge pull request #1814 from phire/worldspace_untangling
Move worldpos into it's own varying.
2015-01-12 22:59:21 +01:00
Stevoisiak
cb86db7b68 Minor consistency changes
Mostly small changes, like capitalization and spelling
2015-01-12 15:18:18 -05:00
skidau
14ced85d85 Made the CPU thread wait for the GPU thread to swap, when XFB is enabled. May fix some of the "FIFO is overflowed by GatherPipe ! CPU thread is too fast!" errors. 2015-01-12 19:40:43 +11:00
degasus
22e06daf5c TexCache: recreate the entry on level missmatch 2015-01-11 23:11:04 +01:00
degasus
a9eb08b85d TexCache: Choose texture based on mipmap count 2015-01-11 22:41:04 +01:00
degasus
744b1c1624 TexCache: rewrite level calculation 2015-01-11 22:23:35 +01:00
degasus
d95e5e2b6f TexCache: create a const Config struct 2015-01-11 22:23:35 +01:00
degasus
d640453274 TexCache: cleanup max texture level 2015-01-11 22:23:35 +01:00
degasus
1261f5f7f4 TextureCache: inline arguments into texture cache 2015-01-11 22:23:35 +01:00
degasus
2b47df07b6 TexCache: use c++11 syntax for std::map::erase 2015-01-11 22:23:35 +01:00
degasus
1c98a43203 TexCache: clean up frameCount handling 2015-01-11 22:23:35 +01:00
degasus
6ba613fbd3 TexCache: unify global variables 2015-01-11 22:23:35 +01:00
degasus
774596dbed TexCache: rename OverlapsMemoryRange 2015-01-11 22:23:35 +01:00
degasus
dddcea5a9a TexCache: don't invalidate efb copys because of config changes
We'll loose data on invalidating them. So just keep them until a new copy is done.
A wrong scaled copy is better than no copy if the game doesn't creates a new one.
2015-01-11 22:23:35 +01:00
degasus
38f42da55a TexCache: remove expanded_width
This variable isn't use any more.
2015-01-10 12:22:03 +01:00
degasus
614d058db1 TexCache: don't load tex level 0 on creation
This reverts an optimization which isn't worth imo. Every texture uploads have to alloc vram and a staging buffer, so there is no need to do both in the same call.
2015-01-10 12:21:33 +01:00
degasus
8bdbe37c91 TexCache: Wipe pal hash 2015-01-10 11:55:16 +01:00
Markus Wick
f0f8384639 Merge pull request #1785 from degasus/custom_texture
VideoCommon: Custom texture handling
2015-01-08 13:29:45 +01:00
Tillmann Karras
4d1face540 Fix indentation 2015-01-07 21:51:47 +01:00
Markus Wick
d8d4c94e07 Merge pull request #1819 from Tilka/cmake
CMake: simplify some expressions
2015-01-06 09:27:59 +01:00
degasus
110d494070 VideoCommon: fix deterministic dual core 2015-01-03 21:50:51 +01:00
Tillmann Karras
6bcdb10eee CMake: simplify some expressions 2015-01-03 13:17:57 +01:00
Scott Mansell
1b771deb56 Move worldpos into it's own varying.
Previously it was packed into spare slots in clippos.xy and normal.w,
but it's ugly and more importantly it's causing bugs.

This was discovered during the debugging of a zfreeze branch, which
expected clippos.xy to be xy position coordinates in clipspace (as
the name suggested).

Turns out the stereoscopy shader had also run into this trap, modifying
clippos.x (introducing errors with per-pixel lighting).

This commit has been moved outside of the zfreeze PR for fast merging.
2015-01-03 09:23:09 +13:00
Jules Blok
b816ee1f79 VideoConfig: Define a per-game minimum convergence value instead of a percentage boost. 2015-01-02 17:07:08 +01:00
skidau
9c6795c7b7 Merge pull request #1778 from JMC47/ReadIdleFix
Remove AtBreakpoint() from ReadIdle. Fixes Rogue Squadron 2 without breaking Gladius
2015-01-02 12:00:00 +11:00
Markus Wick
ec4dfae333 Merge pull request #1747 from Armada651/intel-workaround
OGL: Work around Intel structures bug.
2015-01-01 21:41:09 +01:00
Markus Wick
f5cddd4020 Merge pull request #1790 from Armada651/master
VideoConfig: Don't disable stereoscopy if Real XFB is enabled but not in use.
2014-12-30 12:30:23 +01:00
Jules Blok
0860c02258 VideoConfig: Don't disable stereoscopy if Real XFB is enabled but not in use. 2014-12-29 19:15:31 +01:00
Jules Blok
b474c4229d VertexShaderManager: Turn off the epsilon hack for Nvidia 3D Vision. 2014-12-29 17:05:39 +01:00
Jules Blok
da058b3078 VideoConfig: Fix convergence parameter.
Looks like a rebase failed somewhere.
2014-12-29 12:03:59 +01:00
degasus
c6dd5044d6 VideoCommon: make hash independet from hires textures 2014-12-29 10:24:27 +01:00
degasus
f8184858da VideoCommon: Merge code to generate texture names on dumping 2014-12-29 10:24:27 +01:00
degasus
51bfc4c52a VideoCommon: rewrite custom textures 2014-12-29 10:24:21 +01:00
Jules Blok
3ed777b0f9 PixelShaderGen: Don't assign to input variables. 2014-12-28 23:37:05 +01:00
Jules Blok
8676891f77 VertexShaderGen: Don't read from output variables. 2014-12-28 23:28:00 +01:00
Jules Blok
3f763e6999 DriverDetails: Remove Intel Structs bug since it doesn't affect us anymore. 2014-12-28 23:28:00 +01:00
Jules Blok
7eb353b3bd VideoCommon: Don't pass structs between shaders, use the interface blocks instead. 2014-12-28 23:28:00 +01:00
Jules Blok
2c0bee5da9 DriverDetails: Update Intel bug description. 2014-12-28 23:28:00 +01:00
Markus Wick
0f87d9b669 Merge pull request #1781 from Armada651/xfb-fixes
D3D: Fix Virtual XFB viewport.
2014-12-28 22:22:27 +01:00
Ryan Houdek
15f074dd21 Merge pull request #1766 from Armada651/enable-stereo
Enable stereoscopy settings.
2014-12-28 15:14:53 -06:00
Jules Blok
e1dc033113 Renderer: Cosmetics. 2014-12-28 18:35:23 +01:00
Justin Chadwick
51b26f3397 Remove AtBreakpoint() from ReadIdle. Fixes Rogue Squadron 2 without
Breaking Gladius
2014-12-27 19:16:50 -05:00
Jules Blok
86120bfc97 GeometryShaderManager: Set viewport in SetConstants().
Setting it in the callback is too early.
2014-12-26 17:58:59 +01:00
Jules Blok
af8ac328e5 Renderer: Use old method of calculating the source rectangle. 2014-12-25 02:37:22 +01:00
Jules Blok
46bb4fd364 FramebufferManagerBase: Remove obsolete parameters. 2014-12-25 00:58:16 +01:00
Jules Blok
31a55384b3 VideoConfig: Rename "StereoMonoEFBDepth" to "StereoEFBMonoDepth"
Makes a little bit more sense.
2014-12-24 23:30:40 +01:00
Jules Blok
c424aa1ac6 GeometryShaderManager: Boost convergence value.
Most game don't require much granularity regarding the convergence value.
The default convergence was also too low, this commit increases it tenfold.
2014-12-24 23:29:40 +01:00
Jules Blok
70b898e2c6 VideoConfig: Rename Separation to Depth and update descriptions.
More accurate since it's not a real IPD and Nvidia also calls it depth.
2014-12-24 23:28:23 +01:00
Jules Blok
9590ea0cf6 VideoConfig: Turn off stereoscopy when Real XFB is enabled. 2014-12-24 18:45:24 +01:00
Jules Blok
4a86234a79 D3D: Support stereoscopic XFB blit to screen. 2014-12-24 18:45:24 +01:00
Jules Blok
b109b31f61 FramebufferManagerBase: Only allocate one layer for Real XFB. 2014-12-24 17:22:23 +01:00
degasus
01cd11a835 OGL: fix ssbo based bbox support 2014-12-22 19:10:35 +01:00
degasus
1efd00227d VertexLoader: Skip vertices with position index = -1 2014-12-21 14:29:44 +01:00
degasus
325e8e370e VertexLoader: Merge dummy functions 2014-12-21 14:13:04 +01:00
degasus
7c486a8c24 VertexLoader: Add a VertexLoader pointer to each function call 2014-12-21 14:13:04 +01:00
degasus
7edf6ec4e4 VertexLoader: Add a test loader which compares two vertex loaders 2014-12-21 14:13:04 +01:00
degasus
809117102e VideoCommon: split VertexLoaderBase from VertexLoader 2014-12-21 14:12:43 +01:00
degasus
a71c8158d9 VertexLoader: remove inlined getters
They just blow up the code.
2014-12-21 13:47:43 +01:00
degasus
6e3b2712d2 VideoCommon: Move NativeVertexFormat cache to VertexLoaderManager 2014-12-21 13:47:43 +01:00
degasus
1281798992 VertexLoaderUid: remove operator<
Not needed for unordered map.
2014-12-21 13:47:43 +01:00
degasus
ec28a80e00 VideoLoader: remove VAT_*_FRACBITS
They are used to remove the flush amounts, but as we don't
flush anymore on vertex loader changes (only on native
vertex format right now), this optimization is now unneeded.

This will allow us to hard code the frac factors within the
vertex loaders.
2014-12-21 13:47:42 +01:00
Ryan Houdek
59e1a8a1a0 Merge pull request #1736 from degasus/osd
OSD
2014-12-20 23:21:24 -06:00
degasus
a858db1d27 OGL: move osd warning for not supported stereo mode into config validation 2014-12-20 19:54:00 +01:00
degasus
ed9c14e0d5 OGL: Fix OGL3 with stereo enabled 2014-12-20 19:13:34 +01:00
degasus
3f9b52e555 OGL: draw shadows within rasterfont itself 2014-12-20 13:31:41 +01:00
Jules Blok
d09af2dbba GeometryShaderManager: Set stereo parameters in a SetConstants() call.
Doing it in SetProjectionChanged() is too early because the projection type is not set yet.
2014-12-20 13:16:26 +01:00
degasus
fb177ca04e VideoCommon: merge debug test generators 2014-12-20 13:06:29 +01:00
degasus
ffa014dd48 VideoCommon: merge debug info generators 2014-12-20 12:25:10 +01:00
Dolphin Bot
a560d8f150 Merge pull request #1716 from Armada651/geom-wireframe
VideoCommon: Handle wireframe mode in the geometry shader.
2014-12-20 12:22:40 +01:00
Jules Blok
bc3ed44050 OGL: Disable geometry shaders on Intel's Windows drivers due to broken interface blocks. 2014-12-19 23:56:02 +01:00
Ryan Houdek
b30802e2f0 Merge pull request #1721 from Sonicadvance1/fix_adreno_400
Fixes Adreno 400 performance.
2014-12-19 15:55:50 -06:00
Jules Blok
0d79e8f32b VideoCommon: Don't specify the redundant in/out qualifier if GL_ARB_shading_language_420pack is supported.
Some driver developers interpreted "can" as "must" in the OpenGL specs. (I'm looking at you AMD)
2014-12-19 22:45:39 +01:00
Ryan Houdek
8c0e26d969 Minor changes to DriverDetails
Fixes a typo where the official IMGTec drivers were said to be the OSS driver support.
Removes Mali GPU family detection just like I removed the Adreno family detection.
We don't support Mali Utgard anyway.
If we need family detection we can properly add it, right now it isn't needed.
2014-12-19 21:41:12 +00:00
Ryan Houdek
0fec69001b Fixes Adreno 400 slow performance.
Adreno 300 and 400 have the same video driver performance issues because they are very similar architectures which use basically the same thing with
everything.
There isn't any need to detect the family of the driver with Qualcomm anyway. If we ever need family specific bugs then we can implement real support
for that.
Performance issue on Adreno 400 series was due to us only detecting Adreno 300 series, and with Adreno 400 it wouldn't use the bugs, which would cause
it to use glBufferSubData, causing the huge performance hit.
2014-12-19 21:31:37 +00:00
Jules Blok
531b3941ff GeometryShaderGen: Re-emit the first vertex when wireframe mode is enabled. 2014-12-19 14:24:08 +01:00
Jules Blok
1b9fe70d7c VideoCommon: Make IsPassthrough() a function of the ShaderUid. 2014-12-19 14:10:53 +01:00
Jules Blok
925bbcb85b VideoCommon: Handle wireframe mode in the geometry shader. 2014-12-19 14:10:52 +01:00
Jules Blok
cdd9e07522 VideoCommon: Add in/out qualifiers to centroid storage qualifier.
Fixes shaders for GPUs that don't support GL_ARB_shading_language_420pack.
2014-12-19 12:19:15 +01:00
Ryan Houdek
02f22152be Merge pull request #1706 from Armada651/line-width
VideoCommon: Merge LineGeometryShader into GeometryShaderGen.
2014-12-18 19:43:12 -06:00
Jules Blok
e7e8a4f1cb GeometryShaderGen: Don't use the reserved keyword "point" in D3D. 2014-12-19 02:24:41 +01:00
Markus Wick
c7b809d46b Merge pull request #1669 from degasus/swvertexloader
Video Software Vertex Loader
2014-12-18 19:30:56 +01:00
Jules Blok
8dc3653ac9 VideoCommon: Don't pass structs between shader stages when geometry shaders are unsupported. 2014-12-18 00:37:16 +01:00
Jules Blok
69df23f725 VideoCommon: Only use interface blocks when geometry shaders are supported. 2014-12-18 00:37:14 +01:00
Jules Blok
1af3d8447a GeometryShaderManager: Set the constants within the callbacks. 2014-12-18 00:37:09 +01:00
Jules Blok
7e8f96f0d3 OGL: Don't generate a geometry shader if the backend doesn't support it.
This commit repurposes the bSupportsStereoscopy flag as the bSupportsGeometryShaders flag.
2014-12-18 00:36:49 +01:00
Jules Blok
782a5adb94 VideoCommon: Pass interface blocks between shader stages to resolve naming conflicts. 2014-12-18 00:36:49 +01:00
Jules Blok
bd6d229733 GeometryShader: Disable the geometry shader stage if it is a pass-through shader. 2014-12-18 00:36:48 +01:00
Jules Blok
f2e52b46c3 GeometryShaderGen: Cosmetics. 2014-12-18 00:36:47 +01:00
Jules Blok
0ac7103391 GeometryShaderGen: Pack uniforms more tightly. 2014-12-18 00:36:40 +01:00
Jules Blok
d115048615 GeometryShaderGen: Remove redundant declaration. 2014-12-15 23:20:56 +01:00
Jules Blok
16af00d515 GeometryShaderGen: Use signed integers for the texture offset flags. 2014-12-15 23:05:16 +01:00
Jules Blok
861fa1af23 GeometryShaderGen: Declare a prototype for EmitVertex(). 2014-12-15 22:47:43 +01:00
Jules Blok
8ae738ff30 VideoCommon: Merge PointGeometryShader into GeometryShaderGen.
This adds point-width emulation support to OpenGL.
2014-12-15 22:47:43 +01:00
Jules Blok
55e60a9c22 VideoCommon: Merge LineGeometryShader into GeometryShaderGen.
This adds line-width emulation support to OpenGL.
2014-12-15 22:47:42 +01:00
Jules Blok
275af9c5e4 VideoCommon: Assume we always use a geometry shader, not just for stereoscopy. 2014-12-15 22:47:41 +01:00
Jules Blok
382e1c22db GeometryShaderGen: Support multiple primitive types.
And make more stereoscopy code optional.
2014-12-15 22:47:41 +01:00
Jules Blok
887c669c28 GeometryShaderGen: Redefine gl_InvocationID so we can use the same variable name in both backends. 2014-12-15 22:47:40 +01:00
Jules Blok
332ba4b210 GeometryShaderManager: Upload Line/Point width constants. 2014-12-15 22:47:35 +01:00
Jules Blok
aa4242fd9c GeometryShaderGen: Pass the primitive type and always run the generator regardless of stereoscopy. 2014-12-14 21:23:20 +01:00
Jules Blok
b406e4e1f2 VideoCommon: Add a separate constants buffer for the geometry shader. 2014-12-14 21:23:13 +01:00
Jules Blok
cec5b0ce01 ShaderGen: Remove the GS_OUTPUT struct for OpenGL.
And remove the generator for it since it is no longer used outside of the geometry shader.
2014-12-14 13:28:50 +01:00
Jules Blok
fd6b588627 D3D: Define decimals in floating point numbers 2014-12-14 13:28:49 +01:00
Jules Blok
ea2bcb44f0 Cosmetics 2014-12-14 13:28:48 +01:00
Jules Blok
b06280e866 D3D: Add anaglyph stereoscopy support. 2014-12-14 13:28:47 +01:00
Jules Blok
b769da23d0 PixelShaderGen: Sample the correct texture slice. 2014-12-14 13:28:45 +01:00
Jules Blok
4f6ce0f236 D3D: Add geometry shader instancing support. 2014-12-14 13:28:44 +01:00
Jules Blok
a689db0e48 D3D: Add 3D vision support. 2014-12-14 13:28:42 +01:00
Jules Blok
9253bb7d96 D3D: Add geometry shader stereoscopy support. 2014-12-14 13:28:41 +01:00
Jules Blok
d5ebdf7a97 D3D: Add GeometryShaderCache. 2014-12-14 13:28:41 +01:00
degasus
d5eeb9b713 VideoSW: rewrite VertexLoader to use the VideoCommon one 2014-12-13 10:29:08 +01:00
skidau
d02eb3ca59 Merge pull request #1640 from rohit-n/switch-default
Silence some -Wswitch-default warnings.
2014-12-13 19:47:06 +11:00
Rohit Nirmal
b030d29067 Silence some -Wswitch-default warnings. 2014-12-11 22:23:05 -06:00
Fiora
3effd08843 FIFO: allocate slightly more for SIMD vertex loader overreads
May fix crashes in rare cases.
2014-12-10 05:52:55 -08:00
Markus Wick
4c139ca7cc Merge pull request #1609 from degasus/datareader
VideoCommon: Datareader
2014-12-10 06:53:11 +01:00
degasus
bf65c49609 PixelShaderGen: merge OGL+D3D bbox 2014-12-09 19:32:24 +01:00
degasus
3fc7e55cc4 VideoCommon: clean up VertexLoader 2014-12-09 18:56:27 +01:00
degasus
02cdb41d3d VideoCommon: Rename s_pCurBufferPointer 2014-12-09 18:56:27 +01:00
degasus
50de4238bb VertexLoader: Move the old Datareader function into VertexLoader 2014-12-09 18:56:27 +01:00
degasus
21970c4a2a VideoCommon: cleanup OpcodeDecoder 2014-12-09 18:56:27 +01:00
degasus
4b22885ed8 VideoCommon: fifo cleanups 2014-12-09 18:56:27 +01:00
degasus
27f984c02e VideoCommon: rewrite DataReader 2014-12-09 18:56:27 +01:00
Ryan Houdek
0578ec92c0 Merge pull request #1665 from Sonicadvance1/yielding_the_dual_core_world
Idle loop in GPU loop on dual core systems.
2014-12-09 02:22:27 -06:00
Markus Wick
ff4526b4a9 Merge pull request #1657 from Tinob/master
Add HW bounding Box support to d3d backend
2014-12-08 09:05:22 +01:00
Ryan Houdek
d58bba2160 Idle loop in GPU loop on dual core systems.
Previously we had decided to busy loop on systems due to Windows' scheduler being terrible and moving us around CPU cores when we yielded.
Along with context switching being a hot spot.
We had decided to busy loop in these situations instead, which allows us greater CPU performance on the video thread.
This can be attributed to multiple things, CPU not downclocking while busy looping, context switches happening less often, yielding taking more time
than a busy loop, etc.

One thing we had considered when moving over to a busy loop is the issues that dual core systems would now face due to Dolphin eating all of their CPU
resources. Effectively we are starving a dual core system of any time to do anything else due to the CPU thread always being pinned at 100% and then
the GPU thread also always at 100% just spinning around. We noted the potential for a performance regression, but dismissed it as most computers are
now becoming quad core or higher.

This change in particular has performance advantages on the dual core Nvidia Denver due to its architecture being nonstandard. If both CPU cores are
maxed out, the CPU can't effectively take any idle time to recompile host code blocks to its native VLIW architecture.
It can still do so, but it does less frequently which results in performance issues in Dolphin due to most code just running through the in-order
instruction decoder instead of the native VLIW architecture.
In one particular example, yielding moves the performance from 35-40FPS to 50-55FPS. So it is far more noticeable on Denver than any other system.
Of course once a triple or quad core Denver system comes out this will no longer be an issue on this architecture since it'll have a free core to do
all of this work.
2014-12-07 05:36:44 +00:00
Lioncash
9bcadc8029 Common: Remove locale based functions from CommonFuncs.
Since %f isn't used anymore in the shader generators, these can go.
2014-12-05 20:55:29 -05:00
Rodolfo Bogado
93b4540e19 Add HW bounding Box support to d3d backend 2014-12-05 15:03:24 -03:00
Markus Wick
f00ad2e65c Merge pull request #1656 from kayru/orthographic_projection_epsilon
Moved projection epsilon back to g_fProjectionMatrix[15]
2014-12-05 17:34:50 +01:00
Yuriy O'Donnell
7ba417b73d Moved projection epsilon back to g_fProjectionMatrix[15], which essentially scales vertices instead of just biasing. 2014-12-05 09:41:41 +01:00
Markus Wick
02dae1d1ba VideoCommon: fix include order 2014-12-04 15:15:16 +01:00
skidau
4a424e93a4 Merge pull request #1622 from FioraAeterna/texmtxfloat4
Vertex loader: optimize texmtx_write_float4
2014-12-04 13:10:22 +11:00
Rohit Nirmal
ac22a2184b Fix building with PCH disabled. 2014-12-03 19:59:47 -06:00
skidau
bfc62d2ada Merge pull request #1366 from kayru/orthographic_projection_epsilon
Added projection matrix epsilon that fixes depth clipping issues in some games
2014-12-04 09:10:36 +11:00
Lioncash
88cd27bbca Merge pull request #1392 from kayru/d3d_viewport_depth
D3D: Replaced shader-based depth range remap with viewport
2014-12-03 14:49:30 -05:00
Fiora
e3578683e3 Vertex loader: optimize texmtx_write_float4
Seems to be pretty high in the profile in some geometry-heavy games like The
Last Story, and the compiler-generated assembly is terrifyingly bad, so
SSE-ize it.
2014-12-03 11:17:05 -08:00
Ryan Houdek
5c3bbf7409 Works around broken Intel Windows video drivers.
Just use regular boolean negation in our pixel shader's depth test everywhere except on Qualcomm.
This works around a bug in the Intel Windows driver where comparing a boolean value against true or false fails but boolean negation works fine.
Quite silly.

Should fix issues #7830 and #7899.
2014-12-03 00:33:42 -06:00
Rohit Nirmal
239eaf122a VideoCommon: Fix -Wsign-compare warnings. 2014-11-29 17:40:14 -06:00
Yuriy O'Donnell
a886d8a8ee Renamed DEPTHPARAMS to PIXELCENTERCORRECTION
This shader constant was previously used for depth remapping in D3D and for pixel center correction. Now it only serves one purpose and the new name makes it clear.
2014-11-29 11:42:52 +01:00
Yuriy O'Donnell
cc2227fbc3 D3D: Replaced shader-based depth range remap with viewport
This fixes UI rendering in some games mentioned in https://code.google.com/p/dolphin-emu/issues/detail?id=7785
2014-11-29 11:11:28 +01:00
Fiora
7acd5eba17 Vertex loader: use ABI_CallFunction
Should result in faster/shorter code sequences on platforms where generated
code is close enough to the code segment (e.g. Windows).
2014-11-28 20:26:00 -08:00
Ryan Houdek
ce059769f6 Merge pull request #1439 from Armada651/ogl-stereo-3d
OGL: Stereoscopic 3D Support
2014-11-28 11:45:38 -06:00
Jules Blok
6d51455195 VideoConfig: Further optimize convergence and separation values and update their descriptions.
Previous convergence distance was much too large.
2014-11-27 16:19:26 +01:00
Lioncash
4afb85ef33 Merge pull request #1584 from degasus/master
OGL: also show driver warnings on release builds
2014-11-25 12:41:47 -05:00
Stevoisiak
6da394a4d0 More formatting and consistency fixes 2014-11-24 17:16:59 -05:00
Jules Blok
a04edbcb9a VideoConfig: Add separation and convergence modifiers to the game ini. 2014-11-24 15:10:52 +01:00
Jules Blok
f64aadd362 VideoConfig: Limit the StereoMonoEFBDepth option to the game ini and introduce a separate section for it. 2014-11-24 12:25:35 +01:00
Jules Blok
0f4d59f612 VideoConfig: Rename StereoFocalLength to StereoConvergence. 2014-11-24 11:58:38 +01:00
Jules Blok
9b2cd82da5 GeometryShaderGen: Set the properties of the VS_OUTPUT struct in the uid. 2014-11-23 14:30:12 +01:00
degasus
ed9f258b27 GeometryShader: Don't read from output variables 2014-11-23 14:30:12 +01:00
Jules Blok
106df04e8e GeometryShaderGen: Declare the vertex array size. 2014-11-23 14:30:12 +01:00
Jules Blok
422125c1a9 GeometryShaderGen: Add comments. 2014-11-23 14:30:12 +01:00
Jules Blok
24e4de3643 VideoConfig: Move stereoscopy settings to the Enhancements section. 2014-11-23 14:30:12 +01:00
Jules Blok
0f63186371 TextureCache: Add "Mono EFB Depth Copy" stereoscopy option. 2014-11-23 14:27:40 +01:00
Jules Blok
f3ddf37d07 VideoCommon: Switch to Nvidia stereoscopy offset formula. 2014-11-23 14:27:40 +01:00
Jules Blok
8210b9c915 TextureCache: Ensure that all render target textures have as many layers as the frame buffer.
Also fixes a case where the D3D code path did not initialize num_layers leading to undefined behaviour.
2014-11-23 14:27:40 +01:00
Jules Blok
27f3f804a0 ShaderGen: Only pass VS_OUTPUT between shaders if stereo 3D is enabled.
GLSL130 doesn't support passing structs between shaders.
This is not a problem for stereo 3D which has a GLSL150 requirement.
2014-11-23 14:27:40 +01:00
Jules Blok
51a4d6a4be GeometryShader: Adjust positions after projection.
By adjusting the positions in clip space we can avoid the re-projection.
2014-11-23 14:27:40 +01:00
Jules Blok
ee76c03160 TextureCache: Recompile EFB2Tex shaders when stereo 3D is toggled. 2014-11-23 14:27:40 +01:00
Jules Blok
acc65ee608 GeometryShader: Replicate missing position manipulations from vertex shader. 2014-11-23 14:27:40 +01:00
Jules Blok
3baa01fc73 VideoConfig: Use a smaller focal length default. 2014-11-23 14:27:39 +01:00
Jules Blok
f74d1b16ed OGL: Add Top-and-Bottom stereoscopy mode. 2014-11-23 14:27:39 +01:00
Jules Blok
1261bd02ca VertexShaderManager: Add stereoscopy options to swap the left and right eye. 2014-11-23 14:27:39 +01:00
Jules Blok
c3ad6e7820 PostProcessing: Add support for anaglyph stereoscopy mode. 2014-11-23 14:27:39 +01:00
Jules Blok
6c8f3fa861 VideoConfig: Add StereoMode enumeration. 2014-11-23 14:27:39 +01:00
Jules Blok
d7804a4d3e Cosmetics. 2014-11-23 14:27:39 +01:00
Jules Blok
9b22e15180 VideoConfigDiag: Add stereoscopy options group. 2014-11-23 14:27:38 +01:00
Jules Blok
4d9589b35f Cosmetics. 2014-11-23 14:27:38 +01:00
Jules Blok
9b4185ffdf ShaderGen: Make use of padding to store the stereo flag. 2014-11-23 14:27:38 +01:00
Jules Blok
f370cb386c ProgramShaderCache: Always generate a geometry shader UID, even if stereoscopy is disabled. 2014-11-23 14:27:38 +01:00
Jules Blok
6cacfad010 GeometryShader: Transform the projection within the geometry shader.
Reduces the amount of data transferred through uniforms.
The shearing transformation is reduced to a single multiplication/addition for optimization.
2014-11-23 14:27:38 +01:00
Jules Blok
4fd943aedd VideoConfig: Limit the Stereo 3D option to the OpenGL backend. 2014-11-23 14:27:38 +01:00
Jules Blok
63b37e29d1 ShaderGen: Rename "eye" to "layer".
Keeping things generic.
2014-11-23 14:26:56 +01:00