Commit graph

2281 commits

Author SHA1 Message Date
Jasper St. Pierre
c54fef5496 VideoBackendBase: Remove unused stub Initialize implementation
Both D3D and OGL have their own overrides, so this isn't used.
2014-08-06 21:35:52 -04:00
Pierre Bourdon
16f180524c VertexLoader: do not prepare for vertices if we need to skip them 2014-08-04 20:47:02 -07:00
Pierre Bourdon
15920d0f10 Merge pull request #394 from degasus/d3d_lighting_fix
VideoCommon: normalize light direction
2014-08-03 21:21:23 -07:00
Pierre Bourdon
4c42b38de1 Merge pull request #428 from Sonicadvance1/x86_32-removal
Remove x86_32 support from Dolphin.
2014-08-03 21:17:28 -07:00
Ryan Houdek
d9b5482840 Remove x86_32 from VertexLoader. 2014-08-03 13:44:37 -05:00
Pierre Bourdon
6f715a1fbe VertexLoader: Remove more global state dependencies (this time IndexGenerator and VertexManager) 2014-08-02 09:34:39 -07:00
Pierre Bourdon
83838a645f Merge pull request #690 from Armada651/d3dfullscreen_fixes
Exclusive fullscreen fixes
2014-07-30 16:28:56 -07:00
Jules Blok
3b5625c76b VideoConfig: Ignore Borderless Fullscreen setting when the backend does not support exclusive fullscreen.
This was expected to be handled by VerifyValidity(), but that only verifies the validity of the INI files.
2014-07-30 12:15:58 +02:00
Jules Blok
4501aeefbe CFrame: Check borderless fullscreen setting before enabling exclusive fullscreen in the video config.
Fixes a bug where "Use Fullscreen" would initialize into exclusive fullscreen regardless of the borderless fullscreen setting.

Also relieves the need for the video renderer to check the borderless fullscreen setting each time.
2014-07-30 12:15:26 +02:00
Lioncash
522a5c35ad Convert some more header inclusions into forward declarations 2014-07-29 20:55:07 -04:00
Jules Blok
ec402a0d5f FPSCounter: Initialize members. 2014-07-26 14:37:18 +02:00
Pierre Bourdon
8e865f3848 Merge pull request #506 from Armada651/d3dfullscreen
D3D: Add exclusive fullscreen support.
2014-07-26 13:22:11 +02:00
Jules Blok
6724ce6275 Cosmetic changes based on feedback on PR #506. 2014-07-26 13:04:39 +02:00
Jules Blok
bd9953d97e Remove the 3D Vision hack.
The hack was needed because the Nvidia 3D Vision heuristics are documented to only support surfaces that are the same size as the backbuffer. This would be the case if you enabled the hack and selected the "Auto (Window Size)" internal resolution.

However, on recent drivers the same effect is achieved by selecting the "Auto (Multiple)" internal resolution. Therefore the hack is no longer required.
2014-07-26 12:45:10 +02:00
Pierre Bourdon
73f9a22e2e VertexLoader: Remove global state dependency on g_nativeVertexFmt 2014-07-26 01:35:09 +02:00
Pierre Bourdon
78c3a22060 VertexLoader: take the VAT object directly for RunVertices 2014-07-24 01:51:37 +02:00
Pierre Bourdon
069801a7d1 VertexLoader: Simplify SetVAT 2014-07-24 01:25:23 +02:00
Pierre Bourdon
20369743a4 VertexLoaderUID: remove global state dependency 2014-07-24 01:12:12 +02:00
Jules Blok
009b4dd376 Exit exclusive fullscreen when the stop confirmation is shown.
Also have the renderer remember its own fullscreen state. This is done to prevent a case where we exit exclusive fullscreen through the configuration and a focus shift at the same time. In this case the renderer would fail to detect that the fullscreen state was changed.
2014-07-21 20:50:48 +02:00
Jules Blok
cd94ff1966 VideoConfig: Add "Borderless Fullscreen" option.
This option will disable exclusive fullscreen for users who prefer the old behaviour.
2014-07-20 22:02:57 +02:00
Jules Blok
77bc879384 D3D: Add exclusive fullscreen support. 2014-07-19 21:14:44 +02:00
Ryan Houdek
bc9ef95643 Support Sampler binding in the shader.
In the cases where we support the binding layout keyword, use it for more than binding UBO location.
This changes it so it is supported for samplers as well.

Instances when this is enabled is if a device supports GL_ARB_shading_language_420pack, or if it supports GLES 3.10.
2014-07-18 17:04:03 -05:00
Dolphin Bot
b9dc69105d Merge pull request #595 from Armada651/pref_log
FPSCounter: Flush the logs every second and close them when the renderer is shut down.
2014-07-18 12:59:04 +02:00
Jules Blok
eaa7460636 FPSCounter: Remove redundant destructor. 2014-07-18 12:49:40 +02:00
Jules Blok
3b978f7c27 Turn the FPSCounter namespace into a class. 2014-07-16 20:40:40 +02:00
degasus
01fd96ab31 PixelShaderGen: fix indentation 2014-07-16 17:24:43 +02:00
Tillmann Karras
4063694d20 VideoCommon: fix ifdef expression 2014-07-15 04:15:49 +02:00
shuffle2
0c6eeaff05 Merge pull request #617 from Tilka/clang_bug
VideoCommon: fix clang version check
2014-07-14 01:55:31 -07:00
Tillmann Karras
dbc30c6c76 VideoCommon: make version check easier to read 2014-07-14 03:05:56 +02:00
Tillmann Karras
0be03252cc VideoCommon: fix clang version check
That was... er... a typo!
2014-07-14 02:59:31 +02:00
shuffle2
3f67ec0d50 Merge pull request #611 from Tilka/clang_bug
VideoCommon: version-check clang for workaround
2014-07-13 17:52:54 -07:00
Tillmann Karras
b6f3ae23bc VideoCommon: version-check clang for workaround
The bug was fixed in clang 3.4.
2014-07-14 02:12:48 +02:00
Pierre Bourdon
8876ee120a Change libav* autodetection to support framedumping on Ubuntu 14.04
Add an "ugly" workaround in the AVIDump code, but looking at other project this
seems to be the most common way to handle this API change.
2014-07-13 23:06:20 +02:00
Tillmann Karras
0ccee6c87b Fix warnings unearthed by #579 2014-07-13 02:16:51 +02:00
degasus
7e79806efc remove unused globals
Also change globals into statics which are only used in one file
2014-07-11 16:10:20 +02:00
degasus
81ed17be53 avoid the extern keyword in .cpp files 2014-07-11 16:10:20 +02:00
degasus
6d3f249dcc mark all local variables as static 2014-07-11 16:10:20 +02:00
degasus
22e1aa5bb4 mark all local functions as static 2014-07-11 16:07:23 +02:00
Jules Blok
6def4ead01 FPSCounter: Flush the logs every second and close them when the renderer is shut down. 2014-07-10 23:11:28 +02:00
Jules Blok
1754cbda9d Move FPSCounter calls to RenderBase. 2014-07-10 23:11:09 +02:00
shuffle2
15c1250d9d Merge pull request #596 from delroth/master
AVIDump: fix FFV1 encoding
2014-07-09 18:02:40 -07:00
Pierre Bourdon
da697df6ee AVIDump: fix FFV1 encoding
ffmpeg 2.0 changed requirements for the FFV1 encoder and made them more strict,
requiring more fields of the input frame to be initialized. Explicitly setting
pixfmt, width and height solve the EINVAL issues with FFV1 encoding.

Original fix from http://ffmpeg.org/pipermail/libav-user/2013-October/005759.html
2014-07-10 02:53:12 +02:00
Jules Blok
09304cab57 FPSCounter: Change format string to match value. 2014-07-09 19:45:56 +02:00
Jules Blok
95b579746f Replace "Log FPS to file" by the "Log render time to file" feature. 2014-07-09 17:56:11 +02:00
Jules Blok
61d44cf73f FPSCounter: Use a Timer for the FPS update time. 2014-07-09 17:53:41 +02:00
Jules Blok
efeadb7fe9 FPSCounter: Add "Log render time to file" feature.
Allows for a more accurate performance measurement.
2014-07-09 17:53:31 +02:00
Lioncash
ec1e52de53 VideoCommon: Get rid of an snprintf call in VideoConfig.cpp 2014-07-06 15:33:08 -04:00
Dolphin Bot
cc3dda5b22 Merge pull request #362 from Tilka/ffmpeg_libav_new
AVIDump: use new ffmpeg/libav API
2014-07-06 19:33:27 +02:00
Tony Wasserka
a798548c30 Merge pull request #546 from workhorsy/header_guard_to_pragma_once
Changed lingering header include guards to pragma once.
2014-07-06 14:19:32 +02:00
Ryan Houdek
4483b64bcb Merge pull request #463 from degasus/vertex_format_cache
VideoCommon: Cache native vertex formats
2014-07-06 05:26:42 -05:00
Lioncash
48ff45b8a8 VideoCommon: Remove some unused constants from VertexShaderGen.h. 2014-07-05 23:46:07 -04:00
degasus
bb2fc8ecbb VideoCommon: Cache native vertex formats
We are used to have a 1:1 mapping of GX vertex formats and the native (OGL + D3D) ones, but there are by far more GX ones.
This new cache maps them directly so that we don't flush on GX vertex format changes as long as the native one doesn't change.

The idea is stolen from galop1n.
2014-07-04 14:39:27 +02:00
degasus
02ac5e95c8 VideoCommon: normalize lighting direction.
It seems that the lighting direction must be normalized. This fixes lots of lighting issues mostly shown in the d3d backend.
2014-07-03 21:08:19 +02:00
Lioncash
00efaedb02 FPS counter cleanup
- Isolate it into it's own namespace
- Shorten function names, the namespace self-documents.
- Just use the std I/O, we can just write directly to the stream for
  logging.
2014-07-02 20:23:09 -04:00
Matthew Brennan Jones
124210c50f Changed lingering header include guards to pragma once.
Some headers where using #ifndef to guard being including multiple times. But most were using pragma once. So for consistency I changed them all to use pragma once.
2014-07-01 22:17:33 -07:00
Tillmann Karras
6b3e6e6ffb AVIDump: rename frame variables 2014-06-27 19:48:36 +02:00
Tillmann Karras
c2c46d7573 AVIDump: update ffmpeg/libav API usage
libav 10 was released on May 10th, 2014 and it drops support for some
long-deprecated stuff like avcodec_encode_video().
2014-06-27 19:48:36 +02:00
Tillmann Karras
e3fef8c990 AVIDump: cleanup 2014-06-27 19:48:35 +02:00
degasus
7db5a4b22d Statistics: Reformat stats string 2014-06-27 09:36:50 +02:00
degasus
f1ddd3c66a VideoCommon: remove unused stats 2014-06-27 09:35:26 +02:00
Lioncash
ca5340ebde Centralize the logging code into its own folder in Common. 2014-06-25 22:11:42 -04:00
Lioncash
8b13afbb8e Remove the 32-bit config platform from the VS solution and projects 2014-06-24 22:07:26 -04:00
Pierre Bourdon
5dff577339 Merge pull request #500 from lioncash/ini
Use only section-based ini reading.
2014-06-22 17:21:45 +02:00
degasus
924ad1ee9f LightingShader: hard code const variable 2014-06-19 16:46:53 +02:00
degasus
e456a5e64f PixelShader: remove the duplicated ppl constants 2014-06-19 16:33:33 +02:00
degasus
d93f2973f7 PixelShader: use the vertex const buffer for ppl 2014-06-19 16:33:33 +02:00
degasus
027baad73b VideoCommon: use the Light struct in XF memory 2014-06-19 16:33:29 +02:00
Lioncash
ce54c1e571 Kill off replaceable usages of s[n]printf. 2014-06-18 19:53:38 -04:00
magumagu
9d87818853 VideoCommon: small cleanups. No functional change. 2014-06-16 14:03:29 -07:00
Lioncash
f05d3f6e5d Use only section-based ini reading. 2014-06-16 01:31:23 -04:00
Pierre Bourdon
020b4fde1e Merge pull request #492 from Armada651/master
Remove EmuWindow
2014-06-15 14:16:53 +02:00
Armada
f2759ffe65 Remove EmuWindow.
All it did was raise complexity.
2014-06-15 00:49:49 +02:00
Tony Wasserka
d7736ac714 Merge pull request #445 from magumagu/video-dead-code
Video backends: remove dead code.
2014-06-13 22:38:22 +02:00
Tony Wasserka
a8f32adcab Merge pull request #470 from pauldacheez/s-Gamecube-GameCube
Fix the capitalization of "GameCube" throughout the project.
2014-06-13 21:52:08 +02:00
Tony Wasserka
0bc6b49c07 Merge pull request #483 from neobrain/bitfield_fixes
BitField fixes
2014-06-13 20:43:02 +02:00
Ryan Houdek
f87b913f0e Fix the vertexloader on non-x86 targets.
When I dropped ARM from a generic target, this caused the vertexloader to try using the JIT path.
Instead of !_M_GENERIC, check for _M_X86 instead. Since it is only for the x86 target
2014-06-13 18:36:54 +00:00
Tony Wasserka
78fbf2ecaa Fix a few warnings caused by using BitField with non-typesafe functions. 2014-06-11 20:58:40 +02:00
Rachel Bryk
c38e8e25dd Remove unused video config variable. 2014-06-09 00:02:38 -04:00
Paul Olszewski
5d793881b0 Fix the capitalization of "GameCube" throughout the project. 2014-06-08 11:24:49 +09:00
Ryan Houdek
6e1d312091 Make it so ARMv7 isn't a generic target.
Rearranges a bit of code so that ARM isn't a generic build anymore. Because it obviously isn't
2014-06-07 20:26:31 -05:00
Ryan Houdek
b6db0d0ab8 Merge pull request #457 from Tilka/jcc
x64Emitter: J_CC: use 32 bit offset automatically
2014-06-06 20:53:50 -05:00
Pierre Bourdon
834bc85e1f Merge pull request #458 from Tilka/warnings
Fix some warnings
2014-06-06 00:58:37 +02:00
Tillmann Karras
0eb341e542 Fix some warnings.
The 'offset' variable needs to stay because the disabled code below uses it.
2014-06-04 01:04:52 +02:00
Tillmann Karras
f8280401f6 x64Emitter: J_CC: use 32 bit offset automatically 2014-06-03 23:08:58 +02:00
Lioncash
776e36b10a Fix a typo in a BP register name (BPMEM_TX_SETLUT_4 -> BPMEM_TX_SETTLUT_4).
Also fixed the alignment of the register values.
2014-06-02 02:26:30 -04:00
Lioncash
12db989098 Add missing registers in GetBPRegInfo 2014-06-02 02:19:53 -04:00
magumagu
0aecd9504e Video backends: remove dead code. 2014-06-01 01:56:09 -07:00
Lioncash
49b0eef393 Remove the min/max functions in CommonFuncs.
The algorithm header has the same functions.
2014-05-29 21:44:41 -04:00
Pierre Bourdon
3097345929 Merge pull request #411 from lioncash/fifo-cleanup
Make GetBPRegInfo just take two strings as parameters
2014-05-30 01:51:11 +02:00
Lioncash
c96407bd2a Make GetBPRegInfo just take two strings as parameters
Gets rid of the size parameters.
2014-05-29 19:44:14 -04:00
Lioncash
1583ce9363 Use strings instead of arbitrary buffers for video statistics 2014-05-25 21:11:29 -04:00
shuffle2
b58753bd69 Merge pull request #370 from Sonicadvance1/remove_specialized_memcmp
Removes ZeroFrog's "optimized" memcpy and memcmp functions.
2014-05-22 13:02:11 -07:00
Jasper St. Pierre
9d161b4170 BPStructs: Consistently put the two shared copy args first
And rename them so they make a bit more sense.
2014-05-20 11:28:15 -04:00
Jasper St. Pierre
1ae8edc1d0 BPStructs: Remove another function wrapper 2014-05-20 11:28:15 -04:00
Jasper St. Pierre
b1d3c5937a BPStructs: Move LoadBPReg here 2014-05-20 11:28:14 -04:00
Jasper St. Pierre
763ad77a1c BPStructs: Flatten out BPWritten 2014-05-20 11:28:14 -04:00
Jasper St. Pierre
07ab77d31c BPStructs: Reindent BPWritten 2014-05-20 11:28:08 -04:00
Jasper St. Pierre
c33a1b4b28 BPStructs: Document BPMEM_BP_MASK better 2014-05-20 11:26:31 -04:00
Jasper St. Pierre
2f122ea63c BPMemory: Fix "DISPLAYCOPYFILER" typo 2014-05-20 11:15:10 -04:00
Jasper St. Pierre
4e8e51b278 BPStructs: Remove calls to SetInterlacedMode when reloading state
SetInterlacedMode is a dummy no-op that does nothing.
2014-05-20 11:15:10 -04:00
Jasper St. Pierre
833b7ee584 BPFunctions: Remove the rest of GetConfig 2014-05-20 11:15:09 -04:00
Jasper St. Pierre
08611c3f36 PixelShaderManager: Fizzle out fog changes when disabled here
This lets us remove a use of GetConfig.
2014-05-20 11:15:09 -04:00
Jasper St. Pierre
fe645b888b BPFunctions: Remove use of a dumb method
GetPointer serves no purpose.
2014-05-20 11:15:08 -04:00
Jasper St. Pierre
56228cea5d BPFunctions: Remove an unused method 2014-05-20 11:15:08 -04:00
Jasper St. Pierre
4f4e3fad85 BPMemory: Clean up and rename some variables and comments
This is about the register number, not the opcode.
2014-05-20 11:15:08 -04:00
Jasper St. Pierre
e81b62aad1 BPFunctions: Clean up math slightly
No need for magic 342 numbers.
2014-05-20 11:14:00 -04:00
Tony Wasserka
6950f533ae Merge pull request #355 from magumagu/gx-missing-opcode
Opcode decoding: handle missing opcodes 0x88 etc.
2014-05-18 11:12:06 +02:00
Ryan Houdek
a4bb0dafb4 Removes ZeroFrog's "optimized" memcpy and memcmp functions.
These were only compiled in on Windows and x86_32.
They provided "optimized" copies and compares based on blocksizes for the AMD Athlon and Duron CPU families.
The code was taken from something that AMD provides with a as-is license.
Just get rid of this crap.
2014-05-17 18:03:31 -05:00
Tony Wasserka
fc34d5a130 Merge pull request #360 from magumagu/lighting-rounding
Video backends: fix rounding in lighting computation.
2014-05-17 21:06:31 +02:00
magumagu
9b82d72070 Video backends: warn on usage of GL_DRAW_QUADS_2.
It's not normally used, so if it shows up, it could indicate a CPU emulation
bug.
2014-05-17 11:55:32 -07:00
Tony Wasserka
0fac17da33 Merge pull request #269 from magumagu/swbackend-xfregisters
SW backend: use VideoCommon XFRegisters struct.
2014-05-17 10:40:57 +02:00
magumagu
6fbf6fad3b VideoCommon: cleanup Renderer::RecordVideoMemory. 2014-05-16 18:58:08 -07:00
magumagu
1357277f40 Video backends: mass-replace "xfregs" with "xfmem". 2014-05-16 18:58:07 -07:00
magumagu
8f5342c442 Video backend: merge global var xfmem into xfregs.
There isn't really any reason to keep them separate.
2014-05-16 18:55:31 -07:00
magumagu
818c89313e Video backends: unify xfregs/xfmem structures.
Removes the duplicate swxfregs global variable/struct from the software
backend in favor of the ones from VideoCommon.
2014-05-16 18:55:30 -07:00
magumagu
8b82cea704 Video backends: fix behavior of "konst" TEV inputs.
Also fixes TEVCOLORARG_HALF.

Values verified to match hardwarere.
2014-05-16 12:19:35 -07:00
Tony Wasserka
fee6efc4dc Merge pull request #375 from degasus/remove_SkipVertices
VertexLoaderManager: Remove unused function.
2014-05-16 16:20:29 +02:00
Tony Wasserka
25e8dc0aed Merge pull request #354 from magumagu/gx-primitive-mask
Opcode decoding: 0xC0 isn't a valid command.
2014-05-16 15:59:59 +02:00
degasus
7bb44199fd remove unused and unexported function 2014-05-16 14:33:00 +02:00
magumagu
9e4eeb3b9b Video backends: fix rounding in lighting computation.
For whatever reason, the hardware doesn't do a full divide by 255, but
instead uses an approximation with shifting, similar to the way it is done
in TEV.
2014-05-11 12:53:02 -07:00
Ryan Houdek
15ce648b0d Merge pull request #341 from lioncash/pragma
Move the header guard before the includes in VideoCommon's Statistics.h
2014-05-10 23:21:53 -05:00
magumagu
39d439fc48 Opcode decoding: handle missing opcodes 0x88 etc.
Hardware testing shows that they do the same thing as the 0x80 family of
opcodes: they draw quads.
2014-05-10 20:33:28 -07:00
magumagu
369c0c4ce2 Opcode decoding: 0xC0 isn't a valid command.
Fix our opcode decoders to handle this appropriately.
2014-05-08 15:49:19 -07:00
Tony Wasserka
b4e1ac5f08 Merge pull request #185 from degasus/shader-cleanup
Shader cleanup
2014-05-06 11:37:11 +02:00
magumagu
716b3fefd4 VideoCommon: recreate XFB texture when the XFB size changes.
We need to do this to correctly deal with games which dynamically change the
XFB width and height.
2014-05-05 11:01:14 -07:00
Ryan Houdek
2f92b82b29 Merge pull request #345 from Sonicadvance1/Qualcomm-textureSize
Enables usage of GLSL textureSize on Qualcomm v66.
2014-05-05 11:41:40 -05:00
degasus
813e30ec2a ShaderGen: make uv readonly 2014-05-05 17:06:38 +02:00
degasus
6109958e68 ShaderGen: OGL: don't make a copy of "Normal" 2014-05-05 17:06:37 +02:00
degasus
0e0da8c8fd ShaderGen: make clipPos readonly 2014-05-05 17:06:37 +02:00
degasus
c80717ac2e PixelShaderGen: extract iround 2014-05-05 17:06:37 +02:00
degasus
2bc2b73e03 PixelShaderGen: drop fmod as it isn't used any more 2014-05-05 17:06:37 +02:00
degasus
c82991df5b ShaderGen: inline constant shaders 2014-05-05 17:06:37 +02:00
degasus
b0878c54b2 ShaderGen: use cbuffers for D3D 2014-05-05 17:06:37 +02:00
degasus
fe9fcfdd07 ShaderGen: merge early-z blocks of ogl+d3d 2014-05-05 17:06:37 +02:00
degasus
3e14bf511f ShaderGen/D3D: inline centroid 2014-05-05 17:06:36 +02:00
Ryan Houdek
8bb8446e34 Enables usage of GLSL textureSize on Qualcomm v66.
Qualcomm's v66 drivers have a working textureSize() function now.
Enable usage of it.
2014-05-05 08:50:13 -05:00
magumagu
2e464800bc VideoCommon: correctly compute whether an indirect texture stage is active.
This is consistent with the implementation in PixelShaderGen.
2014-05-04 22:44:10 -07:00
magumagu
52c42a2946 VideoCommon: fix indirect texture coordinate computation in TEV.
Even if an indirect texture stage doesn't actually sample a texture, we
still need to emit the relevant math.

Fixes Issue 7092.
2014-05-04 22:12:57 -07:00
Lioncash
f4d80bd8a5 Move the #pragma once header guard before the includes in Statistics.h in VideoCommon. 2014-05-04 00:24:21 -04:00
Tony Wasserka
557c3db462 Merge pull request #81 from degasus/skip_framelimit_hotkey
Add a hotkey for disabling the framelimit.
2014-05-01 12:40:01 +02:00
Ryan Houdek
2d8cfb89d7 Changes posmtx vertex attribute to integer.
This makes it so we don't need to do some dumb casting from float to integer in our shaders.
Only tested in OpenGL, needs to be tested in D3D.
2014-04-30 19:11:06 -05:00
degasus
30586f4d29 Add set/get functions for IsFramelimiterTempDisabled 2014-04-30 12:51:13 +02:00
degasus
8483811b39 Add a hotkey for disabling the framelimit.
Atm this is hardcoded to '\t'.
2014-04-30 12:50:53 +02:00
Pierre Bourdon
25f5598e31 Merge pull request #306 from neobrain/pixel_center_correction
VertexShaderGen: Correct vertex shader output to consider shifted pixel centers.
2014-04-25 09:32:36 +02:00
Tony Wasserka
ca2a79d0bd Workaround dumb custom texture loading logic so that D3D11, GL core (used on OS X) and GLES code paths have less broken custom textures. 2014-04-24 00:33:48 +02:00
Tony Wasserka
c47c32d4a8 VertexShaderGen: Correct vertex shader output to consider shifted pixel centers.
Fixes issue 267.
2014-04-24 00:21:17 +02:00
Ryan Houdek
fd37a768a6 Fix texture conversion shaders for GLSL ES.
Noticed this while messing with EFB to RAM.
We were having an implicit conversion from integer to float, GLSL ES doesn't allow implicit conversion.
Changes it to a explicit conversion to float.
2014-04-22 15:48:26 -05:00
Tony Wasserka
762572a08c BPMemory: Fix GenMode using an incorrect number of bits for the number of color chans. 2014-04-21 22:47:08 +02:00
Tony Wasserka
16d3dbc5ea BPMemory: Use BitField for the GenMode fields. 2014-04-21 22:34:23 +02:00
Ryan Houdek
92ec49ac9f Change to ARM's naming convention in DriverDetails.
This matches how ARM handles their naming in their drivers for different models.
Really it's that way because both Mali-T6xx and Mali-T7xx fall under Midgard.
While everything else (except Mali-55) fall under Utgard.
2014-04-18 21:06:32 -05:00
magumagu
b3a67821e4 VideoCommon: fix rounding in TEV.
The hardware backends pass the TEV tests in gxtest with this change.
2014-04-15 16:47:01 -07:00
Tony Wasserka
068f26d2aa PixelShaderGen: Fix an issue with color combiner compare mode and simplify the affected line a bit.
This was a mistake of mine when translating floating point values to integer values.
Also, the max() part of that line was just completely redundant because the sign of an absolute value is always greater than or equal to zero.

Fixes issue 7178.
2014-04-15 23:41:07 +02:00
Tony Wasserka
4f3227b4a9 Merge pull request #261 from magumagu/pixelshadergen-extra-paren
PixelShaderGen: delete extra parenthesis
2014-04-14 09:48:02 +02:00
magumagu
a2150ef1f8 PixelShaderGen: delete extra parenthesis.
Without this patch, we can generate a pixel shader which doesn't compile
in some cases.
2014-04-14 00:41:27 -07:00
Ryan Houdek
a9fa49f34d Support checking for the Mali-T7xx line of GPUs.
They are similar enough that they will share bugs with their drivers, so make them fall under the same Mali-Txxx umbrella of bug issues.
If there is ever a need in the future for having separate bugs depending on family, we can support that then.
2014-04-11 23:46:44 -05:00
magumagu
fd9c1fa746 VideoBackend: remove unused config vars.
No point to keeping around variables which are always "true".
2014-04-11 14:53:12 -07:00
Tony Wasserka
306b9afd1e Merge pull request #224 from magumagu/swrender-deletepixelfork
Software backend: Delete forked PixelEngine.
2014-04-11 20:01:23 +02:00
Tony Wasserka
cdf6172348 Merge pull request #213 from Jezze/vertexloader-cleanups
Vertexloader cleanups
2014-04-10 08:52:36 +02:00
Ryan Houdek
87d106d65c Remove dumb CodeBlock duplication in the emitters.
Fixes issue 6990.
This uses a bit of templating to remove the duplicate code that is the CodeBlocks in each emitter headers.
No actual functionality change in this.
2014-04-09 13:53:43 -05:00
Ryan Houdek
3251d78f89 Add initial support for GLSL ES 3.10.
GLSL ES 3.10 adds implicit support for the binding layout qualifier that we use.
Changes our GLSL version enums to bit values so we can check for both ES versions easily.
2014-04-03 00:46:09 -05:00
Pierre Bourdon
9b03178673 Merge pull request #222 from comex/more-clang-fixes
More clang fixes
2014-03-30 13:24:08 +02:00
comex
b5654a2464 Don't cast -1 to enum to represent a missing value.
This is undefined behavior in C++, and a clang warning suggests it is
actually producing bad code as a result:

../Source/Core/VideoCommon/BPFunctions.cpp:164:45: warning: comparison of constant 4294967295 with expression of type 'PEControl::PixelFormat' is always false [-Wtautological-constant-out-of-range-compare]
        if (new_format == old_format || old_format == (unsigned int)-1)
2014-03-30 01:40:06 -04:00
magumagu
0661efea84 Software backend: Delete forked PixelEngine.
Mostly just zapping a bunch of duplicated code; the only interesting thing
going on here is the changes to the performance counter implementation.
2014-03-29 12:07:20 -07:00
Pierre Bourdon
664c8d30a0 Remove all trailing whitespaces from our codebase. 2014-03-29 11:05:44 +01:00
Jens Nyberg
73176d0333 VideoCommon/VertexLoader: Add more use of std::min and std::max 2014-03-27 00:33:41 +01:00
Jens Nyberg
478a27e052 VideoCommon/VertexLoader: Remove duplicate point min and max calculation 2014-03-27 00:24:48 +01:00
Jens Nyberg
0c62ae9c1a VideoCommon/VertexLoader: Remove NRM enum 2014-03-26 23:56:57 +01:00
Pierre Bourdon
ea6b37cb75 Merge pull request #193 from neobrain/tev_combiner_fixes
PixelShaderGen: Cleanups and fixes for tev combiners.
2014-03-26 10:05:46 +01:00
Tony Wasserka
c6070b94ce BPMemory: Fix an enum to use u32 as its underlying type. 2014-03-26 10:02:57 +01:00
Tony Wasserka
eb0f547a17 PixelShaderGen: Cleanups. 2014-03-26 00:23:36 +01:00
Tony Wasserka
4f82d6f7af PixelShaderGen: Implement tev combiner lerping in a faster way which also reproduces hardware behavior perfectly.
The new behavior has been verified to be correct by hardware tests. This is an improvement over the old code, which was just a guess.
2014-03-26 00:17:04 +01:00
Tony Wasserka
fdad95c055 PixelShaderGen: Cleanups and fixes for tev combiners.
Fixes issue 4674.
2014-03-26 00:17:03 +01:00
Tony Wasserka
16105db709 BPMemory: Make use of BitField in a number of structures. 2014-03-25 23:57:58 +01:00
Tony Wasserka
8941f19cdb BPMemory: Expose the pixel_format and zformat fields in PE_CONTROL as enumerations. 2014-03-25 23:57:58 +01:00
Tony Wasserka
77a7bab5ae BPMemory: Use the new BitField class in two selected structures. 2014-03-25 23:57:57 +01:00
Jens Nyberg
4a68550d01 Remove superfluous bit shift 2014-03-18 04:07:45 +01:00
Ryan Houdek
484fb46390 Clang 3.4 exposes some warnings on Android.
Fixes all warnings on Android build except for what is in externals.
Removes a function from TextureDecoder_Generic since it is unused and generates a warning.
2014-03-17 18:17:12 -05:00
Matthew Parlane
6445e02d53 Merge pull request #159 from Tilka/misc
Cleanup stuff
2014-03-17 17:43:20 +13:00
Tillmann Karras
2fcaca0603 More range-based loops and overrides 2014-03-17 02:55:55 +01:00
Lioncash
a9adaa5601 Prevent VideoConfig inheritance. 2014-03-16 17:00:29 -04:00
Linktothepast
82f772fdcc Remove the extra parameters field from the PH.
Metroid: Other M was the only game which required this field, but the
issue in that game can be fixed properly by enabling format change
emulation. Hence, there's no point in having this around anymore.
Fixes issue 6644.
2014-03-15 15:04:39 +02:00
Pierre Bourdon
8d679e76d2 Merge pull request #164 from lioncash/cstr-cull
Kill off some usages of c_str.
2014-03-15 00:57:56 +01:00
Tony Wasserka
0f81cbd6be PixelShaderGen: More code alignment fixes. 2014-03-14 22:33:26 +01:00
Tony Wasserka
c1016205d3 Pixel/LightingShaderGen: Fix code alignment issues.
Most of these weren't even introduced by me, but hey - I'm nice and love wasting my time :p
2014-03-14 22:33:26 +01:00
Tony Wasserka
2067f88e0f PixelShaderGen: Don't make local lookup tables "static". 2014-03-14 22:33:26 +01:00
Tony Wasserka
0ce92e0162 PixelShaderGen: Remove the "i" prefix for integer variables.
The prefix was just required in the development stage to reduce the risk of regressions.
2014-03-14 22:33:26 +01:00
Tony Wasserka
bdd629c598 PixelShaderGen: Use spaces for alignment where appropriate. 2014-03-14 22:33:26 +01:00
Tony Wasserka
6e65e02c9e ConstantManager: Do not use single-element arrays. 2014-03-14 22:33:25 +01:00
Tony Wasserka
6c2971eaf6 PixelShaderGen: Write 16777215 in hex (0xFFFFFF) so that it's easier to understand. 2014-03-14 22:33:25 +01:00
Tony Wasserka
8ebb65ebf2 PixelShaderGen: Prettify generated shader source. 2014-03-14 22:33:24 +01:00
Tony Wasserka
e2e1c5c905 PixelShaderGen: Add a note about a random idea which should be checked with hardware tests. 2014-03-14 22:33:12 +01:00
Tony Wasserka
6fcbda6752 PixelShaderGen: Cleanup and clarify bump alpha combiner inputs. 2014-03-14 22:33:12 +01:00
Tony Wasserka
9a96a1d525 PixelShaderGen: Remove old, mostly useless comments.
A few vague lines of comments cannot replace an afternoon reading of how TEV works.
2014-03-14 22:33:12 +01:00
Tony Wasserka
8b8bb04fd3 PixelShaderGen: Use bit shifts instead of multiplications as a small optimization. 2014-03-14 22:33:12 +01:00
Tony Wasserka
036a8c6951 PixelShaderGen: Clean up tev compare functionality. 2014-03-14 22:33:10 +01:00
Tony Wasserka
fa7173d099 PixelShaderGen: Store tex scale as an integer. 2014-03-14 22:32:30 +01:00
Tony Wasserka
16109fb453 PixelShaderGen: Treat UV coordinates as actual integers. 2014-03-14 22:32:29 +01:00
Tony Wasserka
50526ae50a PixelShaderGen: Remove some dead code. 2014-03-14 22:32:18 +01:00
Tony Wasserka
065919f599 PixelShaderGen: Perform some of the fog calculations with integers. 2014-03-14 22:31:32 +01:00
Tony Wasserka
605b687af8 PixelShaderGen: Use integer math for z textures. 2014-03-14 22:31:31 +01:00
Tony Wasserka
3a6389992e PixelShaderGen: Treat UV coordinates like S17.7 integers (they're still stored as float, though). 2014-03-14 22:31:30 +01:00
Tony Wasserka
3e6efdb53e LightingShaderGen: Perform more lighting calculations with integers. 2014-03-14 22:31:19 +01:00
Tony Wasserka
387b9bf3c2 LightingShaderGen: Perform some lighting calculations with integers. 2014-03-14 22:31:19 +01:00
Tony Wasserka
78623871f9 ShaderGen: Store material uniforms as integers. 2014-03-14 22:31:19 +01:00
Tony Wasserka
4bf57565e8 ShaderGen: Store light color uniforms as integers. 2014-03-14 22:31:18 +01:00
Tony Wasserka
68e91f0d55 PixelShader: Store fog color as an integer. 2014-03-14 22:31:18 +01:00
Tony Wasserka
0238a56816 PixelShaderGen: Change indirect texture matrix uniforms to use integers. 2014-03-14 22:31:18 +01:00
Tony Wasserka
c13a5c38e9 PixelShaderGen: Change the "alpha" uniform to use integers. 2014-03-14 22:31:18 +01:00
Tony Wasserka
ec60acac3a PixelShaderGen: Change the "colors" and "kcolors" uniforms to be integers. 2014-03-14 22:31:18 +01:00
Tony Wasserka
df94e62350 PixelShaderGen: Process fog calculations with integer math. 2014-03-14 22:31:18 +01:00
Tony Wasserka
21eb482a6e PixelShaderGen: Write constants in decimal instead of hexadecimal where appropriate. 2014-03-14 22:31:11 +01:00
Tony Wasserka
cff952c397 PixelShaderGen: Use integer math for indirect tev stage texcoord calculation. 2014-03-14 22:30:27 +01:00
Tony Wasserka
e7a42d884f PixelShaderGen: prev should be initialized to the proper value; tev output needs to be clamped between -1024 and 1023. 2014-03-14 22:30:16 +01:00
Tony Wasserka
cb1514e082 PixelShaderGen: Remove superfluous registerstate stuff. Also, made alphabump an integer. 2014-03-14 22:30:15 +01:00
Tony Wasserka
a11ae69cb0 PixelShaderGen: Use integer math for TEV combiners. 2014-03-14 22:28:32 +01:00
Tony Wasserka
aaa8e74a68 PixelShaderGen: Use integer math for tev outputs. 2014-03-14 22:28:14 +01:00
Tony Wasserka
654442feb7 PixelShaderGen: Use integer math for tev konst value. 2014-03-14 22:28:12 +01:00
Tony Wasserka
e69ee6ae0a PixelShaderGen: Remove remaining floating point bits for texture color. 2014-03-14 22:26:50 +01:00
Tony Wasserka
ac1c77c392 PixelShaderGen: Use integer math for rasterizer color. 2014-03-14 22:26:50 +01:00
Tony Wasserka
3ea97f7730 PixelShaderGen: Use integer math for indirect texture coords. 2014-03-14 22:26:50 +01:00
Tony Wasserka
0e711bf520 PixelShaderGen: Use integer math for sampling textures. 2014-03-14 22:26:50 +01:00
Tony Wasserka
1b3b12caa0 PixelShaderGen: Fix an issue where small negative z coordinates would underflow when they shouldn't. 2014-03-14 22:26:50 +01:00
Tony Wasserka
fa77e1d2b6 PixelShaderGen: Use integer math for alpha testing. 2014-03-14 22:26:48 +01:00
Ryan Houdek
22c989de9a Provide our own dot functions in GLSL since GLSL doesn't provide integer versions of this function, even though AMD and Nvidia provide their own. 2014-03-14 22:26:27 +01:00
Tony Wasserka
bed442198f PixelShaderGen: Make SampleTexture static inline. 2014-03-14 22:26:26 +01:00
Lioncash
a82675b7d5 Kill off some usages of c_str.
Also changes some function params, but this is ok.
Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
2014-03-14 13:51:23 -04:00
Matthew Parlane
31cfc73a09 Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
2014-03-11 00:35:07 +13:00
Tillmann Karras
d802d39281 clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-03-09 21:14:26 +01:00
Tillmann Karras
f28116b7da clang-modernize -add-override 2014-03-09 21:12:01 +01:00
Tillmann Karras
c89f04a7c5 clang-modernize -loop-convert
and some manual adjustments
2014-03-09 21:11:59 +01:00
Matthew Parlane
25341f88ef Fixes include order of TextureConversionShader.cpp 2014-03-09 12:38:29 +13:00
Ryan Houdek
4f02132f93 Make our architecture defines less stupid.
Our defines were never clear between what meant 64bit or x86_64
This makes a clear cut between bitness and architecture.
This commit also has the side effect of bringing up aarch64 compiling support.
2014-03-04 09:36:59 -06:00
Tillmann Karras
315a8ba1c0 Various changes suggested by cppcheck
- remove unused variables
- reduce the scope where it makes sense
- correct limits (did you know that strcat()'s last parameter does not
  include the \0 that is always added?)
- set some free()'d pointers to NULL
2014-02-28 12:43:20 +01:00
Tillmann Karras
6914eca167 Fix various warnings reported by clang
- mostly remove unused variables
- rename some generic JIT identifiers
2014-02-28 12:28:19 +01:00
degasus
f628695d31 comment fixes 2014-02-26 12:48:52 +01:00
degasus
aaaa5af0b2 remove (ATTR|VARY)(IN|OUT) macros 2014-02-26 11:37:29 +01:00
degasus
1d0b6a1156 Merge duplicate parts of sampler into header 2014-02-26 11:37:29 +01:00
degasus
11efa88157 calculate constant values on shader compilation 2014-02-26 11:37:29 +01:00
degasus
8a4aa8c1f5 Rewrite texture tiling implementation
inline halfxb

So we know which is the first pixel by masking.

inline xl

inline xb a bit

inline yl

inline uv1.x shift

remove likely wrong guessed ternary operator

add pixel layout comment

inline xel

optimize the shifts a bit

inline xb

optimize shifts in a second step

extract xb

rename all variables

calculate cache line by position.x

Revert 5115b459f40d53044cd7a858f52e6e876e1211b4 "optimize the shifts a bit"

It seems I was wrong, the other way is the more natural.

use x_virtual_position instead of uv1.x for x_offset_in_block

This looks more natural and the offset should be masked anyway.

substitude factor with cache_lines

move 32bit logic in a conditional block
2014-02-26 11:37:29 +01:00
degasus
bd3beeb184 TextureConverter: Use Log2() and shifts instead of multiplications/divisions 2014-02-26 11:37:29 +01:00
degasus
f99c8a0b70 merge common parts of encoding shaders 2014-02-26 11:37:28 +01:00
Pierre Bourdon
4ba9cb217f Fix a compilation error introduced in PR #91.
For some reason it passed builbot-try but didn't build after being merged to
msater. Did not expect that, sorry :(
2014-02-23 03:45:46 +01:00
Pierre Bourdon
83b7bb64aa Make Common/ mostly IWYU clean (and fix errors in rest of the project detected by this change). 2014-02-22 23:37:29 +01:00
Pierre Bourdon
ffe588cc24 Fix more header sorting issues in VideoCommon/ (now check-includes clean). 2014-02-20 01:01:10 +01:00
Pierre Bourdon
362dec9c7c Dolphin now builds on Linux with only Source/Core as include dir 2014-02-18 12:18:47 +01:00
Lioncash
2afe215271 Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
Lioncash
3fd87a7636 Second and final pass of clearing out tabs. 2014-02-17 02:19:41 -05:00
Ryan Houdek
6b5f6ddaa1 Merge pull request #82 from lioncash/vertical-alignment
Fix some vertical alignments
2014-02-16 19:12:42 -06:00
Lioncash
6c4ee1753a Fix some vertical alignments
ie. uses spaces for alignment.
2014-02-16 20:12:05 -05:00
Tony Wasserka
de5bfd0bce Merge pull request #37 from degasus/VideoCommonApiFixes
VideoCommon API cleanups
2014-02-16 22:08:28 +01:00
Pierre Bourdon
92f8d93e96 Remove the old MMIO access "interface". 2014-02-16 19:22:40 +01:00
Pierre Bourdon
5b5dfb384e MMIO: Port the VideoCommon PE MMIOs to the new interface. 2014-02-16 19:22:40 +01:00
Pierre Bourdon
4129b30494 MMIO: Port the VideoCommon CP MMIOs to the new interface (and provide framework for other video related mappings). 2014-02-16 19:22:40 +01:00
degasus
647aad0a19 inline SetViewport into VertexShaderManager 2014-02-15 21:09:42 +01:00
degasus
d5f1f0d4a9 merge some common parts of Swap() into VideoCommon 2014-02-15 11:33:43 +01:00
degasus
3551259c7a use EFBRectangle for scissor rect
This one is backend independed. The backend should recalc such things on their own.
2014-02-15 11:33:43 +01:00
degasus
1f4219b5b4 move perfquery enable checks into videocommon (caller side) 2014-02-15 11:33:43 +01:00
degasus
5a660c27bc rename UpdateViewport to SetViewport like all others setters in RenderBase.h 2014-02-15 11:33:43 +01:00
degasus
e5318d2624 move shared parts from VertexManager::vFlush into VideoCommon 2014-02-15 11:33:43 +01:00
Tillmann Karras
404624bf0b Turn loops into range-based form
and some things suggested by cppcheck and compiler warnings.
2014-02-13 09:05:50 +01:00
lioncash
d2038049f5 Replace all include guard ifdefs with "#pragma once" 2014-02-10 18:07:16 -05:00
Matthew Parlane
32bfcc034f Some tidy up of sprintf to StringFromFormat
Includes a small fix to SetupWiiMemory
2014-02-10 17:25:18 +13:00
Lioncash
ebb48d019e Clean up some struct indentations
Also cleaned up the indentations of some variable declarations.
2014-02-09 19:40:11 -05:00
Lioncash
40182a48a5 Cleanup enum indentations. 2014-02-09 16:16:10 -05:00
Pierre Bourdon
e59f770ccb Revert "Merge pull request #49 from Parlane/sprintf_tidy"
Change broke the build on Debian stable.

This reverts commit 28755439b3, reversing
changes made to 64e01ec763.
2014-02-09 16:14:13 +01:00
Matthew Parlane
ebff7974c3 Some tidy up of sprintf to StringFromFormat 2014-02-08 14:32:48 +13:00
Pierre Bourdon
59e2179172 Merge pull request #35 from lioncash/videocommons-kill-xchg-in-statistics
[VideoCommon] Eliminate the function Xchg in Statistics.cpp. std::swap does the same thing.
2014-02-04 16:40:25 -08:00
Lioncash
6d9cd07bb9 [VideoCommon] Eliminate the function Xchg in Statistics.cpp. std::swap does the same thing. 2014-02-04 19:35:27 -05:00
Tony Wasserka
af24ed782d Merge pull request #14 from degasus/uboWorkaroundRemove
OGL: Remove non-UBO code path.
2014-02-04 14:05:55 -08:00
Tillmann Karras
8ef57064b2 Silence warning 2014-02-04 01:30:39 +01:00
Lioncash
e96f464eb5 [VideoCommon] Remove references to now non-existant files OpenCL.h and OpenCL/OCLTextureDecoder.h in the Visual Studio vcxproj file. 2014-02-01 21:52:06 -05:00
degasus
6089e4470a OGL: remove ubo workaround
This was only keeped for some broken mesa versions. Meanwhile most used versions should be fixed for almost a year.
2014-02-01 22:33:45 +01:00
degasus
31c3bee5bc VertexShaderGen: fix D3D posmtx attribute regression by VertexLoaderCleanup branch
Sorry, I'm too dumb too test my code. I hope this will work fine now.
2014-02-01 11:35:46 +01:00
Tony Wasserka
3dd31fe22b Merge pull request #11 from degasus/VertexLoaderCleanup
Vertex loader cleanup.
2014-01-31 06:13:26 -08:00
degasus
3437c7f060 VideoCommon: small VertexLoader(Manager)? refactoring 2014-01-31 07:31:03 +01:00
degasus
010a0d481a VideoCommon: remove Cache Displaylist
This option was known to break every second game and only boost a bit.
It also seems to be broken because of streaming into pinned memory and buffer storage buffers.

v2: also remove dlc_desc
2014-01-31 07:30:55 +01:00
degasus
a65162f1cd PortableVertexFormat: use AttributeFormat for posmtx attribute format 2014-01-31 07:19:34 +01:00
degasus
6c59b691b0 PortableVertexFormat: use AttributeFormat for texcoord attribute format 2014-01-31 07:19:34 +01:00
degasus
ef2d6e7d53 PortableVertexFormat: use AttributeFormat for color attribute format 2014-01-31 07:19:34 +01:00
degasus
b38ef39ab7 PortableVertexFormat: use AttributeFormat for normal attribute format 2014-01-31 07:19:34 +01:00
degasus
210f4f3e55 PortableVertexFormat: add a struct which hold all needed information for every vertex and use this for position
atm, position attribute is hardcoded both in VertexLoader and in backends.

v2: fix coding style + cleanup lookup table
2014-01-31 07:19:25 +01:00
degasus
02d1d8e6a0 NativeVertexFormat: swap unsigned / signed formats to match GX order 2014-01-30 11:12:10 +01:00
Ryan Houdek
99b6c82ac3 [Android] Fix Adreno v53 development drivers rotating framebuffer
Older Qualcomm drivers rotated the framebuffer 90 degrees and this fix didn't work.
Now for some obscene reason it rotates a full 180 degrees.
This can at least be worked around by flipping around the image on our end.
2014-01-29 16:39:45 -06:00
Lioncash
0f555d3a47 Remove two references to DX9 in VideoCommon.
DX9 isn't a backend anymore, so may as well get rid of them
2014-01-29 14:39:13 -05:00
degasus
b1290a8630 OGL: remove version check for buffer_storage on windows
On Windows, nvidia don't give us their driver version, so we can't workaround any issues.
As buffer_storage is broken on some drivers, we wanted to disble it for them.
So we can't.

Luckyly only "some" released driver versions are affected as this extension is only available since some months. Let's hope that nobody have to use one of this driver version, else they will get a black screen ...
2014-01-28 15:15:26 +01:00
crudelios
9b6c6fa9e4 BBox: Changed the rounding again, the old one fixed Paper Mario but had bugs in Mickey's Magical Mirror. This change fixes the glitches in both games.
Also fixed some compiler warnings.
2014-01-26 13:21:22 +00:00
degasus
d3fd0eddbb OSX: don't avoid unsync mapping on nvida gpus just because the windows driver doesn't like it
OSX has their own driver, so performance issues aren't shared with the nvidia driver (unlike the closed source linux and windows nvidia driver). So now they'll also use the MapAndSync backend like all other osx drivers.

fixes issue 6596

I've also cleaned up the if/else block selecting the best backend a bit.
2014-01-26 11:00:29 +01:00
crudelios
23b8465621 BBox: fix for a small rounding issue.
The new chapter title in Paper Mario TTYD had a small graphical bug due to the new code because it read one extra pixel, this fixes it.

I hope this gets everything, I though I had checked most bugs and yet here I am, commit-spamming...
2014-01-25 19:13:32 +00:00
crudelios
5f14f0e3ce BBox: read from the proper world matrix index when transforming vertexes to screen coordinates.
Fixes some remaining bbox related bugs in Mickey's Magical Mirror and a slight graphical glitch in Paper Mario: TTYD when flipping and Vivian as your companion (I've been scratching my head for days to find this one).
2014-01-25 18:04:15 +00:00
crudelios
cdfe58f7ed Rewrote bounding box algotithm. Fixes issues 5967, 6154, 6196, 6211.
Instead of being vertex-based, it is now primitive (point, line or dissected triangle) based, with proper clipping.
Also, screen position is now calculated based on viewport values, instead of "guesstimating".

This fixes many graphical glitches in Paper Mario: TTYD and Super Paper Mario.

Also, the new code allows Mickey's Magical Mirror and Disney's Hide & Sneak to work (mostly) bug-free. I changed their inis to use bbox.

These changes have a slight cost in performance when bbox is being used (rare), mostly due to the new clipping algorithm.

Please check for any regressions or crashes.
2014-01-25 15:36:23 +00:00
degasus
1898524c96 VideoCommon: fix "Buffer not large enough for all vertices!" 2014-01-24 00:10:21 +01:00
degasus
1ff681a412 D3D: move streaming buffer fallback into D3D backend
Neith OGL nor VideoCommon doen't use it, so there is no need to have it in VideoCommon.
2014-01-23 15:27:18 +01:00
degasus
62f1905978 VideoCommon: don't save streaming fifos into savestate 2014-01-23 15:12:31 +01:00
degasus
52feed04db VideoCommon: allow backends to set the buffer pointer as they want to 2014-01-23 15:12:31 +01:00
degasus
3cb5bb3b30 VertexLoader: temp class for reader/writer 2014-01-21 23:44:51 +01:00
degasus
0b97b33ceb VertexLoader: inline destionation buffer 2014-01-21 19:23:07 +01:00
degasus
c613868f57 VertexLoader: load scale factor as const, this will save some assembler instructions 2014-01-21 18:54:16 +01:00
degasus
f90fe90320 fix windows debug comile
This is broken because of revision ebbf1d392b
2014-01-21 14:23:50 +01:00
degasus
ebbf1d392b VideoCommon: merge trivial parts of VertexManager::Flush 2014-01-21 10:47:00 +01:00
Ryan Houdek
839df31347 Merge of GL-AutoChoose.
This branch is the final step of fully supporting both OpenGL and OpenGL ES in the same binary.
This of course only applies to EGL and won't work for GLX/AGL/WGL since they don't really support GL ES.
The changes here actually aren't too terrible, basically change every #ifdef USE_GLES to a runtime check.

This adds a DetectMode() function to the EGL context backend.
EGL will iterate through each of the configs and check for GL, GLES3_KHR, and GLES2 bits
After that it'll change the mode from _DETECT to whichever one is the best supported.
After that point we'll just create a context with the mode that was detected
2014-01-18 04:11:59 +00:00