Project

General

Profile

Actions

Emulator Issues #6483

closed

D3D11 + XFB Real = weird green box with fullscreen

Added by nigel.harris.uk over 10 years ago.

Status:
Fixed
Priority:
Low
Assignee:
Category:
GFX
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Current
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What went wrong?
Use D3D11 backend with XFB set to real and this happens on full screen:
http://i.imgur.com/Os2XHmk.jpg

occurs whether in 4:3 or forced 16:9.

What did you expect to happen?
Not to have a green box around the full screened image:
http://i.imgur.com/gFJRoYU.jpg

What steps will reproduce the problem?
Dolphin 3.5 stable to 3.5-1755
Use D3D11 backend
Use XFB Real

GTX780
Windows 7 64

Disabling XFB or set XFB to virtual to fix issue.
Issue is not present in D3D9 / OGL.

Actions #1

Updated by nigel.harris.uk over 10 years ago

please flick back and forth between the two imagur links to see the green box clearly.

Actions #2

Updated by idan345 over 10 years ago

I can confirm It's present in my computer aswell.
Kinda hard to notice. but it's there.

Actions #3

Updated by MayImilae over 10 years ago

  • Status changed from New to Accepted
  • Issue type set to Bug
  • Category set to gfx
  • Priority set to Low

XFB Real has a bunch of known weird issues. So far no one has cared to deal with them.

Anyway, reproduced. If there was a "who the hell cares" priority I'd use it. XFB Real has serious problems and you're pointing out a green 1px border?

Actions #4

Updated by NeoBrainX over 10 years ago

The problem outlined here is fixed in limburgerite's fork, iirc: http://code.google.com/r/limburgerite-dolphin-emu/source/list?name=xfb-fixes

Actions #5

Updated by limburgerite over 10 years ago

Sorry for being MIA for so long.

See
http://code.google.com/r/limburgerite-dolphin-emu/source/browse/Source/Plugins/Plugin_VideoDX11/Src/Television.cpp?r=9d7a6d45985a#93
for an explanation of the issue and how I fixed it.

Actions #6

Updated by NeoBrainX over 10 years ago

  • Status changed from Accepted to Work started
  • Milestone set to Next
  • Operating system N/A added

@ limburgerite: You're still welcome to tidy up your other fixes and create pull requests for them ;)

Actions #7

Updated by nigel.harris.uk over 10 years ago

thanks both

Actions #8

Updated by limburgerite over 10 years ago

@ NeoBrainX: I'm working on giving each fix its own branch, hopefully with fewer ZOMG I'M SO ST00PID commits.

In the meantime, I've made a cleaned-up fix for this issue:
http://code.google.com/r/limburgerite-dolphin-emu/source/detail?name=issue-6483&r=6ca1410bab4d34e7cff96c295d3d09934f7dec31
It's a pretty simple change that only affects Television.cpp/.h. Should I create a pull request for this specific commit?

Actions #9

Updated by phire over 10 years ago

The background is only filled in during initialization.
Will there be issues if a game starts with a 640 wide xfb and drops down to a smaller one later?
I don't know if any games do that.

Otherwise, looks fine to me.

Actions #10

Updated by limburgerite over 10 years ago

I thought about the XFB size shrinking, but never saw any problems in my testing (the border would probably contain garbage instead of green in that case).

Perhaps there's some way to monitor size changes and clear out the unused area if it shrinks? Might be more trouble than it's worth.

Actions #11

Updated by delroth over 10 years ago

  • Milestone changed from Next to Current

4.0 was released, moving Milestone-Next to Milestone-Current.

Actions #12

Updated by NeoBrainX over 10 years ago

@ limburgerite: I don't think a PR is necessary for that patch. Just one thing: Instead of using UpdateSubresource, ID3D11Device::CreateTexture2D allows you to specify initial texture data with the second parameter (cf. http://msdn.microsoft.com/de-de/library/windows/desktop/ff476521%28v=vs.85%29.aspx ). Could you change your patch to do that? Apart from that it should be fine for merging.

Actions #14

Updated by NeoBrainX over 10 years ago

"// is actually two green pixels - YCbCr black is 16,128,16,128)" Is that supposed to be ARGB or RGBA or .. ?

Actions #15

Updated by limburgerite over 10 years ago

That line should probably read:
// is actually two green YUYV pixels - YUYV black is 16,128,16,128

YCbCr black is technically 16,128,128 (y,u,v)

Too bad DXGI_FORMAT_YUY2 is only supported in Window 8...

Actions #16

Updated by NeoBrainX over 10 years ago

Right, I misunderstood the point of that comment. It makes sense now. I'll be pushing it in a minute with your new comment.

Actions #17

Updated by NeoBrainX over 10 years ago

Wait, should it be YUVY in the comment above that line as well?
// (remember, the XFB is being interpreted as YCbCr, and 0,0,0,0

Actions #18

Updated by limburgerite over 10 years ago

Yes, actually I just updated all the references to YUYV. I can push an updated version in a couple of minutes if you want to wait.

Actions #19

Updated by NeoBrainX over 10 years ago

Yes, that would be nicer than me missing some reference and messing up everything :)

Actions #20

Updated by limburgerite over 10 years ago

I think we have a winner:
http://code.google.com/r/limburgerite-dolphin-emu/source/detail?r=6c33ce20b2be7aa94e7152bfe016e2e9a3743fee&name=issue-6483

Comments should be a bit clearer now about what the fix is doing.

Would've done this sooner but Google Code seems to be having an episode at the moment.

Actions #21

Updated by NeoBrainX over 10 years ago

  • Status changed from Work started to Fixed

This issue was closed by revision 649fd3d95b01.

Actions #22

Updated by comexk over 10 years ago

This issue was closed by revision 649fd3d95b01.

Actions #23

Updated by comexk over 10 years ago

This issue was closed by revision 649fd3d95b01.

Actions

Also available in: Atom PDF