home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Fix for tearing when VMR exclusive mode isn't checked.
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="zeflash" data-source="post: 178214" data-attributes="member: 13641"><p>Had this error for a long time (at least with NVidia cards, somehow the ATI I had before wasn't showing up that bug).</p><p></p><p>I checked the source. In d3dapp.cs, BuildPresentParamsFromSettings function:</p><p>[code]</p><p> if (windowed)</p><p> {</p><p> presentParams.MultiSample = graphicsSettings.WindowedMultisampleType;</p><p> presentParams.MultiSampleQuality = graphicsSettings.WindowedMultisampleQuality;</p><p> presentParams.AutoDepthStencilFormat = graphicsSettings.WindowedDepthStencilBufferFormat;</p><p> presentParams.BackBufferWidth = ourRenderTarget.ClientRectangle.Right - ourRenderTarget.ClientRectangle.Left;</p><p> presentParams.BackBufferHeight = ourRenderTarget.ClientRectangle.Bottom - ourRenderTarget.ClientRectangle.Top;</p><p> presentParams.BackBufferFormat = graphicsSettings.BackBufferFormat;</p><p> presentParams.PresentationInterval = PresentInterval.Immediate;</p><p> presentParams.FullScreenRefreshRateInHz = 0;</p><p> presentParams.SwapEffect = SwapEffect.Discard;</p><p> presentParams.PresentFlag = PresentFlag.Video; //PresentFlag.LockableBackBuffer;</p><p> presentParams.DeviceWindow = ourRenderTarget;</p><p> presentParams.Windowed = true;</p><p> //presentParams.PresentationInterval = PresentInterval.Immediate;</p><p> }</p><p> else</p><p> {</p><p> presentParams.MultiSample = graphicsSettings.FullscreenMultisampleType;</p><p> presentParams.MultiSampleQuality = graphicsSettings.FullscreenMultisampleQuality;</p><p> presentParams.AutoDepthStencilFormat = graphicsSettings.FullscreenDepthStencilBufferFormat;</p><p></p><p> presentParams.BackBufferWidth = graphicsSettings.DisplayMode.Width;</p><p> presentParams.BackBufferHeight = graphicsSettings.DisplayMode.Height;</p><p> presentParams.BackBufferFormat = graphicsSettings.DeviceCombo.BackBufferFormat;</p><p> presentParams.PresentationInterval = PresentInterval.Default;</p><p> presentParams.FullScreenRefreshRateInHz = graphicsSettings.DisplayMode.RefreshRate;</p><p> presentParams.SwapEffect = SwapEffect.Discard;</p><p> presentParams.PresentFlag = PresentFlag.Video; //|PresentFlag.LockableBackBuffer;</p><p> presentParams.DeviceWindow = this;</p><p> presentParams.Windowed = false;</p><p> }</p><p>[/code]</p><p> </p><p>even though I'm starting MP fullscreen, windowed is true. Therefore, the presentation used is PresentInterval.Immediate, which causes tearing as it's not waiting the vsync to present the backbuffers.</p><p>PresentInterval.Default should be used instead, to preserve vsync at all time.</p><p></p><p>Should be this way instead (and I tested it, it works fine):</p><p>[code]</p><p> if (windowed)</p><p> {</p><p> presentParams.MultiSample = graphicsSettings.WindowedMultisampleType;</p><p> presentParams.MultiSampleQuality = graphicsSettings.WindowedMultisampleQuality;</p><p> presentParams.AutoDepthStencilFormat = graphicsSettings.WindowedDepthStencilBufferFormat;</p><p> presentParams.BackBufferWidth = ourRenderTarget.ClientRectangle.Right - ourRenderTarget.ClientRectangle.Left;</p><p> presentParams.BackBufferHeight = ourRenderTarget.ClientRectangle.Bottom - ourRenderTarget.ClientRectangle.Top;</p><p> presentParams.BackBufferFormat = graphicsSettings.BackBufferFormat;</p><p> presentParams.PresentationInterval = PresentInterval.Default;</p><p> presentParams.FullScreenRefreshRateInHz = 0;</p><p> presentParams.SwapEffect = SwapEffect.Discard;</p><p> presentParams.PresentFlag = PresentFlag.Video; //PresentFlag.LockableBackBuffer;</p><p> presentParams.DeviceWindow = ourRenderTarget;</p><p> presentParams.Windowed = true;</p><p> //presentParams.PresentationInterval = PresentInterval.Immediate;</p><p> }</p><p> else</p><p> {</p><p> presentParams.MultiSample = graphicsSettings.FullscreenMultisampleType;</p><p> presentParams.MultiSampleQuality = graphicsSettings.FullscreenMultisampleQuality;</p><p> presentParams.AutoDepthStencilFormat = graphicsSettings.FullscreenDepthStencilBufferFormat;</p><p></p><p> presentParams.BackBufferWidth = graphicsSettings.DisplayMode.Width;</p><p> presentParams.BackBufferHeight = graphicsSettings.DisplayMode.Height;</p><p> presentParams.BackBufferFormat = graphicsSettings.DeviceCombo.BackBufferFormat;</p><p> presentParams.PresentationInterval = PresentInterval.Default;</p><p> presentParams.FullScreenRefreshRateInHz = graphicsSettings.DisplayMode.RefreshRate;</p><p> presentParams.SwapEffect = SwapEffect.Discard;</p><p> presentParams.PresentFlag = PresentFlag.Video; //|PresentFlag.LockableBackBuffer;</p><p> presentParams.DeviceWindow = this;</p><p> presentParams.Windowed = false;</p><p> }</p><p>[/code]</p><p> </p><p>Please put that fix in, it's going to make a lot of people happy.</p></blockquote><p></p>
[QUOTE="zeflash, post: 178214, member: 13641"] Had this error for a long time (at least with NVidia cards, somehow the ATI I had before wasn't showing up that bug). I checked the source. In d3dapp.cs, BuildPresentParamsFromSettings function: [code] if (windowed) { presentParams.MultiSample = graphicsSettings.WindowedMultisampleType; presentParams.MultiSampleQuality = graphicsSettings.WindowedMultisampleQuality; presentParams.AutoDepthStencilFormat = graphicsSettings.WindowedDepthStencilBufferFormat; presentParams.BackBufferWidth = ourRenderTarget.ClientRectangle.Right - ourRenderTarget.ClientRectangle.Left; presentParams.BackBufferHeight = ourRenderTarget.ClientRectangle.Bottom - ourRenderTarget.ClientRectangle.Top; presentParams.BackBufferFormat = graphicsSettings.BackBufferFormat; presentParams.PresentationInterval = PresentInterval.Immediate; presentParams.FullScreenRefreshRateInHz = 0; presentParams.SwapEffect = SwapEffect.Discard; presentParams.PresentFlag = PresentFlag.Video; //PresentFlag.LockableBackBuffer; presentParams.DeviceWindow = ourRenderTarget; presentParams.Windowed = true; //presentParams.PresentationInterval = PresentInterval.Immediate; } else { presentParams.MultiSample = graphicsSettings.FullscreenMultisampleType; presentParams.MultiSampleQuality = graphicsSettings.FullscreenMultisampleQuality; presentParams.AutoDepthStencilFormat = graphicsSettings.FullscreenDepthStencilBufferFormat; presentParams.BackBufferWidth = graphicsSettings.DisplayMode.Width; presentParams.BackBufferHeight = graphicsSettings.DisplayMode.Height; presentParams.BackBufferFormat = graphicsSettings.DeviceCombo.BackBufferFormat; presentParams.PresentationInterval = PresentInterval.Default; presentParams.FullScreenRefreshRateInHz = graphicsSettings.DisplayMode.RefreshRate; presentParams.SwapEffect = SwapEffect.Discard; presentParams.PresentFlag = PresentFlag.Video; //|PresentFlag.LockableBackBuffer; presentParams.DeviceWindow = this; presentParams.Windowed = false; } [/code] even though I'm starting MP fullscreen, windowed is true. Therefore, the presentation used is PresentInterval.Immediate, which causes tearing as it's not waiting the vsync to present the backbuffers. PresentInterval.Default should be used instead, to preserve vsync at all time. Should be this way instead (and I tested it, it works fine): [code] if (windowed) { presentParams.MultiSample = graphicsSettings.WindowedMultisampleType; presentParams.MultiSampleQuality = graphicsSettings.WindowedMultisampleQuality; presentParams.AutoDepthStencilFormat = graphicsSettings.WindowedDepthStencilBufferFormat; presentParams.BackBufferWidth = ourRenderTarget.ClientRectangle.Right - ourRenderTarget.ClientRectangle.Left; presentParams.BackBufferHeight = ourRenderTarget.ClientRectangle.Bottom - ourRenderTarget.ClientRectangle.Top; presentParams.BackBufferFormat = graphicsSettings.BackBufferFormat; presentParams.PresentationInterval = PresentInterval.Default; presentParams.FullScreenRefreshRateInHz = 0; presentParams.SwapEffect = SwapEffect.Discard; presentParams.PresentFlag = PresentFlag.Video; //PresentFlag.LockableBackBuffer; presentParams.DeviceWindow = ourRenderTarget; presentParams.Windowed = true; //presentParams.PresentationInterval = PresentInterval.Immediate; } else { presentParams.MultiSample = graphicsSettings.FullscreenMultisampleType; presentParams.MultiSampleQuality = graphicsSettings.FullscreenMultisampleQuality; presentParams.AutoDepthStencilFormat = graphicsSettings.FullscreenDepthStencilBufferFormat; presentParams.BackBufferWidth = graphicsSettings.DisplayMode.Width; presentParams.BackBufferHeight = graphicsSettings.DisplayMode.Height; presentParams.BackBufferFormat = graphicsSettings.DeviceCombo.BackBufferFormat; presentParams.PresentationInterval = PresentInterval.Default; presentParams.FullScreenRefreshRateInHz = graphicsSettings.DisplayMode.RefreshRate; presentParams.SwapEffect = SwapEffect.Discard; presentParams.PresentFlag = PresentFlag.Video; //|PresentFlag.LockableBackBuffer; presentParams.DeviceWindow = this; presentParams.Windowed = false; } [/code] Please put that fix in, it's going to make a lot of people happy. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Fix for tearing when VMR exclusive mode isn't checked.
Contact us
RSS
Top
Bottom