TJnotJT
9120e6fb6a
GS:HW: Allow dumping PrimID texture with RT dumping.
2026-09-04 01:37:00 +02:00
TJnotJT
29b7bc4466
GS:VK: Only use feedback loop layout for depth if texture barrier is supported.
2026-08-07 01:02:39 +02:00
TJnotJT
ab6bc30aec
GS:DX11: Fix typo in query destruction.
...
Fixes a bug when disabling then enabling pipeline stats.
2026-07-31 17:28:57 +02:00
TJnotJT
5793dbc1ef
GS:HW: Only enable GPU timing/stats in backend if the option is enabled.
...
Helps prevent a crash in Mesa3D Windows drivers.
2026-07-31 17:28:57 +02:00
TJnotJT
fa50a11eac
GS:HW: Add feedback flags for VK depth stencil creation.
...
VK does depth feedback with depth textures. Fixed regression with texture usage flag refactor.
2026-07-25 21:08:36 +02:00
TJnotJT
562c32cd15
GS:HW: Fix ROV texture type conversion for temporary Z.
2026-07-16 16:41:31 +02:00
TJnotJT and t654132
a50ed4d05a
GS:HW: Fix regression with prefer_reuse texture fetching flag.
...
Boolean value of the flag was not properly inverted in a refactor.
Co-authored-by: t654132
2026-07-15 14:34:40 +02:00
TJnotJT
4f62bff866
GS:DX:VK: Always make null texture with UAV usage.
2026-07-12 21:25:53 +02:00
TJnotJT
8510ec29ba
GS/DX: Fix typo with primid init output.
2026-07-12 21:20:28 +02:00
TJnotJT
eb5e3fcd13
GS/HW: Make all vertices the same color in certain flat shading cases.
...
Fixes issues with AA1 with flat shading.
2026-07-10 10:16:51 +02:00
TJnotJT
8c1b3f8ce3
QT: Remove ROV tabstop in graphics advanced section.
...
No longer used in this part of the GUI.
2026-07-09 11:44:18 +02:00
TJnotJT
55b37b794c
GS:DX12: Index pipelines in correct shader cache table.
2026-07-09 11:43:44 +02:00
TJnotJT
1aca396e34
GS/DX12: Make sure null texture has correct descriptor type for slot.
2026-07-09 11:43:17 +02:00
TJnotJT
7a90caedec
GS/HW: Force depth ROV if alpha test needs depth feedback.
2026-07-02 19:46:47 +02:00
TJnotJT
017b4d07da
GS/HW: Improve ROV discard behavior.
...
Try to avoid color/depth write when it's discarded.
2026-07-02 19:46:47 +02:00
TJnotJT and refractionpcsx2
a6b1040caf
GS: Update target TEX0 on a move if buffer width is increased.
...
Co-authored-by: refractionpcsx2
2026-06-28 21:51:10 +02:00
TJnotJT
99a78f9a55
GS: Add GPU pipeline stats to OSD.
...
Adds vertex shader and pixel shader invocations.
2026-06-28 12:39:56 -04:00
TJnotJT
c3ace64205
GS/HW: Change prefer_unused_texture parameter to prefer_reuse in GSDevice::FetchSurface().
...
prefer_reuse is the opposite of prefer_unused_texture, so all corresponding arguments are inverted.
2026-06-28 12:13:38 -04:00
TJnotJT
3b2c1ec6e3
GS/DX12: Fix DX12 renderpass restart optimization rebase error.
2026-06-28 12:13:38 -04:00
TJnotJT
dba432639e
GS/VK: Detect max supported framebuffer dimensions for null framebuffer.
2026-06-28 12:13:38 -04:00
TJnotJT
166c4491c2
GS/HW: ROV activation revisions.
...
Force color ROV if depth ROV is used.
Only force color/depth ROV if the draw actually uses both color/depth (fixes a bug with temporary DS for stencil being used as a ROV).
Simplify the ROV activation heuristic a bit (removed unused variables, simplify barrier counting, etc.)
2026-06-28 12:13:38 -04:00
TJnotJT and TellowKrinkle
d1cd5a62ed
GS/HW: ROV revisions.
...
Use GSTexture::FeedbackTarget RTs by default (not GSTexture::ShaderWriteTarget).
Do ROV type conversion for both color and depth (if needed).
Make sure the formats for ROV actually support UAV/storage image.
Change 'PSSetUnorderedAccess' to 'PSSetROVs' for clarity.
DX12: Use enum names instead of raw constants in PSSetShaderResource().
Some string format cleanup to GL_*() macros.
VK: Do not enable ROV if FB fetch is available.
Other misc cosmetic changes such as whitespace, etc.
Co-authored-by: TellowKrinkle
2026-06-28 12:13:38 -04:00
TJnotJT and TellowKrinkle
b11a406519
GS: Change GSTexture::Type to GSTexture::Usage
...
Usage fits more cleanly with API flags.
Also separates out feedback and write usage from render target.
Co-authored-by: TellowKrinkle
2026-06-28 12:13:38 -04:00
TJnotJT and TellowKrinkle
c7042e1877
GS/HW: Use CreateCompatible() in texture cache to propagate correct formats.
...
Co-authored-by: TellowKrinkle
2026-06-28 12:13:38 -04:00
TJnotJT
eadb46c5ac
GS/DX12: Remove unnecessary UAV state and simplify texture unbinding.
2026-06-23 02:59:46 +02:00
TJnotJT
e2a3670d65
GS/HW: Adjust line AA1 blur with upscaling.
2026-06-20 22:09:33 +02:00
TJnotJT
6c4a8efe25
QT/FSUI: Set ROV default off and move the settings to Graphics>Rendering.
...
ROV may have negative performance impacts on some games/systems so allow users to opt in. Also it needs further revision/refinement.
2026-06-15 18:31:08 +02:00
TJnotJT
76f690d96e
GS/DX11/GL: Fix sample area calculation for RT/DS sampling hazard.
2026-06-12 18:58:17 +02:00
TJnotJT
254d955f89
GS/HW: Fix PS selector bits format in debug strings.
...
Fix the formatting since bit width went from 96 to 128.
2026-06-03 04:52:54 +02:00
TJnotJT
e490685b42
GS/HW: Improve unordered access flag handling for RTs.
...
Only for DX11, which doesn't track resource state otherwise.
2026-06-03 03:26:24 +02:00
TJnotJT
7b0c39a20d
GS/GL: Remove ROV support.
...
Buggy on multiple systems, even with various barrier hacks.
2026-06-03 03:26:24 +02:00
TJnotJT and SternXD
059d631a6d
QT/FSUI: Add ROV options to FSUI and QT.
...
Co-authored-by: SternXD
2026-06-03 03:26:24 +02:00
TJnotJT and TheLastRar
7c255bd58d
GS/VK: Fix for broken feedback transitions on Windows RDNA2.
...
Co-authored-by: TheLastRar
2026-06-03 03:26:24 +02:00
TJnotJT
bbcd5ec25e
GS/HW: ROV support.
2026-06-03 03:26:24 +02:00
TJnotJT
8df49d7676
GS/HW: Fix a number of compiler warnings.
...
Missing default case in switch statement.
Signed/unsigned implict conversion.
Unused variables.
Hidden virtual overloaded function.
2026-05-31 22:38:31 +02:00
TJnotJT
74f2f73ce6
GS/HW: Use an enum instead of boolean to specify nearest/bilinear filtering.
2026-05-31 18:43:01 +02:00
TJnotJT and TellowKrinkle
1e2f60a9b8
GS/HW: Ignore HW bilinear flag for shaders that do SW bilinear.
...
Co-authored-by: TellowKrinkle
2026-05-31 18:43:01 +02:00
TJnotJT and TellowKrinkle
bf892e9ece
GS/HW: Treat depth input as R32 color input in convert shaders.
...
Co-authored-by: TellowKrinkle
2026-05-31 18:43:01 +02:00
TJnotJT and TellowKrinkle
a44fe80caa
GS/HW: Refactor shader copy and texture formats.
...
Make it easier to add new depth formats, and code cleanup.
Co-authored-by: TellowKrinkle
2026-05-31 18:43:01 +02:00
TJnotJT
3f4b424200
GS/TC: Refactor/cleanup preload function.
2026-05-30 10:47:47 -04:00
TJnotJT
4d25bdcabb
GS/DX11/GL: Adapt full barrier multidraw FB copy for sampling RT/DS hazards.
2026-05-30 14:52:42 +02:00
TJnotJT
02c5f8f648
GS/HW: Fix offset draw vertex trace/draw rect.
2026-05-29 23:27:33 +02:00
TJnotJT
9cd0ec1634
GS/HW: Use sampled area for RT/DS sampling hazards.
2026-05-23 11:14:46 +02:00
TJnotJT
a19b3747ea
GS/HW: Add AA1 triangle corner caps and edge extrapolation.
2026-05-20 01:02:00 +02:00
TJnotJT
534330aa99
GS/VK: Make sure layout changes are propagated to descriptors.
2026-05-18 08:41:26 +02:00
TJnotJT
c1cb214a03
GS/HW: Add debug blend setting.
...
Will enable SW blend and disable many optimizations.
2026-05-13 19:49:07 +02:00
TJnotJT
4ef84fa51c
GS/HW: Fix flat shaded color in AA1 shader.
2026-05-12 14:46:49 +02:00
TJnotJT
4fa2b8e45d
GS/HW: Fixes/improvements to early scissor/bbox test.
2026-05-09 13:48:42 +02:00
TJnotJT
0949f193b8
GS/SW: Adjust bounds in assertion to present false positive.
...
Account for the fact that bottom/right coordinates are exclusive.
2026-05-06 20:46:51 +02:00
TJnotJT
5f3dc1a76e
GS/SW: Early exit optimization for multithreaded horizontal lines.
2026-05-06 20:46:51 +02:00
TJnotJT
9afea55bb6
GS/SW: Adjust bbox to account for AA1 and points/line rounding.
2026-05-06 20:46:51 +02:00
TJnotJT
433614ae85
GS: Adjust primitive bbox in vertex kick to account for AA1.
2026-05-06 20:46:51 +02:00
TJnotJT
00c85c4a8f
GS/TC: Use temporary source on invalid TEX0.
2026-05-06 19:18:04 +02:00
TJnotJT
8b82fbb449
GS/HW: Add constant buffer dumping.
2026-05-03 18:05:35 +02:00
TJnotJT
3d71e310c0
GSRunner: Add -debugdevice command line parameter.
2026-04-30 02:21:35 +02:00
TJnotJT
02d0f613ba
GS/HW: Fix brackets in texture shuffle detection.
2026-04-30 02:03:44 +02:00
TJnotJT
f95b2ce24d
GS/HW: Reorganize AA1 setup and fix some performance bugs.
...
Separate depth feedback setup it is not duplicated in both AA1 and alpha test setup.
Try to optimize out depth feedback in AA1 if triangle interiors are discarded.
Fix barriers not being properly enabled for AA1 triangles (was only activating if depth test was used).
2026-04-25 22:26:09 +02:00
TJnotJT
8cfd583605
GS/HW: Use correct draw functions in backend passes.
...
Fixes broken primid and blend multipass draws.
Regression from AA1 changes to draw functions.
2026-04-23 02:32:33 +02:00
TJnotJT
d0ee5b859a
GS/VK: Fix flat specifier in VK shader.
2026-04-21 23:28:00 +02:00
TJnotJT
2ae8f1f23f
GS/HW: Support HW AA1 for lines/triangles.
...
Credits: concept by TellowKrinkle.
2026-04-20 11:16:27 +02:00
TJnotJT
3722d392d8
GS/TC: Remove debug code.
2026-04-18 13:30:19 +02:00
TJnotJT
09fcc4d60e
GS/TC: Break LookupTarget() into 3 functions.
...
Separate draw lookup from frame lookup. Put common code in another processing function.
2026-04-17 20:17:46 +02:00
TJnotJT
c26c2236c5
GS/TC: Fix alpha write masking check in target update.
...
Make sure we detect when FB mask is such that only alpha is written. Avoid incorrectly updating RGB to a target when we don't need it and possibly nuking other depth targets in the process.
2026-04-15 20:58:08 +02:00
TJnotJT
f3496e3858
GS/HW: Set valid flags if display target has exact match with recent transfer.
2026-04-15 20:56:23 +02:00
TJnotJT
fce3be8544
GS/HW: Disable HPO/even sprite position on texture shuffles.
...
Quad conversion in texture shuffles is already aligned and not intended to interact with upscaling coord fixes.
2026-04-12 19:38:14 +02:00
TJnotJT
06616ec98e
GS: Refactor texture shuffle detection and quad conversion.
2026-04-11 08:16:04 +02:00
TJnotJT
26bd916e37
GS: Add utility functions for vertices/quads.
2026-04-11 08:16:04 +02:00
TJnotJT
9022072de8
GS/HW: Separate DrawPrims() into functions.
2026-04-07 17:42:46 +02:00
TJnotJT
08d3cc32f4
GS: Ignore CRTC outputs with negative sizes.
2026-04-07 16:20:27 +02:00
TJnotJT
372fadfb99
GS/HW: Disable depth if zero clear, ZBP == FBP, and depth/RT different bpp.
2026-03-29 21:53:14 +02:00
TJnotJT
406c2c0bbf
GS/HW: Cleanup DATE configuration.
2026-03-29 21:10:33 +02:00
TJnotJT
a5ba35ce92
GS/HW: Check overlap of required rect with valid area in source lookup.
...
Check recent transfers for RT in source lookup if it has dirty rects or the valid area does not intersect with the required rect. The latter check is needed in case a recent transfer did not intersect the valid area of the RT.
2026-03-29 21:04:09 +02:00
TJnotJT
1356f282d0
GS/HW: Don't clamp negative coords to 0 in texture shuffle detection.
2026-03-20 20:48:53 +01:00
TJnotJT
daa0d2d3c4
GS: Check if CRTCs have same source after register update.
...
Previously the check happened before the register update, which could cause it to be incorrect.
2026-03-20 12:40:23 +01:00
TJnotJT
1b4af9deef
GS: Fix check for RC1 overwriting RC2 in merge.
...
Previously, the bbox of each output was not checked, leading to incorrectly assuming that RC2 was overwritten by RC1. This change makes sure that the RC2 bbox is contained in the RC1 bbox to determine that it's overwritten.
2026-03-20 12:40:23 +01:00
TJnotJT
93212882d0
GS/HW: Depth feedback loops and accurate AFAIL. ( #13631 )
...
Add support for depth feedback loops either via texture barriers or copies.
DX12 and OpenGL do depth feedback by creating a temporary color texture to hold Z and using multiple color outputs.
Use the depth feedback for accurate AFAIL (enabled via INI setting).
2026-03-18 02:12:12 +01:00
TJnotJT
8a46f9e6ca
GSRunner: Disable framerate limit in runner and dump frame timing information.
2026-03-12 18:46:47 +01:00
TJnotJT
848a9fd551
GS: Fix unused lambda capture warnings.
2026-02-19 14:14:16 +01:00
TJnotJT
24090772cd
GS/HW: Add option for dumping HW config data.
...
Dumps HW config per draw.
Helps debugging/optimizing HW pipeline changes.
2026-02-18 22:25:54 +01:00
TJnotJT
12136217c4
GS/HW: Use bounding octagon for overlap detection.
2026-02-14 21:51:23 +01:00
TJnotJT
0e5445d2a7
GS/HW: Simplify overlap heuristics, remove axis-aligned tristrip check.
2026-02-14 21:51:23 +01:00
TJnotJT
e83a343bab
GS/HW: Save tristrips in draw list computation to avoid recomputing.
2026-02-14 21:51:23 +01:00
TJnotJT
d5aeb9e20a
GS/HW: Clean up drawlist computation.
2026-02-14 21:51:23 +01:00
TJnotJT
d9128872fd
GS/HW: Paste together tristrips that share common end points.
2026-02-14 21:51:23 +01:00
TJnotJT
6e129a69d2
GS/HW: Detect tri strips with 2 triangles in drawlist.
2026-02-14 21:51:23 +01:00
TJnotJT
0e9de44c72
GS: Add some GSVector4i methods.
2026-02-10 23:03:19 +01:00
TJnotJT
e82fa0bba5
GS/HW: Require 32 bit RT for accumulation blend on max blend.
2026-01-30 11:06:13 +01:00
TJnotJT
5710c2740c
GS/HW: Enable Z floor only when needed.
2026-01-26 23:30:09 +01:00
TJnotJT
ec96feb22e
GS/HW: Use conservative depth for shader depth output.
2026-01-26 23:30:09 +01:00
TJnotJT
a1173c53d3
GS/HW: Reduce barriers in triangle strips/fans.
...
Account for triangles forming non-overlapping quads in triangles strips/fans.
2026-01-26 11:57:20 +01:00
TJnotJT
461f01718c
GS/HW: Prevent assertion in StretchRect().
...
Depth copy was using the color StretchRect() causing an assertion in debug builds.
2025-12-12 00:01:25 +01:00
TJnotJT
3a7489b2cc
GS: Fix typos in GSState::EarlyDetectShuffle().
2025-12-07 07:20:14 +01:00
TJnotJT
580218d495
GS: Do scissor test in autoflush handler.
...
The autoflush handler is called before the scissor test in the vertex kick.
To save some work and prevent unnecessary autoflushes, do the scissor test
in the autoflush handler also.
2025-11-29 04:55:03 +01:00
TJnotJT
519f280fa5
GS: Early detection of shuffles in vertex kick to prevent autoflushing.
2025-11-29 04:55:03 +01:00
TJnotJT
a33ee13bb4
GS: Add LOD checking to HandleAutoflush().
...
Only enabled when the draw might use mipmapping.
2025-11-29 04:55:03 +01:00
TJnotJT
0c70cc7e5a
GS: Add checking of multiple LODs to IsAutoFlushDraw().
2025-11-29 04:55:03 +01:00
TJnotJT and TellowKrinkle
f322dfb1d4
GS/SW: Use non-saturating ARM instructions for color gradient setup.
...
This is more efficient on ARM, though the equivalent instructions are not currently used in the x64 JIT and C++ versions of GSVector.
Co-authored-by: TellowKrinkle
2025-11-26 20:25:10 +01:00
TJnotJT and TellowKrinkle
a7f5ddfe0d
GS/SW: Mask color gradients to prevent incorrect clamping.
...
Co-authored-by: TellowKrinkle
2025-11-26 20:25:10 +01:00
TJnotJT
35624a12d9
GS/HW: Refactor StretchRect() to have single entry to renderer/reduce duplication.
2025-11-25 18:38:52 +01:00
TJnotJT
f1dc232f91
GSRunner: Use correct config name to disable shader cache.
2025-11-19 02:50:01 +01:00