Commit Graph
263 Commits
Author SHA1 Message Date
Henrik Rydgård c5e0b799d9 Remove category from _assert_msg_ functions. We don't filter these by category anyway.
Fixes the inconsistency where we _assert_ didn't take a category but
_assert_msg_ did.
2020-07-19 20:33:25 +02:00
Henrik RydgårdandGitHub bb6219e402 Merge pull request #12921 from unknownbrackets/postshader
Use less FBOs for chained post-processing shaders
2020-07-13 18:52:53 +02:00
Henrik Rydgård a722dfe0fb Formalize "core excpetions" as a concept 2020-07-12 15:25:21 +02:00
Henrik Rydgård 73046239e3 Android: Add option to ignore camera notches when sizing the display.
This is generally what you want, at least on phones with small notches.

Not sure about the most intuitive polarity and name of the setting.. bit
of a shame to create another setting with a negation. But most people
should probably ignore this.
2020-07-05 22:46:25 +02:00
Unknown W. Brackets 9ef521d945 GPU: Avoid immediate postshader FBO recreate.
Before, we created things at the wrong size, then recreated at the right.
Now we just start at the correct size once.
2020-06-12 12:35:35 -07:00
Henrik Rydgård 737688a22a Annotate calls to RebindFramebuffer with their cause. 2020-06-02 09:51:38 +02:00
Henrik Rydgård c8d48a8777 Handle insets correctly for the in-game final screen blit.
Should help #12982 in case of phones with inset cameras.
2020-05-31 20:14:40 +02:00
Henrik Rydgård e559fc022f Minor refactor in PresentationCommon (combine loose coordinates to a struct) 2020-05-31 19:45:28 +02:00
Henrik Rydgård 370678c498 Do a similar thing for D3D (let the backend handle the dirtying). 2020-05-24 20:57:59 +02:00
Henrik Rydgård bebf649705 OpenGL/Vulkan: Rework the contract around dynamic state. Removes some ugly dirtying from the GL render manager. 2020-05-24 20:27:58 +02:00
Henrik Rydgård 4f7e5df29a Remove all those "GLES reset the blend state" comments. 2020-05-24 19:21:46 +02:00
Henrik Rydgård cba0d16583 Vulkan: After binding a new framebuffer, we always need to dirty the viewport/scissor state.
So that viewport and scissor commands get written to the new render pass.

Temporary solution until I can figure out how to abstract this away
in the RenderManager without losing perf.
2020-05-24 17:59:52 +02:00
Unknown W. Brackets 3a1bc6a86b GPU: Never set safe size larger than the buffer.
Maybe this indicates the buffer size is wrong, but a safe size larger than
the buffer will make us try to download outside the buffer and lose the
Vulkan device.
2020-05-23 00:12:22 -07:00
Henrik RydgårdandGitHub 1dec772145 Merge pull request #12944 from unknownbrackets/gpu-minor
GPU: Ignore viewport for scissor of 481
2020-05-21 22:47:42 +02:00
Unknown W. Brackets cd869d469d GPU: Ignore viewport for scissor of 481.
Assume it's still wrong in this case and take 480x272.  See #12746.
2020-05-21 11:37:36 -07:00
Henrik Rydgård 7d10a0c609 Remove a redundant framebuffer bind in CopyDisplayToOutput 2020-05-21 11:54:08 +02:00
Henrik Rydgård fabe987c8f Add a name tag for all render steps (GL/Vulkan). Helps with debugging and should be cheap enough (a single pointer per "step"). 2020-05-21 11:24:05 +02:00
Unknown W. Brackets 4ef4325fdb GPU: Avoid unnecessary clear on stencil upload.
In this common case, we've typically just bound the buffer to upload a
texture to it.  No need to start a new render pass.

This dodges #12927 but doesn't really fix the underlying issue.
2020-05-18 21:36:06 -07:00
Unknown W. Brackets 32a7e7345e GPU: Centralize framebuffer download.
And try not to use a potentially-null nvfb.  Primarily this can happen on
Direct3D backends.
2020-05-17 10:59:33 -07:00
Unknown W. Brackets d9195c68b3 GPU: Move calculating render res to presentation.
Since it best understands what the first postshader wants.
2020-05-16 12:33:35 -07:00
Unknown W. Brackets b79ecc159f GPU: Update postshader uniforms for each. 2020-05-16 12:04:36 -07:00
Unknown W. Brackets 192198ef3b GPU: Oops, don't skip copy if stride different.
Should've tested that change better, but wanted the mip level fix...
2020-05-14 18:45:06 -07:00
Unknown W. Brackets 8b4821bc05 Draw: Small optimization to callback.
This allows the callback to say "I didn't copy, please copy for me."  This
helps when additional conversions will be applied during the copy, or a
copy can be skipped.

Also, fixed a couple cases of the wrong mip level being used.
2020-05-13 20:30:24 -07:00
Unknown W. Brackets 7024a2877d GPU: Take A off RGB565 conversion funcs. 2020-05-13 18:17:58 -07:00
Unknown W. Brackets 22e46b51c2 GPU: Centralize DestroyAllFBOs().
This cleans up the postshader update code.
2020-05-13 18:15:04 -07:00
Unknown W. Brackets 03e3a935da GPU: Cleanup presentation flipping a bit. 2020-05-13 18:11:25 -07:00
Unknown W. Brackets 884a64b932 GPU: Cleanup skip buffer texture draws.
These will be used when a game does multiple transfers from RAM to the
screen, rather than one big one.  Wasn't clearing some state, though.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets 6b251dac4c GPU: Simplify direct render when skipping buffers.
This may have been uploading twice before, so there may be a small
performance improvement in some games now.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets 2faab0e082 GPU: Use postshader for direct VRAM draws again.
Also centralize the pixel texture code while at it.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets 762b656ea2 GPU: Use a texture directly for MakePixelTexture.
This makes it easier to do things with it.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets fa6544b737 GPU: Cleanup leftover postshader stuff. 2020-05-13 18:10:09 -07:00
Unknown W. Brackets cb94487a16 GPU: Move post shader handling to new class.
Currently, Vulkan is not working properly and direct (RAM -> output) is
not hooked up.  But in general, it works.
2020-05-13 18:10:06 -07:00
Unknown W. Brackets 0b26eaaa7a GPU: Move a bit more to new display approach. 2020-05-13 18:07:25 -07:00
Unknown W. Brackets a03e368566 GPU: Move cardboard/etc. to PresentationCommon.
Now this works on softgpu as well.

Some hacks for backend differences...
2020-05-13 18:07:25 -07:00
Unknown W. Brackets d39b0bdca2 GPU: Split FramebufferCommon into two classes.
Only some things moved over so far.

FramebufferCommon does too much, we want to share it with softgpu without
all the buffer management stuff.
2020-05-13 18:07:22 -07:00
Unknown W. Brackets a2b99e23d2 GPU: Handle buffer overhead in postshader uniforms.
Framebuffers may be temporarily larger than the estimated width, because
we estimate different sizes for them and resizing is expensive.

This moves accounting for that to texelDelta instead of pixelDelta.
2020-05-13 08:39:50 -07:00
Henrik Rydgård f708396bda Fix a comment 2020-05-10 23:10:57 +02:00
Unknown W. Brackets a95f3111cf GPU: Assume a scissor of 481x273 is a mistake.
We already do this for viewport, and only when region is still a correct
size.  Helps flicker in Everybody's Golf.
2020-03-21 23:47:50 -07:00
Unknown W. Brackets cebcfb1bbd GPU: Use old frame when presenting a skip.
If we flip using a skipped frame, we may show an even older frame causing
weird flickering.
2020-03-01 13:55:28 -08:00
Unknown W. Brackets 5009698cc0 Core: Use a shared_ptr for i18n categories.
This does not make them thread safe, but it reduces the chances of a crash
a bit (see #12594.)
2020-02-09 07:35:16 -08:00
Henrik Rydgård 3924e457be Also rename the config setting to make sure it starts out off. 2019-10-25 16:03:00 +02:00
Henrik Rydgård 9b8533c936 Revert "Remove Google Cardboard support. Fixes #11668"
This reverts commit e284d9f00d.
2019-10-25 16:03:00 +02:00
LunaMoo c23f11cf0a Change Bloom Hack aggressive detection to include GOW games bloom. 2019-10-19 19:10:39 +02:00
Unknown W. Brackets bdd2029623 Core: Fix memory range guard check.
Was allowing sizes with the high bits set, which could cause all kinds of
weird issues and crashes.
2019-09-28 08:40:41 -07:00
Henrik Rydgård 9d65ff8873 Silence a few warnings. 2019-09-24 23:10:18 +02:00
Henrik Rydgård c7798715a5 Fix issue preventing video to work correctly in Digimon. Fixes #12186
(due to BlockTransferAllowCreateFB not updating the framebuffer range
speedhack).
2019-09-17 14:47:38 +02:00
Henrik Rydgård d8db8ecfcc Revert "GPU: Download CLUTs when loading at 256 stride."
This reverts commit dc03050730.
2019-08-23 00:11:13 +02:00
Henrik Rydgård 96a15cf525 Fix the indirect postprocessing path. Fixes #12133 (but see the issue for a secondary bug). 2019-08-04 18:01:36 +02:00
Unknown W. Brackets 748b33a561 GPU: Allow upload to temp resized framebuf.
Fixes #12045.
2019-07-28 05:31:49 -07:00
Unknown W. Brackets dc03050730 GPU: Download CLUTs when loading at 256 stride.
Or otherwise when loading full rows.  Should fix #8406.
2019-07-07 07:49:42 -07:00