Browse Source
[video_core] Fix 1x graphics bugs without performance loss (#3385 )
This fixes weird lines at 1x resolution without impacting performance in some titles.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3385
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: MaranBr <maranbr@outlook.com>
Co-committed-by: MaranBr <maranbr@outlook.com>
pull/3391/head
MaranBr
2 weeks ago
committed by
crueter
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
2 changed files with
9 additions and
5 deletions
src/common/settings.cpp
src/shader_recompiler/frontend/maxwell/translate_program.cpp
@ -347,11 +347,7 @@ void TranslateResolutionInfo(ResolutionSetup setup, ResolutionScalingInfo& info)
}
}
info . up_factor = static_cast < f32 > ( info . up_scale ) / ( 1U < < info . down_shift ) ;
info . up_factor = static_cast < f32 > ( info . up_scale ) / ( 1U < < info . down_shift ) ;
info . down_factor = static_cast < f32 > ( 1U < < info . down_shift ) / info . up_scale ;
info . down_factor = static_cast < f32 > ( 1U < < info . down_shift ) / info . up_scale ;
# ifdef __ANDROID__
info . active = info . up_scale ! = 1 | | info . down_shift ! = 0 ;
info . active = info . up_scale ! = 1 | | info . down_shift ! = 0 ;
# else
info . active = true ;
# endif
}
}
void UpdateRescalingInfo ( ) {
void UpdateRescalingInfo ( ) {
@ -304,9 +304,17 @@ IR::Program TranslateProgram(ObjectPool<IR::Inst>& inst_pool, ObjectPool<IR::Blo
Optimization : : GlobalMemoryToStorageBufferPass ( program , host_info ) ;
Optimization : : GlobalMemoryToStorageBufferPass ( program , host_info ) ;
Optimization : : TexturePass ( env , program , host_info ) ;
Optimization : : TexturePass ( env , program , host_info ) ;
if ( Settings : : values . resolution_info . active ) {
bool should_rescale =
# ifdef __ANDROID__
Settings : : values . resolution_info . active ;
# else
true ;
# endif
if ( should_rescale ) {
Optimization : : RescalingPass ( program ) ;
Optimization : : RescalingPass ( program ) ;
}
}
Optimization : : DeadCodeEliminationPass ( program ) ;
Optimization : : DeadCodeEliminationPass ( program ) ;
if ( Settings : : values . renderer_debug ) {
if ( Settings : : values . renderer_debug ) {
Optimization : : VerificationPass ( program ) ;
Optimization : : VerificationPass ( program ) ;