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
Unknown W. Brackets
c7a27ed9af
GPU: Fix memory corruption with bufw > w.
...
Seen for example in Mecho Wars.
2020-03-19 20:56:02 -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
118e927b86
GPU: Only GL uses a flipped buffer in non-buffered, reflect that in the SW transform code.
2020-01-26 15:54:51 +01: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
Henrik Rydgård
767b1e45b2
Fix the build - there's a Vec3 name collision, fixed it using a namespace.
2019-10-22 22:58:10 +02:00
LunaMoo
c23f11cf0a
Change Bloom Hack aggressive detection to include GOW games bloom.
2019-10-19 19:10:39 +02:00
Henrik Rydgård
360e138c2c
Merge pull request #12372 from unknownbrackets/curves
...
GPU: Generate normals for curves with lighting
2019-09-29 08:17:35 +02:00
Unknown W. Brackets
cba6a63058
GPU: Generate normals for curves with lighting.
...
Improves #12354 . This needs to happen even if the vertex has no normals.
2019-09-28 15:08:37 -07: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
9c4649d3ac
Assorted cleanup
2019-09-27 23:25:30 +02: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
70ec327b40
Vulkan: Slim down and rename the Mali hack.
2019-09-09 00:43:31 +02:00
Henrik Rydgård
f76adfd760
Vulkan ARM mali Z hack: Modify the matrix instead of the shader.
2019-09-09 00:09:57 +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
Unknown W. Brackets
3e51fc5a89
GPU: Avoid some unused var/func warnings.
2019-08-17 12:01:22 -07: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
Henrik Rydgård
e284d9f00d
Remove Google Cardboard support. Fixes #11668
2019-07-01 14:47:42 +02:00
Unknown W. Brackets
7b8d3e0c36
GPU: Improve a 5551 stencil emulation case.
...
Hammerin' Hero (see #10777 ) uses ALWAYS with INCR, which can be rewritten
to maintain more correct stencil values.
2019-06-23 16:14:18 -07:00
Henrik Rydgård
b8bde71efe
Address feedback, delete some unused code.
2019-06-22 22:15:09 +02:00
Henrik Rydgård
b5ad92b9ef
Avoid rotating the image when DrawActiveTexture is used for other things than drawing to the backbuffer.
2019-06-21 14:00:02 +02:00
Henrik Rydgård
eb3faf5370
Fix some further static analysis warnings
2019-06-18 01:08:25 +02:00
Henrik Rydgård
a0dc85a9d7
Fix a bunch of inconsequential uninitialized variables
2019-06-18 00:18:40 +02:00
Unknown W. Brackets
a76d46dfa8
GPU: Correct Danganronpa hack.
...
Accidentally broken in #11553 .
2019-06-02 11:48:46 -07:00
Unknown W. Brackets
3ba6c1e42b
GLES: Use fragColor0 in GLSL 3.30 float path.
...
This should only happen when 32 bit ints are unsupported, which has been
reported for a few devices.
2019-05-27 00:36:48 -07:00
Henrik Rydgård
2f26297062
Clean up some more ifdefs
2019-05-10 23:25:57 +02:00
driver1998
5072584781
Fix neon headers for MSVC ARM64
...
MSVC uses arm64_neon.h for ARM64, arm_neon.h is ARM32 only.
2019-05-04 22:45:15 +08:00
Unknown W. Brackets
00d088ab58
GPU: Improve non dual source stencil replace.
...
If we're replacing with a constant FF, we can make it work more often.
Fixes #11249 .
2019-04-07 15:20:56 -07:00
Unknown W. Brackets
1199008641
TexCache: Align bufw properly even for VRAM.
...
Fixes minimap arrows in Manhunt 2 (see #9615.)
2019-03-24 19:21:08 -07:00
Unknown W. Brackets
c5b844cc98
GPU: Respect stencil write mask on clear.
...
Actually identified this for the softgpu in #11319 , but applying it for
RGBA is a problem in most renderers. Forgot to at least apply it to
stencil.
Fixes #11901 .
2019-03-16 19:42:18 -07:00
Henrik Rydgård
f316a65905
Revert "Temporary commit to get CalcCullRange logging into a buildbot build"
...
This reverts commit 786914690d
.
2019-03-13 11:39:08 +01:00
Henrik Rydgård
786914690d
Temporary commit to get CalcCullRange logging into a buildbot build
2019-03-13 11:37:52 +01:00
Unknown W. Brackets
271389b8e5
GLES: Fix stencil buffer upload at > 1x PSP.
...
Also fixes crashes on ATI. See #6627 .
2019-03-10 08:36:12 -07:00
Unknown W. Brackets
d7f2167898
GLES: Correct cull range offset in unbuffered.
2019-03-02 10:58:28 -08:00
Unknown W. Brackets
357e0316a0
GPU: Handle cull range properly drawing at offset.
...
Did the transformation backwards.
2019-03-02 10:48:01 -08:00
vit9696
27d216ea25
Fix postprocessing shader support on macOS
...
Check GL_ARB_shading_language_420pack availability, which SPIRV-Cross assumes
present by default, causing explicit binding location generation during shader
translation.
2019-02-22 06:34:37 +03:00
Unknown W. Brackets
af58577aff
GPU: Better typesafety for shader bits.
...
See 128c0ad
.
2019-02-16 06:54:56 -08:00
Unknown W. Brackets
b955ec70c9
GPU: Correct depth clamp range in range cull.
...
It was just wrong before, causing wrong culling when using a non-standard
viewport scale/center for depth.
Fixes #11701 , fixes #11781 .
2019-02-10 09:58:01 -08:00
Unknown W. Brackets
0f74a19979
Merge pull request #11777 from hrydgard/redefine-slow-framebuffer-effects-setting
...
Gate fewer effects behind "Disable slow framebuffer effects".
2019-02-09 05:14:11 +00:00
Henrik Rydgard
5aed2a2cee
Gate fewer effects behind "Disable slow framebuffer effects".
2019-02-08 15:02:31 +01:00
Henrik Rydgard
11c8450f19
Only gate really expensive block transfers behind the setting.
2019-02-08 14:50:47 +01:00
Henrik Rydgård
79d4b0f5a2
Check that allocations in SplineCommon succeed. Attempt at #11660 but not optimistic.
2019-01-06 13:51:17 +01:00
Henrik Rydgård
8e17caf351
Merge pull request #11694 from unknownbrackets/draw-bugs
...
Vulkan: Limit stencil workaround to Adreno 5xx
2018-12-26 20:46:09 +01:00
Unknown W. Brackets
e46701dee6
GLES: Specify glsl version precisely in depal.
...
Should prevent more of #11588 on vertex shaders, and may help Apple
devices some too.
2018-12-23 20:08:08 -08:00
Unknown W. Brackets
f8ce9b08ba
Vulkan: Limit stencil workaround to Adreno 5xx.
2018-12-23 14:11:57 -08:00
Unknown W. Brackets
1f594f3fb5
GPU: Track draw in shader manager.
...
With device restore etc. everywhere.
2018-12-23 12:55:37 -08:00
xebra
df4179fdb5
[spline/bezier]Remove unused stuff.
2018-12-24 04:06:12 +09:00
Henrik Rydgård
3ad168e1a9
Merge pull request #11674 from unknownbrackets/spline-cull
...
GPU: Fix curve breakage due to cull flipping
2018-12-16 22:38:26 +01:00
Unknown W. Brackets
8a7ec4fc19
GPU: Fix curve breakage due to cull flipping.
2018-12-16 13:00:36 -08:00
Henrik Rydgård
749163beca
Merge pull request #11667 from hrydgard/remove-truecolor
...
Remove outdated TrueColor setting.
2018-12-14 18:58:24 +01:00
Henrik Rydgard
56bc7b1d52
Remove outdated TrueColor setting.
2018-12-14 16:13:44 +01:00
Henrik Rydgard
3f8aec5147
Remove the "Disable stencil test" hack. Doesn't seem to serve much purpose anymore.
2018-12-14 13:54:03 +01:00
Henrik Rydgård
ab7bd6fc67
Merge pull request #11624 from unknownbrackets/shaderid
...
GPU: Ignore light params for shade mapping in shader id
2018-12-03 09:35:10 +01:00
Unknown W. Brackets
482487dd8d
GPU: Ignore light params for shade mapping.
...
They aren't part of the equation, so this simplifies and slightly reduces
number of shaders.
2018-12-02 14:11:19 -08:00
Unknown W. Brackets
9a7ee41191
Vulkan: Avoid OpKill workaround with no stencil.
...
It seems like depth gets messed up either way on discard, but behaves
sorta better without the write to depth.
2018-12-01 14:10:47 -08:00
Unknown W. Brackets
5932cbabc3
GPU: Avoid stencil emulation if possible.
...
This reduces use of replaceAlpha, and reduces use of more complicated
blend states. This simplifies fragment shaders a little.
2018-12-01 14:05:29 -08:00
Unknown W. Brackets
b1e68c653c
GPU: Avoid a missing virtual destructor warning.
2018-12-01 13:59:47 -08:00
Unknown W. Brackets
7b815af331
GPU: Force use of indexes on cull mode flip.
...
Since we flip in the index, it can't be pure in this case.
2018-11-30 07:22:28 -08:00
Unknown W. Brackets
1517d66d4e
GPU: Properly flip cull on simple triangle lists.
...
Fixes #11601 .
2018-11-29 19:03:38 -08:00
mrfixit2001
53e6fbadf4
fix ifdef vs if defined
2018-11-26 16:02:25 -05:00