Commit graph

3292 commits

Author SHA1 Message Date
Markus Wick
9c1eac1f4f Merge pull request #4944 from vladfi1/framedump
Framedump extensions
2017-03-08 11:01:53 +01:00
Markus Wick
a911d256a7 Merge pull request #5018 from Tilka/trunc
VideoCommon: remove unnecessary trunc()
2017-03-08 11:01:17 +01:00
Vlad Firoiu
096f58b172 Save new framedump options. 2017-03-08 01:38:40 -08:00
Vlad Firoiu
71c0e30655 Appease linter. 2017-03-05 17:29:46 -08:00
Vlad Firoiu
fbff74c1eb Warn on invalid video codec. 2017-03-05 17:08:59 -08:00
Vlad Firoiu
9155af5103 GetDumpPath function. 2017-03-05 17:08:59 -08:00
Vlad Firoiu
8c24387509 Use ffv1 if user requests it. 2017-03-05 17:08:59 -08:00
Tillmann Karras
8a72e84ece VideoCommon: remove unnecessary trunc() 2017-03-05 01:53:54 +00:00
Stenzek
459a5ab554 Android: Move screenshot waiting logic to Renderer 2017-03-04 16:53:16 +10:00
Stenzek
811eafda57 VideoCommon: Store last window request width/height
This avoids the need to send a window resize event every frame.
2017-03-04 16:53:12 +10:00
Stenzek
00a0a91513 VideoCommon: Move last EFB scale handling to CalculateTargetSize 2017-03-04 16:53:07 +10:00
Stenzek
afc25fdca0 VideoCommon: Rename Renderer s_ prefixes to m_ 2017-03-04 16:42:21 +10:00
Stenzek
238a70b006 VideoCommon: Move some common initialization logic to RenderBase 2017-03-04 16:42:16 +10:00
Stenzek
277829d842 VideoCommon: Eliminate static state in Renderer 2017-03-04 16:39:50 +10:00
Lioncash
552c0d8404 Common: Move byte swapping utilities into their own header
This moves all the byte swapping utilities into a header named Swap.h.

A dedicated header is much more preferable here due to the size of the
code itself. In general usage throughout the codebase, CommonFuncs.h was
generally only included for these functions anyway. These being in their
own header avoids dumping the lesser used utilities into scope. As well
as providing a localized area for more utilities related to byte
swapping in the future (should they be needed). This also makes it nicer
to identify which files depend on the byte swapping utilities in
particular.

Since this is a completely new header, moving the code uncovered a few
indirect includes, as well as making some other inclusions unnecessary.
2017-03-03 17:18:18 -05:00
Markus Wick
7982ba120f Merge pull request #4995 from lioncash/normalize
CMakeLists: Normalize whitespace
2017-03-02 11:51:06 +01:00
Lioncash
ee61bd6f2e CMakeLists: Normalize whitespace
Normalizes tabs to spaces to follow our codebase's indentation style.
2017-03-01 14:53:23 -05:00
Jules Blok
83bd74aef0 Merge pull request #4974 from gamemasterplc/master
Widescreen Hack improvement
2017-03-01 02:17:33 +01:00
Lioncash
5ed55ffb34 PixelEngine: Move enum constants into the PixelEngine namespace
Gets some identifier names out of the global namespace.
2017-02-28 07:01:50 -05:00
Vlad Firoiu
a3af5b09d3 error logs 2017-02-27 23:45:35 -08:00
Vlad Firoiu
6b1910a078 Appease global header warning. 2017-02-27 23:45:35 -08:00
Vlad Firoiu
f82e3de763 Dump to arbitrary URLs. 2017-02-27 23:45:34 -08:00
Vlad Firoiu
21e66e60e3 Configable dump codec. 2017-02-27 23:45:12 -08:00
Vlad Firoiu
a1a9e488a5 XVID FourCC for MPEG-4 codecs. 2017-02-27 23:44:33 -08:00
Vlad Firoiu
d4686aa1a7 More warnings for AVIDump. 2017-02-27 23:44:33 -08:00
Vlad Firoiu
86a8382376 Arbitrary dump formats. 2017-02-27 23:44:29 -08:00
Vlad Firoiu
1723645c99 guess format before allocating context 2017-02-27 23:43:15 -08:00
Vlad Firoiu
8fb2eb889d Handle delayed frames at the end of the movie. 2017-02-27 23:43:15 -08:00
Anthony
ed6a46a193 Merge pull request #4958 from RisingFog/avidump_bitrate
Add configurable video dump bitrate to INI
2017-02-27 10:15:19 -08:00
Anthony
63c5230d9b Merge pull request #4959 from lioncash/ini
IniFile: Handle s64/u64 values
2017-02-27 10:02:53 -08:00
Anthony
b16cebc297 Merge pull request #4978 from ligfx/avidumpclosefiles
AVIDump[regression]: close avio handles
2017-02-27 09:39:40 -08:00
Jules Blok
f5d14e3691 Merge pull request #4933 from Armada651/disable-cache
VideoBackends: Add a developer option to disable the shader cache.
2017-02-27 17:35:01 +01:00
Michael Maltese
621472336c AVIDump[regression]: close avio handles 2017-02-26 23:26:31 -08:00
gamemasterplc
4c4a96bfc5 Widescreen Hack improvement
Fixes Projection alignment in some N64 VC games. The original code forgot to multiply rawProjection[1] and rawProjection[3].
2017-02-26 12:55:57 -06:00
z0z0z
005e6796b8 Disable pinned memory for AMD mesa drivers 2017-02-26 10:49:28 -05:00
Jules Blok
a15555fe03 VideoBackends: Use vertex shader depth range if ztexture is used. 2017-02-26 11:34:48 +01:00
Chris Burgener
bfb17d5a9e Add configurable video dump bitrate to INI 2017-02-25 23:58:21 -05:00
Lioncash
beec40f178 IniFile: Handle s64/u64 values 2017-02-25 00:03:20 -05:00
Jules Blok
94522d4cf3 OGL: Add support for glDepthRangedNV to handle oversized depth ranges. 2017-02-24 14:54:16 +01:00
Anthony
4e93002adb Merge pull request #4800 from JosJuice/movie-dual-core-determinism
Remove special condition for auto dual core determinism
2017-02-23 13:19:39 -08:00
Jules Blok
21967b1f6e VideoBackends: Add a developer option to disable the shader cache.
Makes it easier to disable the cache while working on the shaders.
2017-02-19 12:05:44 +01:00
Stenzek
b8eb1080ce Merge pull request #4924 from stenzek/vulkan-list-restart
Vulkan: Fix GPU hangs on AMD Polaris
2017-02-18 21:58:30 +10:00
Markus Wick
6acad27919 Merge pull request #4927 from lioncash/unique-ptr
VertexManagerBase: Make CreateNativeVertexFormat return a unique_ptr
2017-02-18 12:40:00 +01:00
Lioncash
1fa81f24d3 VertexManagerBase: Make CreateNativeVertexFormat return a unique_ptr
Much safer as opposed to just returning raw allocated memory.
2017-02-18 03:16:24 -05:00
Matthew Parlane
4da7164f66 Merge pull request #4596 from ligfx/updateffmpeg
AVIDump: Updates to avoid deprecation warnings
2017-02-18 21:12:37 +13:00
Stenzek
e2ddb3853e DriverDetails: Set BUG_PRIMITIVE_RESTART for AMD drivers 2017-02-18 15:07:35 +10:00
Matthew Parlane
691abc223b Merge pull request #4859 from lioncash/opcodedecoder
OpcodeDecoding: Convert #defines into enum constants
2017-02-08 18:12:11 +13:00
Lioncash
d9d069e024 OpcodeDecoding: Convert #defines into enum constants
Gets several constants out of global scope.
2017-02-08 00:05:17 -05:00
Florent Castelli
8c82607c95 cmake: Don't use unqualified target_link_libraries
You can't mix unqualified and qualified link libraries (PUBLIC / PRIVATE).
Use the modern form.
2017-02-08 03:07:43 +01:00
Michael Maltese
04158dfe15 AVIDump: use a separate AVCodecContext
Using the AVCodecContext contained in AVStream for muxing is officially
discouraged[1] and AVStream::codec was deprecated in favor of
AVStream::codecpar in libavformat 57.33.100 / 57.5.0.

1: [FFmpeg-cvslog] lavf: replace AVStream.codec with AVStream.codecpar: https://ffmpeg.org/pipermail/ffmpeg-cvslog/2016-April/099152.html
2017-02-06 20:23:37 -08:00
Michael Maltese
867d6134c5 AVIDump: open codec before stream
Minor oversight in the existing code.
2017-02-06 20:23:37 -08:00
Michael Maltese
dd3d8c7a4e AVIDump: use avformat_free_context
This function frees all associated streams and codec contexts, and
has existed since libavformat 52.96.0 (February 2011).
2017-02-06 20:23:37 -08:00
Michael Maltese
ac214190fd AVIDump: Replace deprecated avcodec_encode_video2 2017-02-06 20:23:37 -08:00
Markus Wick
eb3c172b95 Merge pull request #4618 from Helios747/bounding_box_check
[Video] Warn when booting a bounding box game on an unsupported GPU
2017-02-06 21:58:19 +01:00
Helios747
4c22e6387d [Video] Warn when booting a bounding box game on an unsupported GPU 2017-02-04 10:08:52 -08:00
Lioncash
c85e0a2586 FramebufferManagerBase: Return a std::pair from GetTargetSize
Keeps associated data together. It also eliminates the possibility of out
parameters not being initialized properly. For example, consider the
following example:

-- some FramebufferManager implementation --

void FBMgrImpl::GetTargetSize(u32* width, u32* height) override
{
  // Do nothing
}

-- somewhere else where the function is used --

u32 width, height;
framebuffer_manager_instance->GetTargetSize(&width, &height);

if (texture_width != width) <-- Uninitialized variable usage
{
  ...
}

It makes it much more obvious to spot any initialization issues, because
it requires something to be returned, as opposed to allowing an
implementation to just not do anything.
2017-02-03 15:27:53 -05:00
Lioncash
468f623d27 ShaderGenCommon: Remove unnecessary includes 2017-02-01 12:19:55 -05:00
JosJuice
045de7dd26 Remove special condition for auto dual core determinism 2017-02-01 15:43:47 +01:00
Lioncash
273ace7bb7 LightingShaderGen: Remove unnecessary includes 2017-02-01 01:06:00 -05:00
Lioncash
1f24cf2a2d RenderBase: Get rid of unnecessary casts 2017-01-31 20:25:50 -05:00
Lioncash
b7e59f4e55 AVIDump: Rename CloseFile to CloseVideoFile
Retains symmetry with CreateVideoFile.
2017-01-29 22:05:12 -05:00
Markus Wick
3405f0ba01 Merge pull request #4739 from AdmiralCurtiss/auto-adjust-window-size-16-9
Make the "Auto Adjust Window Size" option respect the current game's aspect ratio.
2017-01-28 13:02:54 +01:00
Mat M
ede9c6255a Merge pull request #4770 from degasus/fifo
CommandProcessor: Limit scope of ugly SCPFifoStruct.
2017-01-28 06:43:23 -05:00
Admiral H. Curtiss
b2c40bf4c4 RenderBase: Let the Auto Adjust Window Size option request the final image size rather than the raw framebuffer size. 2017-01-28 11:40:53 +01:00
Admiral H. Curtiss
e1fa6c374f RenderBase: Extract the framebuffer size to display size code into function. 2017-01-28 11:40:53 +01:00
degasus
3787af9ee9 CommandProcessor: Limit scope of ugly SCPFifoStruct.
It's only used as an interface between two classes. So no need to declare
it in the backend export header.
2017-01-27 19:04:56 +01:00
degasus
ba1decf7bc PixelEngine: Use a DirectRead for the token.
No need to call a std::function, and a few games poll this value very often.
2017-01-27 07:49:47 +01:00
Stenzek
b74029ec57 TextureDecoder: Use target attributes on SSSE3 decoders 2017-01-24 20:04:55 +10:00
Matthew Parlane
f70a1a27fa Merge pull request #4726 from ligfx/addingwindowsheaders
Fix building without PCH on Windows
2017-01-24 13:47:36 +13:00
Lioncash
7a58a82a37 BPMemory: Add const specifier to member functions where applicable 2017-01-23 16:07:03 -05:00
Lioncash
1f596a23af BPMemory: Eliminate union type punning
This is undefined behavior in C++.
2017-01-23 16:05:32 -05:00
Lioncash
70cf774a5c RenderBase: Forward declare EFBAccessType 2017-01-23 12:41:26 -05:00
Lioncash
940aa6f32d VideoBackendBase: Convert FieldType into an enum class 2017-01-23 03:54:01 -05:00
Lioncash
5b461f50af VideoBackendBase: Convert EFBAccessType into an enum class 2017-01-23 03:53:38 -05:00
Michael Maltese
c3a1547d9a AVIDump: rename CreateFile -> CreateVideoFile (conflict with windows.h) 2017-01-23 00:35:18 -08:00
degasus
65e3aa796e VideoConfig: Fix boolean default values. 2017-01-21 11:31:44 +01:00
Matthew Parlane
ed7589cb0f Merge pull request #4656 from hthh/cmpr-fixes
TextureDecoder: Fix off-by-one errors in CMPR
2017-01-17 11:05:42 +13:00
hthh
88d52b4d69 TextureDecoder: Deduplicate some utility code 2017-01-15 20:23:26 +11:00
hthh
5d4e4aa561 TextureDecoder: Fix off-by-one errors in CMPR 2017-01-14 10:52:35 +11:00
Jules Blok
271a9fe7a9 VertexShaderManager: Break up the conditions to make it readable. 2017-01-13 14:01:17 +01:00
Jules Blok
f866748006 VertexShaderGen: Remove the need for an extra UID. 2017-01-13 14:01:17 +01:00
Stenzek
2f223e24dc TextureDecoder: Seperate each format into its own function 2017-01-10 20:41:00 +10:00
Matthew Parlane
7a4464c3e0 Merge pull request #4599 from stenzek/point-uvs
GeometryShaderGen: Use lower-left origin for point texture coordinates
2017-01-08 13:40:55 +13:00
degasus
f6c7a258ed BlendState: Use masking as a fastpath for the logic op NO_OP. 2017-01-06 14:01:39 +01:00
degasus
23b0faeba5 OGL: Use VideoCommon blend state for framebuffer configuration. 2017-01-06 14:01:39 +01:00
degasus
3df828463d VideoCommon: Assembly blending state in a shared state object. 2017-01-06 14:01:36 +01:00
BhaaL
23d99f2f2c specify custom brace style to fix unions
BreakBeforeBraces: Allman apparently includes all styles,
except for AfterUnion (which is false) when using clang-format -dump-config
2017-01-05 12:55:13 +01:00
degasus
41b0c74e30 VideoCommon: Make dst_alpha state implicit. 2017-01-04 20:02:31 +01:00
Stenzek
176177af49 GeometryShaderGen: Use lower-left origin for point texture coordinates
From what I can tell, the emulated GPU places (0,0) at the lower left of
the image, and we were generating texture coordinates so that (0,0) was
at the upper-left in the expansion geometry shader, causing textures
used by point sprites to be flipped vertically.

Fixes the upside-down A button in Mario Golf.
2017-01-04 20:23:07 +10:00
Stenzek
5f3c878ba2 FifoPlayer: Save/restore texture memory state for fifo logs 2017-01-03 21:16:05 +10:00
Jules Blok
a2e191649d Merge pull request #4471 from Armada651/hybrid-depth
VideoCommon: Don't process the depth range in the vertex shader if it's not oversized.
2016-12-29 18:49:27 +01:00
Jules Blok
ee7a2edf35 Update comments 2016-12-27 21:32:52 +01:00
degasus
d0a73c1d90 TextureCache: Add a dirty bit for partial updates on overlapping EFB copies. 2016-12-27 17:26:04 +01:00
Jules Blok
ef82aebb97 VideoCommon: Don't process the depth range in the vertex shader if it's not oversized. 2016-12-27 14:31:17 +01:00
degasus
abf9bb170b TextureCache: Drop unused parameter in backend API. 2016-12-26 22:10:32 +01:00
degasus
04f319066d TextureCache: Extract BP enum check to VideoCommon.
We have TOO many video backends.
2016-12-26 22:10:21 +01:00
Tillmann Karras
44acd9fdb9 VideoCommon: use u32 for texture addresses 2016-12-25 18:48:19 +01:00
Lioncash
c5243d6d12 CommandProcessor: Remove unimplemented prototypes 2016-12-24 01:15:50 -05:00
Mat M
9160be50db Merge pull request #4224 from lioncash/tcache
TextureCacheBase: Eliminate static state
2016-12-23 04:33:42 -05:00
Stenzek
01047319f8 Merge pull request #4517 from stenzek/mp3-blotches
TextureCache: Use same color coefficients for EFB2Tex as EFB2RAM
2016-12-19 22:11:38 +10:00