Commit Graph
3315 Commits
Author SHA1 Message Date
Unknown W. Brackets cb739fc0b9 GPU: Allow each shader in chain to have settings.
It'll be up to the author to make the setting names make sense, though.
They'll show from first shader to last.
2020-05-16 12:33:35 -07:00
Unknown W. Brackets ff68a0d50f UI: Translate shader setting names.
Also, only save settings in ini that have names.
2020-05-16 12:33:35 -07:00
Unknown W. Brackets 1e0c5db3a9 GPU: Keep last output size in chained postshaders. 2020-05-16 12:33:35 -07:00
Unknown W. Brackets 978aa89768 GPU: Prevent infinite loops in postshader chains. 2020-05-16 12:33:35 -07:00
Unknown W. Brackets 8a626dffc5 GPU: Force nearest only for the upscaling filter.
So, if we upscale and then apply an effect, we won't use nearest on that
effect.
2020-05-16 12:33:35 -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 477e988a68 GPU: Allow postshaders to have parents. 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 2d8ea9576a GPU: Process all postshader pipelines. 2020-05-16 12:04:36 -07:00
Unknown W. Brackets 5612f9b0af GPU: Cleanup a comment, we use shorts now. 2020-05-16 12:04:36 -07:00
Unknown W. Brackets 31ffbbf44f GPU: Move things around to be per postshader. 2020-05-16 12:04:36 -07:00
Henrik RydgårdandGitHub 67ab51bb90 Merge pull request #12901 from iota97/postshader-setting
Post shader setting uniform
2020-05-16 21:01:23 +02:00
Henrik Rydgård a63706925f Very minor optimization in PresentationCommon (don't upload the indices every frame). 2020-05-16 14:56:38 +02:00
iota97 b07874cd00 Fix per game setting and pack setting in vec4 2020-05-16 09:27:53 +02:00
iota97 a666635fa2 Post shader setting uniform 2020-05-15 18:08:52 +02:00
Henrik Rydgård 4bf92a66c5 Thin3D: use 16-bit indices. Fixes #12898. 2020-05-15 18:07:07 +02: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 203da7d6e1 GPU: Use texclamp for postshader/present draw. 2020-05-13 18:15:04 -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 2653e50200 softgpu: Avoid RB swizzle when using a postshader.
So that it can post-process correctly.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets d4f4e87e66 Vulkan: Correct postshader sampler binding.
This was causing a lost device.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets 3aa8287b74 softgpu: Enable postshader support. 2020-05-13 18:10:09 -07:00
Unknown W. Brackets 0e5b17eb9c GLES: Fix reuse of vertex data buffer.
Direct3D 11 and OpenGL had some issues with this being reused for both
renders.  Caused OpenGL to appear flipped.
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 d17c5b30e1 D3D9: Enable postprocessing of post shaders. 2020-05-13 18:07:25 -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 ba566ef26a GPU: Minor lighting cleanup in software transform.
In this case, unlitColor is already materialAmbient.
2020-05-08 23:09:24 -07:00
Unknown W. Brackets ef43ec5f33 GPU: Split up software transform into phases. 2020-05-08 23:09:24 -07:00
Unknown W. Brackets 16e47f6333 GPU: Calc framebuf offset with right params.
It has nothing to do with the target or source framebuf, oops.
2020-05-07 23:22:51 -07:00
Unknown W. Brackets 4d11256807 GPU: Avoid a texture offset change in sw transform.
If we do it this late, it changes the shader, but that is tricky to handle
for all the backends.
2020-05-07 23:18:51 -07:00
Unknown W. Brackets 48980d8786 GLES: Simplify the framebuf offset detection.
It's clearly not been understood well as changes were made, so let's dump
a bunch of comments on it.
2020-05-07 23:12:14 -07:00
Unknown W. Brackets ac60e2ecd4 GPU: Track HW tess at start of frame too.
This also makes it so we don't force the setting off when you change
backends, and just ignore it if unsupported.
2020-04-04 11:52:32 -07:00
Unknown W. Brackets 46b9454e73 GPU: Reset hw transform once per frame.
Might prevent potential crashes if it changes mid-frame.
2020-04-04 11:21:22 -07:00
Unknown W. Brackets 30ede8240c GPU: Move hw transform decision to draw engine. 2020-04-04 11:14:32 -07:00
Unknown W. Brackets c42fb72419 GPU: Update uniforms w/ consistent render mode too. 2020-04-04 11:03:07 -07:00
Unknown W. Brackets ad98609819 GPU: Use consistent buffered rendering state.
The setting can be changed in Qt and Windows between frames, so let's
track the current setting in most places.  This is everywhere fbman is
easily accessible.
2020-04-04 10:51:47 -07: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 4a8839c99d GPU: Avoid divide by zero in garbage displaylist. 2020-03-19 20:56:24 -07:00