Commit graph

8694 commits

Author SHA1 Message Date
Henrik Rydgård
6d8069dfd1 Vulkan: Remove the remains of the input attachment experiment
Haven't been using these for a while.

I've come to the conclusion here that I think it's better to try to
deal with the issues using safe workarounds like copies, instead of
relying on features with somewhat iffy driver support that are not
universal across APIs anyway.
2023-06-13 20:46:27 +02:00
Henrik Rydgård
df7bd89b7d Division->shift. since it's a signed integer, gets rid of a cdq instruction. 2023-06-13 11:57:28 +02:00
Henrik Rydgård
0eb3702ecb Then add the early-outs for NEON too. 2023-06-13 11:48:04 +02:00
Henrik Rydgård
9647872a09 Same for NEON, first the refactor... 2023-06-13 11:48:04 +02:00
Henrik Rydgård
77da36c03f SSE addstrip: Add the early-outs. 2023-06-13 11:47:53 +02:00
Henrik Rydgård
39034586a4 SSE: Refactor AddStrip to prepare for early out 2023-06-13 11:45:59 +02:00
Henrik Rydgård
22632b82bd
Merge pull request #17565 from hrydgard/breakout-vcache-vulkan
Vulkan: Breakout the vertex cache logic from DoFlush()
2023-06-13 09:56:52 +02:00
Henrik Rydgård
963ca50ba7
Merge pull request #17567 from hrydgard/uvscale-as-argument
Pass uvScale in as a fourth argument to the vertex decoder
2023-06-13 09:49:31 +02:00
Henrik Rydgård
71a34d4ffc
Merge pull request #17569 from hrydgard/arm64dec-optimize-saved-regs
ARM64: Optimize saved registers in vertex decoder.
2023-06-13 09:49:08 +02:00
Unknown W. Brackets
a7fa37d114 softgpu: Use SIMD more for dot products. 2023-06-12 19:54:32 -07:00
Henrik Rydgård
cdcf3b272e ARM64: Optimize saved registers in vertex decoder.
Simplify away some arrays with unused elements
2023-06-13 00:26:38 +02:00
Henrik Rydgård
4af6fac726 Nop-align the ARM and ARM64 loops too. Many CPUs benefit somewhat from hot loops being 16-byte aligned. 2023-06-13 00:05:48 +02:00
Henrik Rydgård
5ae9c9c64e
Merge pull request #17568 from hrydgard/extract-some-changes
Extract some minor changes from #17497
2023-06-12 23:38:14 +02:00
Henrik Rydgård
c4e44d66b0 x86/x64: Nop-align the main loop of vertex decoder loops 2023-06-12 20:39:39 +02:00
Henrik Rydgård
01cea7f088 Pass uvScale in as an argument to the vertex decoder
Cleaner than overwriting/restoring gstate_c.uvScale in the decoder
loop. A small cleanup I've been wanting to do for ages.

Expecting a negligble perf boost if any.
2023-06-12 20:25:18 +02:00
Henrik Rydgård
880379c15d Extract some minor changes from #17497 2023-06-12 20:20:06 +02:00
Henrik Rydgård
d957f6b0be Of course got the check backwards 2023-06-12 19:45:34 +02:00
Henrik Rydgård
1a1462ecb0 x86 buildfix, warning fix 2023-06-12 17:46:57 +02:00
Henrik Rydgård
c9aa3479a4 Make vertexFullAlpha-in-register work the same as on ARM. 2023-06-12 16:08:14 +02:00
Henrik Rydgård
a164f77f47 VertexDecoderX86 (64-bit only): Avoid a memory access per loop iteration for alpha 2023-06-12 15:58:55 +02:00
Henrik Rydgård
f5516d3248 Actually switch away from XXH to a custom hash, to de-risk 2023-06-12 14:24:20 +02:00
Henrik Rydgård
2f90ec6093 Breakout the vertex caching (just code cleanup) 2023-06-12 13:16:14 +02:00
Henrik Rydgård
468757b93a Add comment about possible UV scale/offset bug. Move loop-max to local. 2023-06-12 13:16:14 +02:00
Henrik Rydgård
d90671e877 Add some comments. 2023-06-12 13:16:13 +02:00
Henrik Rydgård
186b0f105c Simplify the vertex cache ID handling 2023-06-12 13:16:13 +02:00
Henrik Rydgård
53aa2cc596 Apply stencil writemask when clearing properly again, see #17478
Also renames vpAndScissor to vpAndScissor_ for consistency.
2023-06-12 11:49:44 +02:00
Henrik Rydgård
e9e95d23ce VulkanDebug log fix, reduce log spam 2023-05-30 18:32:33 +02:00
Henrik Rydgård
49ecc01556 Fix image leak bug when pausing and we're just displaying a framebuffer in memory 2023-05-30 18:29:50 +02:00
Henrik Rydgård
7c4b9bac90 Cache textures created by MakePixelsTexture and reuse where appropriate. 2023-05-30 14:07:44 +02:00
Henrik Rydgård
ea552bc573 Add a new GPU stat (DrawPixels), kinda heavy since creates textures. GoW does 20-ish per frame. 2023-05-30 10:15:34 +02:00
Henrik Rydgård
f54f905be5 Vulkan: Remove support for other index types than 16-bit.
We don't have any use for them anyway.
2023-05-30 10:15:34 +02:00
Henrik Rydgård
ad8827ae70 Cleanup, address feedback 2023-05-26 10:28:10 +02:00
Henrik Rydgård
5c94a20ecb SoftGPU: implement CheckConfigChanged, have it check postshaders. Fixes #17511. 2023-05-26 09:48:51 +02:00
Henrik Rydgård
6cee08c74f Post-processing: Fix using limited UV ranges when there's a single upscaling filter in the chain.
Fixes #17499
2023-05-26 09:48:51 +02:00
Henrik Rydgård
80e47b7bd3 Only dirty the uniform UVSCALEOFFSET when really needed
Broken out from #17479

With OpenGL, greatly reduces the amount of glUniform4fv calls in many games (and
similar in the other backends).
2023-05-25 15:00:57 +02:00
Henrik Rydgård
72cf531759 Bump shader cache version 2023-05-25 10:19:01 +02:00
Henrik Rydgård
7178c0cd42 Restore fragmentshader ID flags double and texalpha. Add a ubershader mode that uses dynamic state. 2023-05-25 10:19:01 +02:00
Henrik Rydgård
bb6d696a84 Merge the tex "ubershader" uniforms into one for convenience 2023-05-25 10:19:01 +02:00
Henrik Rydgård
ebd36a4369 Reorganize the fragment shader bits 2023-05-25 10:19:01 +02:00
Henrik Rydgård
dfb446f89d Allow other backends than Vulkan to have GPU memory stats. Implement for GL. 2023-05-24 14:33:01 +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
84da0327d6 GLQueueRunner: Make DrawIndexed parameters more consistent. 2023-05-23 17:49:11 +02:00
Henrik Rydgård
f56ef63ef5 Remove redundant function 2023-05-23 16:50:25 +02:00
Henrik Rydgård
d51d1413a3 DrawEngineCommon: Rename decoded to decoded_ 2023-05-23 16:46:43 +02:00
Henrik Rydgård
d7ea2ebf8a GL: Add tags to push buffers for debug purposes. Double the default vertex buffer size. 2023-05-23 15:53:41 +02:00
Henrik Rydgård
cb38c43d7e GL render manager: Merge the two stencil commands, for more compact command lists 2023-05-23 09:14:23 +02:00
Henrik Rydgård
470ebbfe73 GL: When setting a stencil value for clear, override both func and op for consistency. 2023-05-23 09:14:23 +02:00
Henrik Rydgård
a4baed4c0c Minor GLPushBuffer cleanup (now same API as the VK one) 2023-05-23 08:41:09 +02:00
Henrik Rydgård
67a35d3476
Merge pull request #17356 from unknownbrackets/minor-cleanup
Cleanup some more string formats, mostly in debugger
2023-05-23 08:29:23 +02:00
Henrik Rydgård
05b6bbdc56 Add a trivial profiling tool to the OpenGL backend - meaasure the time it takes to run a frame of commands.
Accessed from the in-game dev menu just like the Vulkan frame profiler.

With this we can easily see that actually submitting the GL commands is often the bottleneck on old
devices like a Galaxy S3.
2023-05-17 14:38:11 +02:00