Commit graph

2055 commits

Author SHA1 Message Date
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