Commit Graph

124 Commits

Author SHA1 Message Date
Henrik Rydgård
966144fa64 Bounds check writing to the index buffer when expanding lines/rects/points 2023-09-20 19:26:36 +02:00
Henrik Rydgård
3f2ef508c9 Make it easier to reason about space in the inds buffer by moving an offset instead of the pointer. 2023-09-20 19:23:24 +02:00
Henrik Rydgård
10f93875c6 Fix the semantics of DenseHashMap to be consistent even when inserting nulls 2023-09-11 12:07:18 +02:00
Henrik Rydgård
952e125c7e Break out rendering of "notices" from OnScreenDisplay. They can now also be used as views.
Use it for the new message in ControlMappingScreen, when you try to map
a combo when that's disabled. It'll have more uses.
2023-07-07 15:23:19 +02:00
Henrik Rydgård
186b0f105c Simplify the vertex cache ID handling 2023-06-12 13:16:13 +02:00
Henrik Rydgård
f16f879b41 Some renaming to follow the standard of appending _ to member vars 2023-05-23 18:00:50 +02:00
Henrik Rydgård
d51d1413a3 DrawEngineCommon: Rename decoded to decoded_ 2023-05-23 16:46:43 +02:00
Henrik Rydgård
16b243b007 Centralize allocation of vertex decode buffers 2023-04-24 12:11:58 +02:00
Unknown W. Brackets
15f087b71a D3D11: Correct equal clear check. 2023-02-26 23:59:48 -08:00
Henrik Rydgård
85e6b4e592 Increment numFlushes near the other stat increments
Might be better for the cache, heh.
2023-01-04 17:10:56 +01:00
Henrik Rydgård
f069de2dd2 Pass the vertex decoder into the vertex shader IDs generator
Instead of just the vertex type.

This will allow things like the vertex decoder supplying defaults, in
order to reduce the number of unique vertex shaders at the cost of
slightly larger vertex data.

This doesn't actually do that yet though, it's just a refactor that can
be done separately.

Part of #16567
2022-12-30 22:57:05 +01:00
Henrik Rydgård
67cba831dd Slightly more useful assert message in Hashmaps.h 2022-12-29 00:39:59 +01:00
Unknown W. Brackets
49f6c461ad Reporting: Fix some header includes.
Particularly in Common, avoid including Core/Reporting.h.
2022-12-27 14:58:20 -08:00
Unknown W. Brackets
e5dbdba638 GPU: Keep prevPrim_ set on flush.
For continuing previous verts, see #16612.  We still don't handle these
quite accurately (outside software rendering), but this should be better.
2022-12-18 07:14:19 -08:00
Henrik Rydgård
ee19db091f Add accessor for UseFlags 2022-12-13 18:27:45 +01:00
Unknown W. Brackets
9cfcbc46e6 Global: Cleanup initialization/pointer checks.
Cleaning up a lot of cases of uninitialized data, unchecked return values
for failures, and similar.
2022-12-10 21:13:36 -08:00
Henrik Rydgård
331d024a8c Add a flags parameter to InvalidateCachedState and rename it Invalidate.
Also rename the old InvalidationFlags enum to InvalidateCallbackFlags.
2022-12-01 19:15:38 +01:00
Henrik Rydgård
3dd45c6561 Can't forget the texture in the callback, breaks texture-from-framebuffer-copy.
Was probably redundant anyway.
2022-11-24 11:02:21 +01:00
Henrik Rydgård
70d1d8fa07 Replace the "GetCurrentStepId"-based state invalidation with callbacks 2022-11-24 10:52:42 +01:00
Unknown W. Brackets
70c3205564 GPU: Correct equal depth checks. 2022-11-09 20:34:29 -08:00
Unknown W. Brackets
1c0a37f252 GPU: Correct vertex decoder in software transform.
It was meant to flip to skin in decode.
2022-11-09 07:07:39 -08:00
Unknown W. Brackets
3333f2a5aa GPU: Avoid clears for non-simple depth values.
Some drivers don't round depth the same way for a clear vs for drawing,
which can cause mismatches.  We only do this if we see equals-style depth
comparison funcs used in drawing.
2022-11-08 20:06:08 -08:00
Unknown W. Brackets
3de2557ecb GPU: Always skin in decode for software transform. 2022-11-06 08:55:07 -08:00
Unknown W. Brackets
6c36f03a0d GPU: Purify vertTypeIsSkinningEnabled(). 2022-11-06 08:40:54 -08:00
Henrik Rydgård
daca0b2109 Rename gstate_c.Supports to gstate_c.Use 2022-10-17 08:46:37 +02:00
Unknown W. Brackets
b9b59f7806 GPU: Mask away unused bits in framebuf/zbuf ptr.
Lower 4 bits are ignored during rendering, and mirrors (even even the 8
bit at the top) are ignored.
2022-10-02 20:44:35 -07:00
Henrik Rydgård
b84cda2876 Plumb the computed pipeline state into ComputeFragmentShaderID. 2022-09-02 22:16:57 +02:00
Unknown W. Brackets
86e754fb4a D3D11: Correct viewport offset sign handling. 2022-08-22 21:29:49 -07:00
Unknown W. Brackets
b5a4843c1f GPU: Purify ConvertViewportAndScissor().
This makes it harder to misuse.  See #15856.
2022-08-20 14:21:11 -07:00
Unknown W. Brackets
d61619db47 GPU: Dirty params when converting viewport state.
This flag will be false when we convert next time, so parameters won't get
updated as expected.
2022-08-20 14:03:24 -07:00
Henrik Rydgård
12db0e52d4 Fix deferred-depth for bezier/spline. Move updating of last_frame_depth_render to GPUCommon. 2022-08-20 08:29:33 +02:00
Henrik Rydgård
08e2d951b4 State handling reordering in D3D11 and D3D9 backends. 2022-08-05 23:07:01 +02:00
Henrik Rydgård
3331654396 Fix Macross glitches. 2022-08-01 00:19:47 +02:00
Henrik Rydgård
7be86264d0 Move framebufFormat to gstate_c, so we can override it 2022-04-30 18:16:09 +02:00
Unknown W. Brackets
2718e81c0e GPU: Expand lines to triangles. 2021-10-31 14:46:46 -07:00
Unknown W. Brackets
b3a8e013f6 GPU: Expand points into triangles for higher res. 2021-10-31 13:06:06 -07:00
Unknown W. Brackets
5128480d74 GPU: Implement cull behavior in sw transform. 2021-10-30 21:04:16 -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
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
f35c7d04bd GPU: Update viewport params before sw transform. 2021-10-30 18:19:16 -07:00
Unknown W. Brackets
3730460bc5 GPU: Move swtransform flippedY to params. 2021-10-30 18:17:22 -07:00
Unknown W. Brackets
f32f89dd90 Global: Remove some unused variables. 2021-02-15 11:59:45 -08:00
Unknown W. Brackets
a73c15babc GPU: Correct shader gen with weights as floats.
For now, this supports the option.  We should probably just move to
everything being floats, but we already prefer software skinning.

Fixes #13903.
2021-01-10 08:52:28 -08: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
b6efc65c94 Set the texture dirty flags when binding a new framebuffer. 2020-09-21 08:56:58 +02:00
Unknown W. Brackets
15c25be42b GPU: Switch vertex/lookup hashes to XXH3.
This is faster pretty much everywhere.
2020-08-27 20:37:49 -07: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
Henrik Rydgård
b43698a13d Remove most instances of base/logging.h from Common, Core, GPU, more 2020-08-15 19:08:44 +02: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
6009bf7b74
Merge pull request #12952 from unknownbrackets/vulkan-safesize
Vulkan: Match safe size behavior on all backends
2020-07-13 15:59:09 +02:00