Commit Graph
72 Commits
Author SHA1 Message Date
Unknown W. Brackets 7edfdd2cdd GPU: Rename pos/uv w for clarity. 2021-10-30 21:04:00 -07:00
Unknown W. Brackets b4bc4c5c78 GPU: Remove buggy rectangle culling.
Transformed rectangles are uncommon, but culling them properly is a bit
trickier than this, so remove for now.
2021-10-30 18:26:23 -07:00
Unknown W. Brackets e688bb2cdf GPU: Correct software transform projection.
Now reading the new fog value.
2021-10-30 18:23:58 -07:00
Unknown W. Brackets 4ec75de0e7 GPU: Add fog separately for swtransform verts.
At this point, still being processed wrong, this just changes the
attribute structure.
2021-10-30 18:22:54 -07:00
Unknown W. Brackets 4e5ce403b5 GPU: Process proj matrix in sw transform.
Will need this to properly handle culling and clipping in software
transform.

Temporarily breaks display rotation handling (Vulkan/UWP.)
2021-10-30 18:22:53 -07:00
Unknown W. Brackets 159eab5141 GPU: Set projection matrix per backend.
There's a bit of variance, so this keeps the central code clean.
2021-10-30 18:20:36 -07:00
Unknown W. Brackets 3730460bc5 GPU: Move swtransform flippedY to params. 2021-10-30 18:17:22 -07:00
Unknown W. Brackets 6252241c0f GPU: Verify throughmode for clears/rects. 2021-10-12 20:34:41 -07:00
Unknown W. Brackets 4ac36cb810 GPU: Cull rectangles more when depth clamp off.
If any vert is outside Z, it's culled when not clamping/clipping.
2021-10-12 20:34:41 -07:00
Unknown W. Brackets 5315c404c5 GPU: Cull rectangles outside valid Z.
Both TL and BR must be outside in the same direction to be culled when
depth clamp is enabled.
2021-10-12 20:34:41 -07:00
Unknown W. Brackets 2f63f9999d GPU: Normalize 0 to 1 always in software lighting.
See #14167.  This seems to be consistent.
2021-02-27 23:51:45 -08:00
Unknown W. Brackets 60b354a661 GPU: Fix safe size checks when rect offscreen. 2021-01-17 19:57:32 -08:00
Henrik Rydgård 0e3a84b4a8 Move most GPU things to Common.
It works after the move, on Windows and Android at least.

Deletes the D3DX9 shader compiler loader, which was not used.
2020-10-04 23:39:02 +02:00
Henrik Rydgård 9e41fafd0d Move math and some file and data conversion files out from native to Common.
Buildfixing

Move some file util files

Buildfix

Move KeyMap.cpp/h to Core where they belong better.

libretro buildfix attempt

Move ini_file

More buildfixes
2020-10-04 09:12:46 +02:00
Unknown W. Brackets 5ade93a091 GPU: Properly detect clears.
The check was reversed before, oops.  Detected masked draws.

Must've gotten this backwards debugging Mana Khemia.
2020-08-23 08:23:39 -07:00
Henrik Rydgård d57edfbdac Rename FramebufferCommon.cpp/h to FramebufferManagerCommon.cpp/h for consistency 2020-08-03 23:17:22 +02:00
Unknown W. Brackets 1432cc9431 GPU: Try a bit harder to determine safe size. 2020-05-23 00:54:22 -07:00
Unknown W. Brackets ea1f0a1195 Vulkan: Match safe size behavior on all backends.
Before, we would not mark a safe size for some Vulkan clears where depth
was not cleared, deviating from other backends.  We also never detected
that on PowerVR.  This makes things more consistent.
2020-05-23 00:25:39 -07: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 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 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
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
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
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 cd6783fa0d GPU: Use provoking normal for lighting with flat.
This might interact strangely with skinning of texture matrix mapping, but
they're not likely to be used together.
2018-11-22 17:52:14 -08:00
Unknown W. Brackets b2d60cb807 SoftGPU: Cleanup lighting code a bit.
Avoid using Length() when Length2() is enough, simplify some things.
2018-11-18 07:28:03 -08:00
Unknown W. Brackets 0c5c776bb9 GPU: Correct shade mapping with 0,0,0 light pos.
May need to audit more normalize() usage, if it's consistent in other
places.
2018-11-17 18:33:07 -08:00
Unknown W. Brackets 6600896312 GPU: Fix shade mapping in soft transform.
Was using invalid values when lighting was off.
2018-11-17 18:05:32 -08: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 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
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 40db61a680 Remove further remains of hardware skinning. Fixes #10661 2018-03-05 00:03:47 +01:00
Unknown W. Brackets f9750dd137 Display: Avoid limiting FPS without a clear.
A bit of a dirty heuristic to avoid the slowdown in #8538.
2017-12-26 19:37:40 -08:00
Henrik Rydgård 734d9c494c Fix bug in Vulkan non-buffered where clears could extend outside the frame, since Vulkan clears do not respect scissors. 2017-12-02 11:05:10 +01:00
Henrik Rydgård 3e011238c5 Fix minor discrepancy in shader ID calculation, I don't think this will fix anything though. Bumping shader cache version and doing minor cleanup too. 2017-11-30 22:44:39 +01:00
Henrik Rydgård 2c86217552 Cleanup GPU vendor detection a bit, use it to avoid the issue mentioned in #9545 2017-11-21 16:19:28 +01:00
Henrik Rydgård 17d624d311 Ditch a silly vertex count limit that only makes sense for GLES, so move it there. 2017-11-10 15:59:36 +01:00
Henrik Rydgård 9e35144b96 Remove/deprecate GPU tick sync 2017-11-05 23:21:53 +01:00
Henrik Rydgård 4f2fb10347 Further D3D11 fixes 2017-02-12 16:14:14 +01:00
Henrik Rydgard 5ee3b534ed More D3D11 improvements 2017-02-10 10:26:18 +01:00
Henrik Rydgard 9d7983eee8 Remove the ability to turn off prescaleUV entirely. It's simply better to do it in the vertex decoder. 2016-12-20 13:27:44 +01:00
Unknown W. Brackets 915ff42a9a Detect clears even when outside scissor.
Verified that scissor affects clears as well.  This allows a clear to be
detected in Katamari Damacy.
2016-05-19 20:37:29 -07:00
Unknown W. Brackets 2461a849f9 Correct some warnings reported by clang. 2016-03-20 23:13:28 -07:00
Unknown W. BracketsandHenrik Rydgard f289e8485d Vulkan: Make sure depth==stencil when clearing.
We have to clear both at the same time.  I think it makes sense to
consider this part of the "separate alpha" flag, since alpha has to match
both color and depth.
2016-03-20 19:31:02 +01:00
Unknown W. BracketsandHenrik Rydgard 8efbcf8d42 Use draws for alpha/stencil only clear in Vulkan. 2016-03-20 19:31:02 +01:00
Henrik RydgardandUnknown W. Brackets 9d8d810395 Clear detection: Don't need to check the even vertices, as the odd vertices are the ones used for color.
This lets us detect and replace cube.elf's clear, and probably others.
2016-03-06 11:36:32 -08:00
Unknown W. Brackets d1b3768e49 Use a common func everywhere for float depth vals. 2016-01-18 19:29:45 -08:00
Unknown W. Brackets 7bfe100b0f Fix some unused variable warnings.
The CheckAlpha one looks like it will matter.
2015-11-25 16:11:53 -08:00