Commit Graph

971 Commits

Author SHA1 Message Date
xebra
41d6c3cf3a [spline/bezier]Move whole tessellation logic in the shaders into a subroutine. 2018-10-07 23:54:08 +09:00
xebra
3d07bca010 [spline/bezier]Fix spline weights calculation and get rid of using next patch position in hwtess.
# Conflicts:
#	GPU/Directx9/VertexShaderGeneratorDX9.cpp
#	GPU/GLES/VertexShaderGeneratorGLES.cpp
#	GPU/Vulkan/VertexShaderGeneratorVulkan.cpp
2018-10-07 23:54:07 +09:00
xebra
a48a5b32f0 [spline/bezier]Unify hardware tessellation of bezier and spline. 2018-10-07 23:54:06 +09:00
xebra
3c0fb44f2e [spline/bezier]Improve hwtess to use cached weights. 2018-10-07 23:54:05 +09:00
xebra
966ff32ee7 [spline/bezier]Improve the logic of copying control-points. 2018-10-07 23:53:36 +09:00
Unknown W. Brackets
26cd98cd7e GPU: Fix a shader unit typo. 2018-09-24 23:05:32 -07:00
Unknown W. Brackets
52baec21a8 GPU: Refactor cull range calculation together. 2018-09-17 22:27:25 -07:00
Unknown W. Brackets
44ba31fbc6 Vulkan: Implement verex range culling.
Also D3D11, since they are very similar.
2018-09-17 07:27:26 -07:00
Unknown W. Brackets
639a3f406d D3D9: Implement vertex range culling. 2018-09-17 07:27:26 -07:00
Unknown W. Brackets
797327eecd GPU: Handle bad fog params as large signed vals.
From tests, it seems they're just treated as valid exponents.

Using 65535 since that's the range of depth, can't think of a game using a
larger value for a fog parameter, probably never even this large.
2018-09-10 00:28:02 -07:00
Unknown W. Brackets
022670d882 GPU: Apply fog before color test.
Hardware tests confirm the fog result is what's color tested.
2018-09-09 23:59:48 -07:00
Unknown W. Brackets
8eb011c22d GPU: Clamp after color doubling.
This is needed for blending to be correct - it blends a clamped value.
2018-09-09 20:27:39 -07:00
Unknown W. Brackets
703181607e GPU: Apply color test after doubling. 2018-09-09 20:09:48 -07:00
Unknown W. Brackets
016d6ba764 D3D11: Fix pow(0, 0) lighting handling.
This was previously fixed in GLES.
2018-09-09 10:25:58 -07:00
Unknown W. Brackets
332788d0b5 GPU: Clean up some shader id flag usage. 2018-09-09 09:59:42 -07:00
Unknown W. Brackets
b05f75f667 D3D9: Set alpha mask reference in uniforms.
Just so we don't have surprises later if we implement masking.
2018-09-08 20:05:19 -07:00
Unknown W. Brackets
4dafb163a3 D3D11: Split color test out by component.
Not working correctly together.  See #10629.
2018-09-08 20:03:26 -07:00
Unknown W. Brackets
a4c0640f01 GE Debugger: Factor out host calls some.
Moving more of this to cross platform for the web debugger.
2018-09-01 08:32:03 -07:00
Unknown W. Brackets
16d7a80980 GPU: Clear alpha more consistently from 565.
Before, the backends all did different things.  Now they are more in sync,
but Vulkan still behaves slightly differently.

Fixes #11326.
2018-08-30 21:00:21 -07:00
Unknown W. Brackets
9bac603976 GPU: Use HW transform for flat spline/bezier.
We can control the provoking vertex here, but it's less likely to matter.
2018-06-28 19:30:20 -07:00
xebra
4fab160e19 [spline/bezier]Modify D3D11 hwtess texture buffer to structured shader buffer. 2018-06-27 01:10:36 +09:00
Unknown W. Brackets
95f270778e Core: Allow toggle between 2 custom speeds.
In addition to virtual keys for each speed separately.
2018-06-23 10:59:18 -07:00
Unknown W. Brackets
b4496f1975 Core: Move config enums to separate file.
These are a bit strewn about and there are constants that aren't
consistently used, which just adds confusion.
2018-06-23 10:59:18 -07:00
Unknown W. Brackets
d1fa9b97a3 GPU: Remove some unused fields. 2018-06-17 11:26:09 -07:00
Henrik Rydgård
6bf6490c2f
Merge pull request #11128 from unknownbrackets/gpu-minor
Minor framebuffer code cleanup
2018-06-06 22:28:35 +02:00
Henrik Rydgård
03175b74ef
Merge pull request #10957 from unknownbrackets/depal-bounds2
GPU: Dirty tex when clearing or rendering to self
2018-06-06 22:22:01 +02:00
Unknown W. Brackets
ad0b8435ca D3D9: Reuse BGRA conversion code.
Also, couldn't have been right to skip it when the pointers equal, not
sure if that case was ever being hit.
2018-06-06 05:56:30 -07:00
Unknown W. Brackets
2ab1552f2d D3D9: Use an unordered_map for offscreen.
Also cleanup.  Mostly just for consistent usage.
2018-06-06 05:56:30 -07:00
Unknown W. Brackets
2606365ba4 GPU: Use software transform for flat shading.
Except on GLES where it works fine with the default provoking index.

This fixes #10969 so that it works everywhere.
2018-06-06 05:53:50 -07:00
Unknown W. Brackets
dca159c47e GPU: Correct sw flat shading color on Vulkan/D3D.
It was only correct on GLES before.  This only fixes software transform.
2018-06-06 05:53:50 -07:00
Unknown W. Brackets
5b62c8afb8 D3D9: Implement flat shading via state. 2018-06-06 05:53:50 -07:00
Unknown W. Brackets
b845278d7d D3D11: Implement flat shading in shader. 2018-06-06 05:53:49 -07:00
Unknown W. Brackets
61fc1cdcfb GPU: Dirty tex when clearing or rendering to self.
This way if we're blitting, we'll re-blit.
2018-06-06 05:52:49 -07:00
Henrik Rydgård
c1d113e0e9 When creating temp framebuffers for download, size them using bufferWidth/Height instead of width/height.
Or maybe we should make sure to only download within the width/height by
adding more clamps at the beginning of ReadFramebufferToMemory but seems
more dangerous.

Plus some minor things.

Should help #11113
2018-06-01 21:16:07 +02:00
Unknown W. Brackets
8d07e6d985 GPU: Prevent temp FBOs from overwriting each other.
Sometimes we'd use two temp FBOs in the same draw (e.g. shader blending +
depal.)  This could cause the same temp FBO to get used for two purposes,
causing weird behavior.
2018-05-06 08:57:44 -07:00
Unknown W. Brackets
3eb0450998 Depal: Reapply texture when bounds change.
Since we need each slice of the texture when we use bounds to reduce the
size.  Fixes #10951.
2018-04-22 10:43:46 -07:00
Henrik Rydgård
163350bbcd Vulkan/D3D11: Make some space in the base uniform buffer by consolidating the spline parameters into one variable. 2018-04-13 08:58:05 +02:00
Henrik Rydgård
36fd2711d6 Revert "Remove further remains of hardware skinning."
This reverts commit 40db61a680.
2018-04-10 12:22:41 +02:00
Henrik Rydgård
8953d7ff73 Revert "Comment fixes, reindentation."
This reverts commit 6fa9fcefb2.
2018-04-10 12:14:23 +02:00
Henrik Rydgård
6a90b8fbb4 Revert "Further cleanup after the removal of hardware skinning."
This reverts commit f086a0915f.

Increment the shader cache version. Restore some more.
2018-04-10 11:38:02 +02:00
Henrik Rydgård
69309aa400 Revert "Remove some remains of software skinning"
This reverts commit 2d33d526b8.
2018-04-10 11:21:56 +02:00
Henrik Rydgård
f967e206b8 Remove the last remains of the idea that textures can be efficiently updated instead of recreated. Accidentally fixes #10697 somehow.
Also this is good for terminology, no more confusion with the texture
replacement facility :)
2018-03-25 10:50:37 +02:00
Henrik Rydgård
2d33d526b8 Remove some remains of software skinning 2018-03-16 20:38:05 +01:00
Henrik Rydgård
7a8310ae5e Tiny unification of code. Save the GL shader cache a bit less often. 2018-03-13 13:35:58 +01:00
Henrik Rydgård
d8651fd85b Combine the lightAngle and spotCoef float uniforms into one float2. Saves 64 bytes from the light uniform buffer, making it an even 512.
Probably a very small perf optimization.
2018-03-12 11:17:45 +01:00
Henrik Rydgård
8ff5704fbf Fix indentation mistake, minor cleanup. 2018-03-05 00:03:47 +01:00
Henrik Rydgård
f086a0915f Further cleanup after the removal of hardware skinning. 2018-03-05 00:03:47 +01:00
Henrik Rydgård
6fa9fcefb2 Comment fixes, reindentation. 2018-03-05 00:03:47 +01:00
Henrik Rydgård
40db61a680 Remove further remains of hardware skinning. Fixes #10661 2018-03-05 00:03:47 +01:00
Henrik Rydgård
c7dcb7c365 D3D9/D3D11: Fix GPU feature detection. Enforce accurate depth on nVidia as well, they no longer seem to support reverse depth so it's needed as a workaround. Fixes #10655 2018-03-01 09:38:06 +01:00