Unknown W. Brackets
8b80c5fb28
GPU: Allow/use indices in bounding box check.
...
Not sure any games actually use this, but it's supported.
2022-10-22 16:05:29 -07:00
Unknown W. Brackets
b7a617023c
GPU: Consume cycles in bounding box check.
2022-10-22 16:05:29 -07:00
Unknown W. Brackets
6ddf22487b
GPU: Correct bounding box for larger counts.
...
Matches tests on a PSP with float/transform format.
2022-10-22 16:05:29 -07: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
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
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
Henrik Rydgård
ee46f8992e
Don't use fragmentShaderInt32Support as a replacement for checking for bitwiseOps
2022-10-10 18:02:19 +02: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
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
Unknown W. Brackets
3aa863ec41
GPU: Clip against neg Z even w/o cull support.
...
This should fix rendering issues on Apple devices.
2022-10-06 00:34:02 -07:00
Henrik Rydgård
d6bd08cae7
Merge pull request #16162 from unknownbrackets/geo-shader
...
Implement negative Z clipping in geometry shader
2022-10-06 01:00:41 +02:00
Unknown W. Brackets
f24edbe8a8
Compat: Remove DisableRangeCulling.
...
This hack was used because culling previously incorrectly handled Z, which
was fixed in #14833 .
2022-10-04 22:19:40 -07: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
Unknown W. Brackets
878a049f60
GPU: Add dirtying for geo shader state.
...
Not yet used, but dirtied at the right times.
2022-10-02 07:42:16 -07:00
Unknown W. Brackets
24999e792a
Ge: Report and save Edram translation value.
...
See #16126 for some details on its usage and effects.
2022-10-01 23:18:42 -07:00
Unknown W. Brackets
7cf05d0a46
GPU: Fix missed dirtying when fast loading tgen.
2022-09-29 22:31:07 -07:00
Unknown W. Brackets
904fb38003
GPU: Restore matrices with dirtying.
...
Without this, it's possible we might not notice or apply a change
whether in uniforms or etc.
2022-09-29 22:31:02 -07:00
Unknown W. Brackets
6b20c0318d
softgpu: Correct matrix value update wrapping.
...
The values read back when saving a context or getting matrix data are set
differently than the actual values used for rendering.
This implements the wrapping and bleeding between matrices within softgpu,
but leaves hardware rendering to only use the rendering registers for
speed.
2022-09-27 22:29:55 -07:00
Unknown W. Brackets
95d2083f04
Ge: Move matrix reading into GPU.
...
Let's keep managing its state / registers internal.
2022-09-27 22:23:02 -07:00
Henrik Rydgård
07ca9e4656
Fold the "materialUpdate" flag into the light ubershader part.
...
This reduces the number of vertex shaders and thus pipelines by quite a
bit more in a few games, like Tekken and GoW, continuing the fight
against shader compile stutter.
The perf impact should be minimal if not positive due to less pipeline
changes.
GLES fixes
Make the vertex input declarations match (always declare fog input). Fixes D3D11 validation
Tess fix
2022-09-26 12:06:16 +02:00
Henrik Rydgård
76f03d30bf
Remove suspicious dirty flag
2022-09-26 11:21:40 +02:00
Henrik Rydgård
9d1355e137
Always do the vertex shader part of the fog computation.
...
In #16104 , we drastically reduced the number of shader variants for
games that use flexible lighting setups. I looked at a few games and it
seems that a lot of games have the same shaders with fog on/off, while
fog is super cheap to compute. So let's just always do it, reducing
vertex shader variants further (though the amount of pipelines will probably
remain the same, since we still specialize the fragment shader).
Might also be worth adding a dynamic bool for the fragment shader, but
if so, doing it separately.
2022-09-26 09:30:54 +02:00
Henrik Rydgård
7adba20fac
Experiment: Generate "Ubershaders" that can handle all lighting configurations
...
This drastically reduces the shader compile stutter that happens when a lot of new
light setups are created, like on the first punch in Tekken 6.
There's more stuff that might benefit from being made dynamic like this.
These branches are very cheap on modern GPUs since they're branching on
a uniform variable, so no divergence.
Only tested on Vulkan. I think we'll need to keep the old path too for
gpus like Mali-450...
2022-09-25 23:35:01 +02:00
Unknown W. Brackets
fc39f042ae
softgpu: Avoid unnecessary flushing for curves.
...
We don't need to flush all drawing between curves in softgpu, let them
queue up.
2022-09-22 00:08:38 -07:00
Henrik Rydgård
aa19712fc3
Unify depth texture and framebuffer fetch checks
2022-09-20 10:47:49 +02:00
Henrik Rydgård
09bcf3ec13
Unify range culling detection
2022-09-20 10:15:04 +02:00
Henrik Rydgård
1ae7c0132c
Start unifying setting of the GPU feature flags, now that thin3d has feature detection.
2022-09-20 10:07:01 +02:00
Unknown W. Brackets
9f84cde062
GPU: Fix crash on imm vert triangles.
...
Was crashing because the frag and vert shaders didn't match up.
2022-09-18 06:16:26 -07:00
Unknown W. Brackets
6877ff1af2
softgpu: Fix state/continuation for imm prims.
2022-09-18 06:16:26 -07:00
Unknown W. Brackets
596b07bd2e
softgpu: Support fog and color1 on imm verts.
2022-09-18 06:16:26 -07:00
Unknown W. Brackets
35ba01e01f
softgpu: Refactor imm draws to bypass vert read.
2022-09-18 06:16:25 -07:00
Unknown W. Brackets
402492a958
GE Debugger: Show imm prim flag detail in disasm.
2022-09-06 22:31:09 -07:00
Unknown W. Brackets
880f6f8d49
GPU: Handle more flags on imm prim command.
2022-09-06 22:20:45 -07:00
Unknown W. Brackets
f274267143
GPU: Allow usage of texturing in immediate verts.
...
And respect the other flags that I can reproduce working in a test.
I can't seem to get the fog to work at all, or the shading mode, or the
secondary color. Maybe depends on other flags or bits in other regs...
2022-09-06 22:20:45 -07:00
Unknown W. Brackets
ceb2af369c
GPU: Handle immediate prims more accurately.
...
This allows for lines, points, textures, and similar things. Also
corrects offset handling. Still some flags on VAP that seemingly don't
work, and this doesn't consider the texture flag on it.
2022-09-06 22:20:45 -07:00
Unknown W. Brackets
d249674858
softgpu: Fix immediate rendering crash.
2022-09-06 18:55:25 -07:00
Unknown W. Brackets
23f61171f9
softgpu: Implement matrix data wrap-around.
...
Overflow writes to other matrices. Matches hardware tests.
2022-09-05 19:38:54 -07:00
Henrik Rydgård
f399e3c7e6
Disable BlueToAlpha mode when logic op is present. Re-enable for Outrun and DiRT.
2022-09-05 09:51:17 +02:00
Henrik Rydgård
ecb84987ef
Remove allocation from the heaviest MemBlockInfo path (BlockTransfer). Required some refactoring.
2022-09-01 11:59:35 +02:00
Henrik Rydgård
437d6d30a0
KillZone: Fix margin detection on the title screen, fixing some glitches. Need more fixes though to fix the shimmer effect.
...
See #6207 comments
2022-08-31 11:40:42 +02:00
Henrik Rydgård
70f7f74a05
Check X coordinate of through-mode drawcalls to figure out which of the splits to render to
2022-08-31 01:09:23 +02:00
Henrik Rydgård
44d822be3b
Address feedback
2022-08-30 06:41:37 +02:00
Henrik Rydgård
847e05140b
Add another stat, for self-tex
2022-08-29 17:41:29 +02:00
Henrik Rydgård
f228de76ef
Fix OpenGL bug when framebuffer fetch is available. Add two new stats.
2022-08-29 15:39:29 +02:00
Henrik Rydgård
cd37bffdaa
Better framebuffer checks, remove all ways that framebuffer formats can change.
2022-08-29 11:06:45 +02:00
Henrik Rydgård
f79acd651d
Comment updates
2022-08-25 00:29:44 +02:00
Henrik Rydgård
99404f0a15
Fix BlueToAlpha together with reinterpret. Add back fake reinterpret for now.
2022-08-24 14:40:37 +02:00
Henrik Rydgård
5d50d02227
Merge pull request #15894 from unknownbrackets/debugger
...
GE Debugger: Record only one flip if display framebuf not changed, step on vsync
2022-08-24 06:27:31 +02:00