Commit graph

1160 commits

Author SHA1 Message Date
Henrik Rydgård
a349e2b85b
Merge pull request #16481 from unknownbrackets/gedebugger
Cleanup some GE debugger logspam, small texture proj optimization
2022-12-02 11:10:49 +01:00
Unknown W. Brackets
33abbca464 softgpu: Optimize out texture proj for UVs.
Seen in NFS Most Wanted 5-1-0.
2022-12-01 23:13:20 -08:00
Unknown W. Brackets
c5a98e62dd softgpu: Cull verts outside post-viewport Z.
Shouldn't have removed this before, points are still culled when depth
clamp is off and throughmode is off.

Fixes Crazy Taxi graphics glitches.
2022-12-01 21:57:48 -08:00
Unknown W. Brackets
a1f6a40d10 softgpu: Interpolate Z for 3D lines.
Important for Me & My Katamari, see #16131.
2022-12-01 14:39:19 -08:00
Henrik Rydgård
e6f0f84a45 SSE optimize Float4ToUint8x4, some uses 2022-12-01 16:32:23 +01:00
Unknown W. Brackets
73489349cc GPU: Oops, simplify an expression. 2022-12-01 01:34:48 -08:00
Unknown W. Brackets
cbe96d3774 GPU: Use common block transfer logic in all cases. 2022-12-01 01:34:16 -08:00
Unknown W. Brackets
3589c1e826 softgpu: Handle block transfer VRAM wrapping.
Note: mirrors still act as mirrors, swizzle and all.
2022-12-01 01:31:44 -08:00
Unknown W. Brackets
1c5f0d575c softgpu: Improve meminfo detail on block transfer.
Gaps are useful to understand.
2022-12-01 01:31:44 -08:00
Unknown W. Brackets
68515aaee2 softgpu: Account for width!=stride in xfer checks. 2022-12-01 01:31:43 -08:00
Unknown W. Brackets
2adc18cfba softgpu: Correct src/dst overlap in block transfer.
If dest is inside src, it seems to consistently copy in blocks of 64
bytes.
2022-12-01 01:31:43 -08:00
Unknown W. Brackets
dc962094f8 softgpu: Correctly fix inversions, matching tests.
Inversions are allowed just fine, but if clipping results in coordinates
outside range, the triangle should be culled.  Fixes more wanted
inversions.
2022-11-30 23:20:39 -08:00
Henrik Rydgård
3246baec4b SoftGPU: Range check block copies.
Needs testing to verify if we should copy zeroes instead if the src range is
partial, etc, quite a few possible edge cases.

Though on its own, this probably fixes the crash in #16427.

Still don't understand why that one has issues in hardware renderers
though since they do bounds-check the copies.
2022-11-28 10:39:46 +01:00
Unknown W. Brackets
909f3feaea softgpu: Allow inversions when w >= -1.0.
This seems to match desired cases well, see #16131.  Likely still
inaccurate to what hardware actually does.
2022-11-26 12:11:56 -08:00
Henrik Rydgård
cbfa4bfc8e Centralize ClearCacheNextFrame 2022-11-21 18:13:13 +01:00
Henrik Rydgård
d73196c7d6 Split up the GPU config change notifications 2022-11-21 15:14:20 +01:00
Henrik Rydgård
7596713059 Refactor: Split up updating the display and render size. 2022-11-21 14:35:12 +01:00
Henrik Rydgård
f67ef7ab99
Merge pull request #16404 from hrydgard/transparent-pause-screen
Make the pause screen "transparent"
2022-11-21 14:27:59 +01:00
Henrik Rydgård
fd110ef6a9
Merge pull request #16408 from unknownbrackets/jit-wx
softgpu: Fix compile hazard while running
2022-11-20 21:42:10 +01:00
Unknown W. Brackets
4d06400548 softgpu: Fix compile hazard while running.
This prevents any clearing of cache while other threads may be using
previously cached funcs, and avoids wx exclusive hazards.
2022-11-20 12:04:02 -08:00
Henrik Rydgård
250ea5e592
Merge pull request #16407 from unknownbrackets/jit-wx
In jits, protect and unprotect using better estimates
2022-11-20 20:39:04 +01:00
Unknown W. Brackets
ce51942508 softgpu: Correct WX-exclusive platform hazards.
Should mainly affect BSD at this point.
2022-11-20 10:55:35 -08:00
Unknown W. Brackets
b2798c7ada jit: Add more reasonable estimates for RX protect. 2022-11-20 10:55:35 -08:00
Henrik Rydgård
37ec31dedd Fix resizing issue. Took some refactoring. 2022-11-20 12:57:32 +01:00
Henrik Rydgård
a3874ebcef
Merge pull request #16402 from unknownbrackets/softgpu-inversion
softgpu: Throw away all inverted polygons
2022-11-20 09:55:49 +01:00
Unknown W. Brackets
71b4407889 softgpu: Throw away all inverted polygons.
This is actually incorrect in some cases, but there are a number of games
affected by inversions, and they're practically always undesired.
2022-11-19 20:30:49 -08:00
Unknown W. Brackets
7e7eabf86a softgpu: Use threads on self-render if safe.
Some games, such as Prince of Persia, self-render 1:1 to colorize, rather
than to scale or blur.  We can still use threads in these cases.
2022-11-13 12:34:31 -08:00
Unknown W. Brackets
d8716b5d90 softgpu: Fix off-by-one rendering after half-pixel.
If the X is after a half-pixel offset, the first pixel we draw is the next
one.  This wasn't being accounted for properly in one place.
2022-11-13 10:22:09 -08:00
Unknown W. Brackets
a66056217f softgpu: Avoid splitting rectangles for fog.
If the fog factor would result in the same amount of fog, we're just
adding more work for no reason.
2022-11-13 09:23:06 -08:00
Unknown W. Brackets
21064edfca softgpu: Correct tex on fogged rectangles. 2022-11-13 09:17:29 -08:00
Unknown W. Brackets
7880eb15c1 softgpu: Always use software skinning.
There's only software skinning, after all.
2022-11-06 08:44:22 -08:00
Unknown W. Brackets
6c36f03a0d GPU: Purify vertTypeIsSkinningEnabled(). 2022-11-06 08:40:54 -08:00
Unknown W. Brackets
66472c39ce GPU: Use skinned position always in bounding check.
Meanwhile, move to a flag on decoder options instead of global check.
2022-11-06 08:23:31 -08:00
Unknown W. Brackets
a5d3af9cb0 GPU: Cleanup GetVertTypeID() usage. 2022-11-06 08:01:57 -08:00
Unknown W. Brackets
1e1c75d552 GE Debugger: Correct UV display with prescale.
Sometimes these weren't flushed yet, and it made the texture preview and
vertices confusing and wrong (using old factors, not just no factors.)
2022-10-25 22:14:16 -07:00
Unknown W. Brackets
79b1d1d35f
softgpu: Better approximate slope mip level mode (#16276)
* samplerjit: Remove unused x/y parameters.

Still need to tune the accuracy of filtering, but those were not the
right way.

* softgpu: Better approximate slope mip level mode.

This isn't exactly right, but it's closer.

* softgpu: Calculate auto from largest difference.

Direction shouldn't matter.
2022-10-23 10:15:43 +02:00
Unknown W. Brackets
813bfded92
x86jit: Correct vh2f NAN handling (#16275)
* x86jit: Correct vh2f NAN handling.

Allows another test to pass.

* x86jit: Reuse MAccessibleDisp().
2022-10-23 10:09:29 +02:00
Unknown W. Brackets
6945604492 softgpu: Multiply prev normal by world matrix.
Even when it's not in the vertex data, we still must multiply by the world
matrix.  Fixes some lighting issues in Nayuta no Kiseki.
2022-10-20 23:14:54 -07:00
Unknown W. Brackets
d6a59be012 softgpu: Respect negate normal flag without norm.
Per tests, Z is still negated even when using the previous normal value.
2022-10-20 23:09:48 -07:00
Unknown W. Brackets
7eb7bd5141 softgpu: Correct linear interp for uneven positions.
Can't round to the pixel when calculating the S/T deltas.
This fixes issues in Wipeout (#16131) and Call of Duty bloom.
2022-10-16 18:57:55 -07:00
Unknown W. Brackets
9d6de98ed9 softgpu: Correct drawing outside TL of rectangle.
If the start coordinate was something like 51.75, we were incorrectly
drawing to 51.  This can be seen in the Metal Slug intro (#15755.)
2022-10-16 18:46:38 -07:00
Unknown W. Brackets
1931fa2f5f softgpu: Make triangle fan rect detection generic. 2022-10-16 16:01:09 -07:00
Unknown W. Brackets
d33986a5ad softgpu: Cull a triangle with all negative w.
Per tests, this seems to happen but only when all points are below zero.
2022-10-15 11:49:28 -07:00
Unknown W. Brackets
4f5e821ce2 softgpu: Fix crash on screenshot w/o display. 2022-10-15 11:49:05 -07:00
Unknown W. Brackets
416265431b GE Debugger: Display if tex is framebuf.
Rather than guessing based on size, let's show explicitly.
2022-10-10 22:35:42 -07:00
Unknown W. Brackets
55d5dc3834 GPU: Rename readback and buffer write operations.
Avoid download/upload and pack, which don't have clear directions.
2022-10-09 13:49:41 -07:00
Henrik Rydgård
b333695cd1
Merge pull request #16160 from unknownbrackets/vram-mirrors
GPU: Use flags to fix triggered upload/download
2022-10-04 08:45:06 +02:00
Unknown W. Brackets
a1efed31b9 GPU: Use flags to fix triggered upload/download.
No longer using mirror hacks.
2022-10-03 20:17:25 -07:00
Henrik Rydgård
ed3cd1dc26
Merge pull request #16150 from unknownbrackets/vram-mirrors
GPU: Mask away unused bits in framebuf/zbuf ptr, cleanup
2022-10-03 11:56:24 +02:00
Herman Semenov
29b87e0c0b
Merge branch 'master' into master 2022-10-03 07:49:13 +00:00