Commit Graph

7854 Commits

Author SHA1 Message Date
Henrik Rydgård
7c5fc3ccb5 Reorder the GPU USE flags a bit 2022-10-17 19:55:11 +02:00
Lubos
1a6180583e OpenXR - Reduce uniform calls 2022-10-17 19:00:38 +02:00
Henrik Rydgård
123311b0c7
Merge pull request #16241 from unknownbrackets/softgpu-rect
softgpu: Correct linear interp for uneven positions
2022-10-17 09:29:31 +02:00
Henrik Rydgård
30aa07b156 Two more renames to make things read better 2022-10-17 08:47:05 +02:00
Henrik Rydgård
9b8a5d1db3 Rename GPU_SUPPORTS_ to GPU_USE_ 2022-10-17 08:47:03 +02:00
Henrik Rydgård
daca0b2109 Rename gstate_c.Supports to gstate_c.Use 2022-10-17 08:46:37 +02:00
Unknown W. Brackets
162b27e136 GPU: Replace logic ops with blend for simple cases.
So that alpha/stencil are handled correctly.
2022-10-16 22:24:43 -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
Henrik Rydgård
a605366254 Add ShaderId utility function to be used for some sanity checking. 2022-10-13 22:39:47 +02:00
Henrik Rydgård
4d1da5859c Add simple way to add debug annotation in the middle of the command stream. Vulkan-only. 2022-10-13 22:39:44 +02:00
Unknown W. Brackets
2f9392083a GPU: Respect stencil state in shader blend. 2022-10-11 22:26:31 -07:00
Henrik Rydgård
e0e29a1556
Merge pull request #16197 from hrydgard/more-uniform-optimization
More uniform optimization, fixes
2022-10-12 01:00:27 +02:00
Henrik Rydgård
d30d8bf35c Removes the option, autodetect instead - only enable if the GPU doesn't support bitwise ops. 2022-10-11 16:09:57 +02:00
Henrik Rydgård
901f698a10
Merge pull request #16201 from unknownbrackets/gedebugger
GE Debugger: Normalize framebuffer texture preview
2022-10-11 11:33:19 +02:00
Henrik Rydgård
804220afb1
Merge pull request #16198 from unknownbrackets/gles-stencil
Readback stencil buffer for debugger on GLES
2022-10-11 10:55:38 +02:00
Henrik Rydgård
baa9451cb7 Warning fixes 2022-10-11 09:55:53 +02: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
48c39543af GE Debugger: Normalize framebuffer texture preview.
Previously, we would show the render-to-texture with its original
dimensions.  While useful, this skewed the preview coordinates and was
sometimes confusing.  Additionally, depth texturing didn't preview.

This pads and subsets the texture preview so it's the right size.
2022-10-10 21:54:24 -07:00
Unknown W. Brackets
fc9f200224 GE Debugger: Centralize current fb tex fetch code. 2022-10-10 21:50:53 -07:00
Unknown W. Brackets
999055791d D3D9: Remove block transfer code overrides.
We can just use Draw now.  Keep depth, though, since it applies scale.
2022-10-10 21:48:38 -07:00
Unknown W. Brackets
c89cf1cde7 D3D9: Implement CopyFramebufferToMemorySync().
This works like other backends, including D3D11.  This allows us to get
rid of the old implementation and reuse more code.
2022-10-10 21:28:14 -07:00
Unknown W. Brackets
fc68cd9457 GLES: Add debug readback of stencil data.
This allows the existing gpu.buffer.renderStencil to snapshot the state.
2022-10-10 17:09:14 -07:00
Unknown W. Brackets
c03d327ddd GLES: Refactor depth pipeline create.
So we can reuse for stencil as well.
2022-10-10 16:55:30 -07:00
Unknown W. Brackets
59cc7a8000 GPU: Rename stencil write pipeline. 2022-10-10 16:54:29 -07:00
Henrik Rydgård
089ac9a50e Comment about VR uniforms 2022-10-10 18:02:19 +02:00
Henrik Rydgård
ee46f8992e Don't use fragmentShaderInt32Support as a replacement for checking for bitwiseOps 2022-10-10 18:02:19 +02:00
Henrik Rydgård
aec22491fe Don't expand alphaColorRef to 128 bytes on backends where we don't need to. 2022-10-10 18:02:01 +02:00
Henrik Rydgård
d56bdcb81e
Merge pull request #16196 from hrydgard/improved-render-stats
Improved stats in the Vulkan GPU profiler
2022-10-10 15:40:17 +02:00
Henrik Rydgård
32699da6df Vulkan (trivial): Fix numDraws stat when merging render passes. Shorten a name. 2022-10-10 10:06:30 +02:00
Unknown W. Brackets
1dc35b3ac4 GLES: Simplify, enable debug depth readback. 2022-10-10 01:04:57 -07:00
Unknown W. Brackets
f8908c691b GLES: Use Draw for depth readback shader.
Was not working before, since the program was not being used by Draw2D.
2022-10-10 00:54:29 -07:00
Unknown W. Brackets
93346d6e2c GLES: Refactor depth shader download.
This makes it similar to the Draw interface.
2022-10-10 00:54:29 -07:00
Unknown W. Brackets
c2da29392c GLES: Depth download cleanup. 2022-10-10 00:54:29 -07:00
Unknown W. Brackets
bad4a93d3c D3D11: Correct depth readback. 2022-10-09 15:50:50 -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
Unknown W. Brackets
d83f736b1f D3D9: Correct depth readback. 2022-10-09 13:21:04 -07:00
Henrik Rydgård
0c4935f336 Depal from dynamic CLUT: When detecting bounds, be more conservative.
Followup to #16188 .

Further fixes the lens flare.

It confused me before that there are two sections of the track on
Sunset Drive where the sun is visible, but only on the second is the
lens flare sprite actually shown, which is rather weird.

Verified that exactly the same thing happens on hardware, so it's not a
an emulation problem! Rather seems like a glitch in the game itself.
2022-10-09 20:57:06 +02:00
Henrik Rydgård
9422b05ee3 Fix depal bounds with dynamic CLUT. Fixes lens flare glitches in Ridge Racer
With this wrong, we ended up drawing pixels that came from a DONT_CARE
init of the depal temp buffer, which was a pile of garbage on Android
and blank on PC.

Now, we seem to end up not drawing anything because the depal operation
results in transparent black into whatever is actually intended, but at
least the screen isn't full of glitches when the sun is visible on Adreno.

See issue #16083
2022-10-09 20:27:45 +02:00
Henrik Rydgård
28bc45451c
Merge pull request #16184 from unknownbrackets/depth-download
GPU: Hook Gods Eater Burst avatar read
2022-10-09 16:37:42 +02:00
Henrik Rydgård
49de375bff
Merge pull request #16183 from unknownbrackets/depth-usage
GPU: Ignore depth when masked and ALWAYS
2022-10-09 10:41:40 +02:00
Unknown W. Brackets
ad3220f857 GLES: Hook up depth download.
Currently, only used by one hook.
2022-10-09 01:08:04 -07:00
Unknown W. Brackets
bc84d6345b Vulkan: Disable geometry shaders for Mali <= 18.
These drivers apparently have some weird behavior.
2022-10-09 00:57:10 -07:00
Unknown W. Brackets
d0eb14ec02 GPU: Correct sizing account on block transfer. 2022-10-09 00:54:59 -07:00
Unknown W. Brackets
e7e7528fbc GPU: Consider depth buffers in block transfer.
Right now, only with an explicit flag (not yet used.)
2022-10-09 00:50:45 -07:00
Unknown W. Brackets
b2ce4d2c3f GPU: Refuse to set fb_address == z_address.
We don't do it when creating framebufs either, so don't update to
matching values.
2022-10-08 17:50:18 -07:00
Unknown W. Brackets
7d331f1928 GPU: Ignore depth when masked and ALWAYS.
Seen in NFS Pro Street, for example.  Shouldn't be interpreted as depth
usage.
2022-10-08 17:49:25 -07:00