- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are basically two problems. The first one is that IDirect3DSwapChain9::Present will sometimes fail with E_FAIL. This results in some things not getting displayed. Usually only noticable on paused video if the video needs to be redrawn. If this happens I can simply call Present again immediately after failing and everything is fine.
The other problem is that my ID3DXFont text gets garbled and/or disappears. See theattached screenshots for examples of this. Usually the garbled text will eventually correct itself, but then certain characters will be missing. So if you were to watch the time countup thenfor instance the numbers7, 8, and 9 may not display.I've done a lot of testing and both of these errors only appear if I'm doing a StretchRect to convert NV12, YV12, or I420 to RGB. If I remove the StretchRect call or simply use UYVY or YUY2 formats then neither problem happens. The other thing that I've found is if I do my present hack after StretchRect and then do another present after I've done all the DrawText calls then the text will not be garbled. However, because I'm doing 2 present calls in my render loop at that point it causes the text to occassionally flash.
I've also enabled debugging in Direct3D and the ONLY error or warning comes up in the Present call. Unfortunately I can't provide the full code, but if you need any snippets please let me know. Here's thefull debug output when this happens:
[1928] Direct3D9: :====> ENTER: DLLMAIN(64e6d9a0): Process Attach: 00000788, tid=00000aa0
[1928]
[1928] Direct3D9: :====> EXIT: DLLMAIN(64e6d9a0): Process Attach: 00000788
[1928]
[1928] Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
[1928]
[1928] 9:53:00 AM: Adapter 0, Monitor 0x00010001: Current Monitor = Yes, Position: (436, 69), Monitor Area = (0, 0) (1920, 1080), Work Area = (0, 0) (1920, 1040), Flags: 1
[1928] 9:53:00 AM: Direct3D Capabilities - Adapter Name: Intel HD Graphics Family
[1928] 9:53:00 AM: Direct3D Capabilities - Driver Version: igdumdx32.dll (8.15.10.2622)
[1928] 9:53:00 AM: Direct3D Capabilities - Max Texture Size: 8192x8192
[1928] 9:53:00 AM: Direct3D Capabilities - Non Power of 2 Supported: Yes
[1928] 9:53:00 AM: Direct3D Capabilities - Square Textures Only: No
[1928] 9:53:00 AM: Direct3D Capabilities - Format PIXEL_TYPE_NV12 (22) Supported: Yes
[1928] 9:53:00 AM: Direct3D Capabilities - Format PIXEL_TYPE_YV12 (23) Supported: Yes
[1928] 9:53:00 AM: Direct3D Capabilities - Format PIXEL_TYPE_YUV420P (0) Supported: Yes
[1928] 9:53:00 AM: Direct3D Capabilities - Format PIXEL_TYPE_YUV422 (1) Supported: Yes
[1928] 9:53:00 AM: Direct3D Capabilities - Format PIXEL_TYPE_UYV422 (21) Supported: Yes
[1928] 9:53:00 AM: Direct3D Capabilities - Format PIXEL_TYPE_BGR24 (3) Supported: No
[1928] 9:53:00 AM: Direct3D Capabilities - Format PIXEL_TYPE_RGBA32 (6) Supported: Yes
[1928] Direct3D9: (INFO) :======================= Hal HWVP device selected
[1928]
[1928] Direct3D9: (INFO) :HalDevice Driver Style b
[1928]
[1928] Direct3D9: :DoneExclusiveMode
[1928]
[1928] Direct3D9: (INFO) :Using FF to VS converter
[1928]
[1928] Direct3D9: (INFO) :Using FF to PS converter
[1928]
[1928] Direct3D9: (INFO) :Enabling multi-processor optimizations
[1928]
[1928] D3D9 Helper: Warning: Default value for D3DRS_POINTSIZE_MAX is 2.19902e+012f, not 8.79908e-316f. This is ok.
[1928] Direct3D9: :DoneExclusiveMode
[1928]
[1928] D3DX: Unicode support: 1
[1928]
[1928] Direct3D9: (ERROR) :BitBlt or StretchBlt failed in Present
[1928]
[1928] D3D9 Helper: IDirect3DSwapChain9::Present failed: E_FAIL
[1928] 9:53:00 AM: Direct3D Error - Direct3D failed to present.: An undetermined error occurred (0x80004005)
[1928] Direct3D9: (ERROR) :BitBlt or StretchBlt failed in Present
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page