Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GS/HW: Reduce number of copies for HDR #12254

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

refractionpcsx2
Copy link
Member

@refractionpcsx2 refractionpcsx2 commented Jan 30, 2025

Description of Changes

Tries to reduce the number of copies for HDR draws.

Rationale behind Changes

Master would copy the render target to a new texture, draw, then copy back, every single time, but a lot of games do a lot of separate draws in a row to the same target, so it's better to keep it in one place until the end of the chain. This PR will keep it HDR as long as possible before converting back, hugely reducing copies and render passes in some cases.

TL;DR: Makes some games go brr more

Suggested Testing Steps

Test the games listed below (sorry for the names)

Slightly Cherry Picked Reduction Results from Vulkan:

Ace Combat - Squadron Leader_SCES-52424 ['Draw Calls: -1 [620=>619]', 'Render Passes: -1 [44=>43]', 'Copies: -1 [8=>7]']
Big.Mutha.Truckers ['Draw Calls: -352 [903=>551]', 'Render Passes: -423 [440=>17]', 'Barriers: -127 [132=>5]', 'Copies: -352 [355=>3]']
DT_Carnage_SLUS-21793_20230908174547 ['Draw Calls: -29 [936=>907]', 'Render Passes: -32 [344=>312]', 'Copies: -30 [82=>52]']
Echo_Night_-_Beyond_SLUS-20928_20221019163851 ['Draw Calls: -2745 [6965=>4220]', 'Render Passes: -3384 [3456=>72]', 'Barriers: -1104 [1133=>29]', 'Copies: -2745 [2787=>42]']
evolution_colcliphdr ['Draw Calls: -142 [464=>322]', 'Render Passes: -179 [195=>16]', 'Barriers: -46 [50=>4]', 'Copies: -143 [149=>6]']
Full spectrum warrior ['Draw Calls: -3 [189=>186]', 'Render Passes: -3 [23=>20]', 'Copies: -3 [8=>5]']
JonnyMoseleydebug ['Draw Calls: -115 [211=>96]', 'Render Passes: -116 [128=>12]', 'Copies: -116 [118=>2]']
Kunoichi ['Draw Calls: -48 [1156=>1108]', 'Render Passes: -53 [168=>115]', 'Barriers: -1 [1=>0]', 'Copies: -48 [146=>98]']
Malice_SLES-52413_20240617171243 ['Draw Calls: -4 [453=>449]', 'Render Passes: -4 [232=>228]', 'Copies: -4 [23=>19]']
Mercenaries_-_Playground_of_Destruction_SLUS-20932 ['Draw Calls: -22 [780=>758]', 'Render Passes: -22 [86=>64]', 'Copies: -22 [51=>29]']
Nightshade_SLUS-20810_20231001162431 ['Draw Calls: -42 [1117=>1075]', 'Render Passes: -44 [131=>87]', 'Copies: -42 [119=>77]']
Pac-Man World Rally_SLUS-21328_20230127222927 ['Draw Calls: -57 [189=>132]', 'Render Passes: -64 [78=>14]', 'Barriers: -4 [4=>0]', 'Copies: -59 [64=>5]']
Pac-Man_World_2_SLUS-20224_20220816132032 ['Draw Calls: -2 [82=>80]', 'Render Passes: -2 [14=>12]', 'Copies: -2 [3=>1]']
sakura taisen shadows 1 (hw) ['Draw Calls: -96 [349=>253]', 'Render Passes: -111 [138=>27]', 'Barriers: -7 [7=>0]', 'Copies: -96 [116=>20]']
Sly 2 - Band of Thieves_SCUS-97316_20230422201628 ['Draw Calls: -173 [5962=>5789]', 'Render Passes: -152 [214=>62]', 'Barriers: -21 [546=>525]', 'Copies: -173 [178=>5]']
Snoopy vs Red Baron (snoopy) ['Draw Calls: -40 [198=>158]', 'Render Passes: -44 [60=>16]', 'Barriers: -2 [2=>0]', 'Copies: -40 [47=>7]']
Soul_Calibur_III_SLUS-21216_20231007100145 ['Draw Calls: -138 [526=>388]', 'Render Passes: -138 [156=>18]', 'Copies: -138 [143=>5]']
State_of_Emergency_2_SLUS-20966_20230921232225 ['Draw Calls: -2 [484=>482]', 'Render Passes: -2 [28=>26]', 'Copies: -2 [6=>4]']
Superman Returns - The Video Game_SLUS-21434_20221208170947 ['Render Passes: -1 [9=>8]']
Tekken_5_SLUS-21059_20240108195029 ['Draw Calls: -168 [641=>473]', 'Render Passes: -194 [244=>50]', 'Barriers: -45 [45=>0]', 'Copies: -168 [175=>7]']
tom_jerry_clear ['Draw Calls: -2 [93=>91]', 'Render Passes: -2 [13=>11]', 'Copies: -2 [3=>1]']
Virtua Quest _NTSC-U__SLUS-20977 ['Draw Calls: -2 [444=>442]', 'Render Passes: -2 [11=>9]', 'Copies: -2 [4=>2]']

@JordanTheToaster
Copy link
Member

Some benchmarks Sly 2 at 12x gains 30.3% Echo Night Beyond at 6x gains 333.6% Big Mutha Trucka at 6x gains 294.7%.

image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants