Commit Graph

426 Commits

Author SHA1 Message Date
Unknown W. Brackets
cc4d0479bf Core: Assert debug stats remain positive. 2021-01-31 15:06:11 -08:00
Unknown W. Brackets
f2ad47512b Ge: Restore saved context when ending a list.
Otherwise another list queued by a Head push could use the wrong context
data.  See #13346.
2021-01-31 00:28:42 -08:00
Henrik Rydgård
e0aa187161 UWP: Fix dialog rendering (PPGe). 2020-12-20 12:11:02 +01:00
Henrik Rydgård
f3ebd6553d Turn off vertex range culling in bezier/spline calls.
When we do lower res tess than the real PSP, we cant trust the game to not cause range culling to kick in.

Fixes #11692
2020-12-13 16:04:16 +01:00
Henrik Rydgård
0c66f6c6d0 Assorted drive-by code cleanup 2020-12-13 00:20:47 +01:00
Henrik Rydgård
6310af25fa Get shader color write masking going on all backends. 2020-11-08 23:45:47 +01:00
Henrik Rydgård
d9ee06a60d Reorganize the DeviceLost code a little. FramebufferManagerCommon now sees it. 2020-11-07 10:51:54 +01:00
Henrik Rydgård
821817e6d4 Move the profiler to Common 2020-10-04 11:42:16 +02:00
Henrik Rydgård
536d881626 Very minor optimization (divisions by constants are faster unsigned) 2020-09-29 00:36:29 +02:00
Henrik Rydgård
054acf768c Don't cache time in a variable.
A little weirdness in the code that has stuck around for a long, long
time. It's really not necessary and mostly just confusing.
2020-09-24 23:52:43 +02:00
Henrik Rydgård
4cfafb4605 Some GPU code cleanup. Disable some unnecessary reporting. 2020-09-24 23:01:23 +02:00
Henrik Rydgård
b8ab04f53d Remove some reporting that's normally just the result of garbage-as-display-list-execution. 2020-09-22 21:57:51 +02:00
Henrik Rydgård
277333682f GPU debug stats: Show how many bytes of texture data we hash per frame 2020-09-20 22:09:29 +02:00
Henrik Rydgård
3093b9c7bf Share GPUS stats formatting code between the backends (easier to add new stats) 2020-09-20 22:09:25 +02:00
Henrik Rydgård
ccc0331279 Move timeutil to Common. (Experiment to see how much work it is to move these). 2020-08-15 20:53:08 +02:00
Unknown W. Brackets
b8342fb8ec SaveState: Rename ChunkFile files to Serialize.
Makes more sense and less weird than ChunkFileDoMap, etc.
2020-08-10 08:04:05 +00:00
Unknown W. Brackets
1dc5ee424b SaveState: Split out Do types to reduce headers. 2020-08-10 08:03:44 +00:00
Unknown W. Brackets
4b4e3432cd SaveState: Split Do() into a separate header. 2020-08-10 08:03:41 +00: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
b6e98374d3 UI: Fix consistency in vsync setting for iOS. 2020-07-24 21:05:28 -07:00
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ård
6560192d8e Support full VSync control in SDL OpenGL.
(Not yet Qt).

Forgot about iOS

SDL headless buildfix

Additional iOS buildfix
2020-07-19 12:07:16 +02:00
Henrik Rydgård
f0550a6ded Exclude a couple more commands from re-execution in ReapplyGfxState. See 2020-05-24 16:30:37 +02:00
Unknown W. Brackets
921b9b89d6 GPU: Don't reapply LoadClut each frame.
Definitely don't need to reapply this one.
2020-05-24 00:12:41 -07:00
Unknown W. Brackets
5507116d3f Ge: Check stack depth based on args struct size.
Matches tests against firmware.
2020-05-21 22:16:13 -07:00
Henrik Rydgård
52a3c2248d Move the check from #12908 into the firmware version check.
The original change took care of #11660, let's hope it stay fixed. This fixes
Toca (#12936).
2020-05-20 11:47:55 +02:00
Unknown W. Brackets
5a5af3871f GPU: Fix an overflow loading old save states. 2020-05-16 23:49:45 -07:00
sum2012
fbc2bf116d oop 2020-05-16 21:42:27 +08:00
sum2012
54ffe9b235 Fix "Improved compatibility of sceGeListEnQueue: verify that stackDepth < 256"
Fix #11660
based from
f9a116f78a
the varable name is differcult from jpcsp,so that I translate wrong.
2020-05-16 21:34:55 +08:00
Unknown W. Brackets
22e46b51c2 GPU: Centralize DestroyAllFBOs().
This cleans up the postshader update code.
2020-05-13 18:15:04 -07:00
sum2012
c7e58a79e3 Improved compatibility of sceGeListEnQueue: verify that stackDepth < 256
thanks gid15
2020-05-12 21:30:25 +08:00
Unknown W. Brackets
30ede8240c GPU: Move hw transform decision to draw engine. 2020-04-04 11:14:32 -07:00
Henrik Rydgård
a19ba6d472 New heuristic for getting rid of unnecessary "antialias-lines".
Should fix #12558, while keeping the other aa line issues also fixed.

Heuristic derived from discussions in #12558 and #6483.
2020-03-10 00:49:16 +01:00
Unknown W. Brackets
3ce9483d24 Headless: Prevent crash running graphics tests. 2020-03-08 11:10:16 -07:00
Unknown W. Brackets
3c1e8abcfe GPU: Centralize vsync interval logic.
We already do unthrottle checking here.
2020-02-29 22:27:00 -08:00
Unknown W. Brackets
c87d5a637b GPU: Forget pause signal on new list.
Otherwise, when the list gets executed again, we just pause it when it
finishes instead of letting it finish properly.
2019-07-07 13:10:28 -07:00
Unknown W. Brackets
8cd5a1bd93 GLES: Update proj matrix on viewport change.
This is necessary because, for large (or negative) viewports, we adjust it
to account for what GL cannot do.  Fixes #12115.
2019-06-23 16:47:44 -07:00
Henrik Rydgard
11c8450f19 Only gate really expensive block transfers behind the setting. 2019-02-08 14:50:47 +01:00
Unknown W. Brackets
8a7ec4fc19 GPU: Fix curve breakage due to cull flipping. 2018-12-16 13:00:36 -08:00
Unknown W. Brackets
d8c80afe59 GPU: Dirty stencil on stencil mask change.
Otherwise it doesn't always apply.
2018-12-01 14:00:32 -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
d3db565344 GPU: Maintain a bit more state in inner-prim loop.
Trying to make dumps properly trigger this optimization, but they still
sometimes get flattened and don't.
2018-11-29 19:28:10 -08:00
Unknown W. Brackets
1f898e3b70 GPU: Correctly flush on cull mode change.
Fixes #11593 and fixes #11591.
2018-11-25 16:56:39 -08:00
Henrik Rydgård
4942c52f73
Merge pull request #11172 from weihuoya/cullface
handle cullface, help to #10597
2018-11-23 09:56:17 +01:00
Unknown W. Brackets
6cba46bd62 GE Debugger: Fix handling for framebuf changes. 2018-11-17 08:56:32 -08:00
Unknown W. Brackets
d245e002c7 GE Debugger: Record block transfer too. 2018-11-17 08:55:54 -08:00
xebra
04708fe88a [spline/bezier]Unify SubmitSpline/Bezier. 2018-11-13 18:22:34 +09:00
Unknown W. Brackets
4996084665 GPU: Dirty frag shader on depth write.
We use this flag to determine whether we use discard, so it changes shader
ids.  Fixes the layering part of #11535.
2018-11-06 21:16:51 -08:00
xebra
405ead8d41 [spline/bezier]Get rid of duplication call of Flush(). 2018-10-07 23:54:28 +09:00
xebra
8ad38dfaae [spline/bezier]oops 2018-10-07 23:54:25 +09:00
xebra
d4a667397c [spline/bezier]Improve shader uniforms a bit. 2018-10-07 23:54:10 +09:00
xebra
3c0fb44f2e [spline/bezier]Improve hwtess to use cached weights. 2018-10-07 23:54:05 +09:00
Unknown W. Brackets
67058495f5 GPU: Dirty more correctly for cullrange params.
Was previously missing some settings which might convince us to use large
viewports, and more importantly some that would impact the depth settings
under certain settings.
2018-09-21 21:55:11 -07:00
Unknown W. Brackets
9859827645 Vulkan: Avoid depth clamp with clip range.
Vulkan clamps to the clip range, not the full range.  So when clipping, we
don't really want to clamp at all.  Unfortunately, when one side is
clipping, we can't do it exactly right.

But many games clip depth, like Dissidia.  Fixes #11260.
2018-09-17 21:43:29 -07:00
Unknown W. Brackets
ab3a466621 GLES: Implement vertex range culling.
Based on tests, skips triangles with any point outside the 4096x4096 box,
except when depth clamping would engage.
2018-09-17 07:27: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
6ee0612a10 Ge: Keep jump/call optim when fast memory on.
This gives a way to validate with fast memory off, and get less crashes.
2018-08-25 10:38:56 -07:00
Unknown W. Brackets
d13f76308d Ge: Avoid executing invalid pointers.
May help #3407 and related errors, as well as crashes and execution of
garbage.  This stops immediately on a bad pointer, rather than trying to
push through.
2018-08-25 10:32:32 -07:00
weihuoya
7383e90c19 handle cullface, help to #10597 2018-08-23 12:46:09 +08:00
Unknown W. Brackets
c32ffa1db0 GE Debugger: Rename depth clamp more places.
Was still showing clip enable in disasm.
2018-08-11 16:33:39 -07:00
Henrik Rydgård
ea1ef9277c Reduce the estimated transform cost of an additional light from 10 to 7 cycles, see #5530. 2018-07-15 12:13:25 +02:00
Unknown W. Brackets
2a13a66e18 GPU: Use hw tess only for hw transform.
This may be needed if we start using software for points/lines.
2018-06-28 19:47:33 -07:00
Henrik Rydgård
e98ea812f6
Merge pull request #10973 from weihuoya/cullmode
handle cull mode by indices, refer to issue #10172
2018-06-10 20:53:18 +02:00
Unknown W. Brackets
395ac32d63 Debugger: Run memory breakpoints on mobile. 2018-06-06 17:31:56 -07:00
Unknown W. Brackets
5b62c8afb8 D3D9: Implement flat shading via state. 2018-06-06 05:53:50 -07:00
zhang wei
51388ded22 cullmode fallback 2018-04-28 14:59:12 +08:00
zhang wei
3419197ee9 flush back cull mode 2018-04-27 21:49:43 +08:00
zhang wei
cfc353ee81 handle cull mode by indices, improve performance for GVGNP, refer to #10172 2018-04-27 16:33:35 +08:00
Henrik Rydgård
69bd427ca2 Shader depal: Implement bilinear filtering. 2018-04-13 14:19:05 +02:00
Henrik Rydgård
23052b5a6b Buildfix. 2018-04-10 16:28:06 +02:00
Henrik Rydgård
02ea4b5efa Inner interpreter safety check - in hw skinning mode, we need to flush if any part of the vertex format changes. 2018-04-10 14:37:32 +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
7de3edb46c Revert "Remove gstate_c.deferredVertTypeDirty"
This reverts commit fcdb816235.
2018-04-10 12:22:41 +02:00
Henrik Rydgård
0843e2cb98 Fix updating light constants when light type changes (we handle dir/pos lights differently). Fixes #10132 2018-03-25 00:21:03 +01:00
Unknown W. Brackets
1b8297de31 GPU: Count clears during frameskip.
This allows the GoW hack to still work during frameskip.
Fixes #10668.
2018-03-24 10:58:24 -07:00
Henrik Rydgård
ad42ec5473 Inner interpreter: Add support for the Gran Turismo hack. 2018-03-17 23:57:50 +01:00
Henrik Rydgård
50de13d3d7 Optimize the "inner interpreter" for God of War character drawing. Speeds the games up by 4% or so.
(measured on the title screen though..)
2018-03-05 12:50:51 +01:00
Henrik Rydgård
4cf5999bc8 Move the vertTypeID calculation out of DrawEngine. Need to shorten SubmitPrim as much as possible. 2018-03-05 12:28:10 +01:00
Henrik Rydgård
fcdb816235 Remove gstate_c.deferredVertTypeDirty 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
978f8e73e5 Remove checks that disabled software skinning if there was morph. 2018-03-05 00:03:47 +01:00
Henrik Rydgård
d3665a8482 Minor cleanup 2018-03-05 00:03:47 +01:00
Henrik Rydgård
b74634aa3b Turn off the inner interpreter when stepping in the GE debugger. Fix comment. 2018-03-02 07:06:58 +01:00
Henrik Rydgård
4130bcd416 inner interpreter: support skipping regular nops 2018-03-01 09:38:06 +01:00
Henrik Rydgård
ef3341e34f Don't use the inner interpreter when debug recording 2018-02-28 09:18:53 +01:00
Henrik Rydgård
292f116821 Execute_Prim: Add a smaller "inner interpreter" to avoid going back to the runloop during long sequences of PRIM commands.
Helps performance by a quite measurable 1-4% in several PRIM-heavy games.
2018-02-28 09:18:41 +01:00
Henrik Rydgård
0b4b2bfe9c Avoid the most common virtual call when possible. 2018-02-26 13:51:14 +01:00
Henrik Rydgård
64ec46e705 Unify FramebufferDirty()/FramebufferReallyDirty() for the hw backends 2018-02-26 11:58:17 +01:00
Henrik Rydgård
78467d6092 Unify FastRunLoop for the hardware backends. 2018-02-26 11:52:16 +01:00
Henrik Rydgård
6a2f45c2e1 Unify UpdateCmdInfo 2018-02-26 11:48:56 +01:00
Henrik Rydgård
8cef1f0f8d GPU: Unify command table (cmdInfo_) 2018-02-26 11:44:02 +01:00
Henrik Rydgård
967018b7f8 Unify Execute_LoadClut 2018-02-26 11:32:02 +01:00
Henrik Rydgård
c7f8f4c5ca Unify Execute_Prim 2018-02-26 11:22:27 +01:00
Unknown W. Brackets
544344f505 GPU: Improve some bezier logging.
Meant to do this when splines were changed.
2018-01-07 21:06:03 -08:00
Unknown W. Brackets
b94ca6e75e Vulkan: Use depth clamping, where available.
This fixes, for example, Shadow of Destiny, even without the hack.
2017-12-26 16:54:39 -08:00
Unknown W. Brackets
496b2bff35 Vulkan: Fix fragment depth rounding.
Was slightly off in the accurate depth path.
2017-12-26 16:19:11 -08:00
Unknown W. Brackets
93a712660c GPU: Avoid memory corruption on bone matrix > 96.
See #9574.  Seen in Zill O'll Infinite, thanks to Kitsu-neechan for
tracking this down.
2017-12-26 01:09:23 -08:00
Henrik Rydgård
fb74c9dfeb Clean up a small inconsistency 2017-12-07 21:09:09 +01:00
Henrik Rydgård
6eb8630526 Improve reporting for imm buffer exceeded. Reset the immCount_ every frame to avoid getting "stuck" permanently in case some garbage is executed.. 2017-12-01 20:01:13 +01:00
Unknown W. Brackets
a0e4b6ad0b Reporting: Improve bezier/spline morph/skin data.
Most of these are probably garbage?
2017-12-01 09:50:31 -08:00