Commit Graph

417 Commits

Author SHA1 Message Date
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
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
32359bf2bb Renderer: Adjust target rectangle in the base class 2019-04-28 23:33:24 +10:00
3c64f0c616 Renderer: Adjust source rectangle when crop would draw off screen
This prevents us from requiring an oversized and/or negative viewport by
shrinking the source rectangle instead.
2019-04-28 23:31:57 +10:00
6553cf8bb1 OGL: Only set GL_PROGRAM_POINT_SIZE on desktop GL
It is always enabled in GLES.
2019-04-21 14:28:14 +10:00
f8c1ba409c Replace EFBRectangle/TargetRectangle with MathUtil::Rectangle 2019-04-21 14:28:14 +10:00
616ad378b7 OGL: Support returning pipeline cache data 2019-04-16 00:39:43 +10:00
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
86da282570 OGL: Support subgroup reduction operations via GL_NV_shader_thread_shuffle 2019-03-29 20:06:56 +10:00
16294acd2a VideoBackends: Scale bounding box rectangle in the pixel shader 2019-03-25 18:47:58 +10:00
a218a794cb FramebufferManager: Implement deferred EFB cache invalidation 2019-03-09 12:24:04 +10:00
f039149198 Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
49fe9f5db1 Use empty instead of size 2019-02-13 00:03:49 +01:00
b01df8670f Renderer: Fix throttle-disable (TAB) hotkey when vsync is enabled 2019-01-27 12:31:12 +10:00
e4b205c769 Decouple XFB scanout from presentation 2019-01-25 11:15:57 +10:00
c9c0b85056 VideoBackends: Store a backbuffer 'scale'
This is a scaling factor, used for hi-dpi configurations.
2019-01-25 11:15:57 +10:00
63dd91628d Remove old RasterFont classes 2019-01-25 11:15:57 +10:00
600d1fc0bc Renderer: Use imgui for drawing debug text and OSD 2019-01-25 11:15:57 +10:00
d1868d9475 RenderBase: Implement imgui rendering 2019-01-25 11:10:49 +10:00
396b7c2978 OGL: Invalidate tracked state when calling ResetAPIState()
Due to the current design, any of the GL state can be mutated after
calling this function, so we can't assume that the tracked state will
match if we call SetPipeline() after ResetAPIState().
2019-01-25 11:10:49 +10:00
66a7db3850 Always flush on swap 2019-01-08 18:28:59 +08:00
7afd5cc2fb Use main buffers for utility draws 2018-12-04 17:37:25 +10:00
2644e920cc Renderer: Add backbuffer format to base class 2018-12-04 17:36:08 +10:00
1adcd47dcb Renderer: Add a base Initialize() method to match Shutdown() 2018-12-04 17:36:08 +10:00
7efdd1070b OGL: Fix crash when opening graphics window on another backend 2018-11-07 21:20:12 +10:00
025e909773 GLContext: Use destructor instead of Shutdown() to cleanup
Also uses the Initialize() method to make the context current.
2018-10-20 21:11:34 +10:00
dcdd02d646 GLContext: Remove global context pointer 2018-10-20 21:11:34 +10:00
1d827a5223 Renderer: Pull dimensions from GLInterface/Swapchain 2018-10-20 21:11:34 +10:00
a3961750a7 Drop Host_GetRenderSurface and pass display to backend 2018-10-20 21:11:34 +10:00
134d967be2 Refactoring and cleanup of GLInterface (now GLContext) 2018-10-20 21:11:34 +10:00
640bfb8135 VideoConfig: Add a field for indicating logic op support in the backend 2018-05-26 00:07:20 +10:00
d0c025bf0b OGL: Fix EFB access in MSAA-mode 2018-05-22 15:35:20 +10:00
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
4cfd900c67 Fix some warnings 2018-04-17 14:10:05 +01:00
40bb9974f2 Reformat all the things! 2018-04-12 21:28:39 +02:00
91732e2baf Remove support for projection hacks
This isn't really useful for anything anymore as far as I know.
2018-04-01 21:41:18 +02:00
75f5fcdfee Assert: Remove unused parameter from DEBUG_ASSERT
This brings the macro in line with the regular ASSERT macro, which only has one
macro parameter.
2018-03-16 13:01:11 -04:00
50a476c371 Assert: Uppercase assertion macros
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
2018-03-14 22:03:12 -04:00
a5c0739fab OGL: Scale OSD text on big screens. 2018-03-12 20:38:06 +01:00
d4449971c9 OGL: Warn if buffer_storage isn't available.
Yes, this commit is only to blame OSX and Mali. Through the former supports unsynchronized mappings, the latter supports *no* way to stream dynamic data at all. Let's try to make bad news, as they ignore friendly feature requests. Maybe we just need to make more noise...
2018-03-12 20:38:00 +01:00
93ab50c555 OGL: Move primitive restart enable logic to GLUtil 2018-03-10 16:11:20 +10:00
fc1fe0672b OGL: Add some basic state tracking
We would want to improve the granularity here in the future, but for
now, this should avoid any performance loss from switching to the
VideoCommon shader cache.
2018-03-10 15:56:37 +10:00
f9c829c7f7 OGL: Re-implement async shader compiling 2018-03-10 15:56:34 +10:00
dec0c3bce8 Move shader caches to VideoCommon 2018-03-10 15:56:30 +10:00
bfb4709c80 AbstractPipeline: Allow setting pipeline to null 2018-03-10 15:56:18 +10:00
4c24a69710 VideoCommon: Add support for Abstract Framebuffers 2018-03-02 20:20:48 +10:00
887e3830ba VideoBackends: Restore the framebuffer as part of the API state
It's not often we switch out to draw to the EFB anyway.
2018-03-01 17:31:24 +10:00
b66f96c617 Merge pull request #6042 from stenzek/videocommon-pipelines
VideoCommon pipelines ("Abstract Pipeline")
2018-02-23 09:18:19 -08:00
2ba8f67feb OGL: Call GLInterface->Update() on window resize
macOS in particular requires the context be updated manually when the window
is resized.
2018-02-23 22:27:10 +10:00
fec6bb4d56 VideoBackends: Add AbstractShader and AbstractPipeline classes 2018-02-22 22:02:34 +10:00