Commit Graph

64 Commits

Author SHA1 Message Date
Connor McLaughlin 951b66e4ac
Merge pull request #8049 from stenzek/crop
Renderer: Adjust source rectangle when crop would draw off screen
2019-06-08 20:57:52 +10:00
Lioncash e60268bd42 VideoCommon/RenderBase: Use a std::string_view with CreateShaderFromSource()
Greatly simplifies the overall interface when it comes to compiling
shaders. Also allows getting rid of a std::string overload of the same
name. Now std::string and const char* both go through the same function.
2019-05-30 03:29:35 -04:00
Stenzek 32359bf2bb Renderer: Adjust target rectangle in the base class 2019-04-28 23:33:24 +10:00
Stenzek f8c1ba409c Replace EFBRectangle/TargetRectangle with MathUtil::Rectangle 2019-04-21 14:28:14 +10:00
Stenzek 61a656570e AbstractPipeline: Support returning "cache data"
"Cache data" can be used to assist a driver with creating pipelines by
using previously-compiled shader ISA.
2019-04-16 00:09:47 +10:00
Stenzek 3d8014beb5 D3D11: Use D3DCommon where appropriate 2019-03-29 19:52:38 +10:00
Stenzek f039149198 Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
Stenzek e4b205c769 Decouple XFB scanout from presentation 2019-01-25 11:15:57 +10:00
Stenzek c9c0b85056 VideoBackends: Store a backbuffer 'scale'
This is a scaling factor, used for hi-dpi configurations.
2019-01-25 11:15:57 +10:00
Stenzek 63dd91628d Remove old RasterFont classes 2019-01-25 11:15:57 +10:00
Stenzek 7afd5cc2fb Use main buffers for utility draws 2018-12-04 17:37:25 +10:00
Stenzek a3961750a7 Drop Host_GetRenderSurface and pass display to backend 2018-10-20 21:11:34 +10:00
Stenzek 9e798eec94 Implement EFB copy filter and gamma in hardware backends
Also makes y_scale a dynamic parameter for EFB copies, as it doesn't
make sense to keep it as part of the uid, otherwise we're generating
redundant shaders.
2018-04-29 19:05:20 +10:00
Stenzek dec0c3bce8 Move shader caches to VideoCommon 2018-03-10 15:56:30 +10:00
Stenzek 4c24a69710 VideoCommon: Add support for Abstract Framebuffers 2018-03-02 20:20:48 +10:00
Stenzek fec6bb4d56 VideoBackends: Add AbstractShader and AbstractPipeline classes 2018-02-22 22:02:34 +10:00
Stenzek de632fc9c8 Renderer: Handle resize events on-demand instead of polling
We now differentiate between a resize event and surface change/destroyed
event, reducing the overhead for resizes in the Vulkan backend. It is
also now now safe to change the surface multiple times if the video thread
is lagging behind.
2018-02-20 01:15:55 +10:00
Stenzek c1b39ecc58 BPFunctions: Move upscaling of scissor rect to VideoCommon 2018-02-20 00:49:32 +10:00
Stenzek 5359396099 BPFunctions: Move GX viewport conversion to VideoCommon 2018-02-20 00:49:32 +10:00
Stenzek 38e0b6e2ab AbstractTexture: Move Bind() method to Renderer
This makes state tracking simpler, and enables easier porting to command
lists later on.
2018-01-22 13:22:09 +10:00
Stenzek f43d85921d VideoBackends: Add AbstractStagingTexture class
Can be used for asynchronous readback or upload of textures.
2017-11-22 18:47:04 +10:00
Stenzek 49a9c33bd7 VideoCommon: Move abstract texture creation function to Renderer 2017-11-22 18:47:04 +10:00
Stenzek d9400f708a D3D: Move remaining static variables from Render.cpp to Renderer class 2017-11-22 18:47:04 +10:00
Stenzek 798ec96e14 D3D: Make state cache part of Renderer and not static 2017-11-22 18:17:07 +10:00
iwubcode 79387dddb2 Add support for hybrid XFB 2017-11-17 19:47:56 -06:00
Stenzek 24ddea04ce VideoBackends: Move SamplerState to common 2017-09-11 20:01:54 +10:00
Stenzek 836b9b9acb Renderer: Move cull mode to a rasterization state object
Also moves logic for primitive handling to VideoCommon.
2017-09-11 20:01:45 +10:00
Stenzek 2869c570f1 Renderer: Move depth state to VideoCommon and seperate from bpmem 2017-09-11 19:40:26 +10:00
Stenzek 3dd675e613 Renderer: Change SetBlendState to accept a BlendingState
This decouples the state generation (from the emulated GPU) from the
management of internal backend state.
2017-09-03 14:14:54 +10:00
Stenzek 5c9bc8b79c D3D11: Use blending state from VideoCommon 2017-09-03 14:14:54 +10:00
Stenzek ddc5275071 VideoCommon: Drop SetDitherMode()
It was a no-op on all backends apart from GL anyhow.
2017-04-18 21:55:22 +10:00
Stenzek 2cd240af0d VideoBackends: Move max texture size to VideoConfig
This stops the virtual method call from within the Renderer constructor.

The initialization here for GL had to be moved to VideoBackend, as the
Renderer constructor will not have been executed before the value is
required.
2017-03-10 00:04:13 +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 70cf774a5c RenderBase: Forward declare EFBAccessType 2017-01-23 12:41:26 -05:00
degasus 41b0c74e30 VideoCommon: Make dst_alpha state implicit. 2017-01-04 20:02:31 +01:00
Jules Blok 7e35a47b51 Cosmetics. 2016-11-13 22:17:40 +01:00
Jules Blok d7cf5e28b6 Frame: Use PauseAndLock when switching fullscreen modes.
This allows us to regain exclusive mode directly from OnActive().
2016-11-11 20:36:10 +01:00
Jules Blok c21efa0cad D3D: Move exclusive mode switching to UI thread.
This prevents deadlocks when switching to exclusive mode.
And it also allows the CPU thread to block until we've completed the switch.
2016-11-11 20:36:04 +01:00
degasus 9f264c0872 AVIDump: Move CoreTiming into caller. 2016-10-10 12:03:18 +02:00
degasus 64927a2f81 Renderer: Merge screenshot logic into VideoCommon. 2016-10-08 19:38:57 +02:00
Shawn Hoffman 86112c7258 VideoCommon: Minor changes
Make Renderer::GetMaxTextureSize return u32 instead of int.
2016-10-03 06:51:46 -07:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Stenzek a61fc372bb VideoCommon: Change PokeEFB to take a pointer rather than a vector
This saves allocating a vector for the pass-through path.
2015-12-20 14:42:14 +10:00
Stenzek 7b628c99ec D3D: Implement vectored efb pokes, increase util vertex buffer size to 64KiB 2015-12-20 00:31:58 +10:00
Tillmann Karras 268f52e054 Add missing license headers 2015-05-25 13:11:47 +02: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
Pierre Bourdon 1e809d9c11 Revert "Merge pull request #1903 from RisingFog/libav"
This reverts commit 34079a0037, reversing
changes made to 3274df7158.
2015-01-26 02:35:29 +01:00
Fog 6cad635bd8 Use ffmpeg for Windows Video Dumping instead of VFW 2015-01-21 19:47:45 -05:00
Jules Blok 4a86234a79 D3D: Support stereoscopic XFB blit to screen. 2014-12-24 18:45:24 +01:00