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

D3D11 ERROR: ID3D11Device::CreateTexture2D #280

Closed
NotBadCoderr opened this issue Jan 2, 2024 · 2 comments
Closed

D3D11 ERROR: ID3D11Device::CreateTexture2D #280

NotBadCoderr opened this issue Jan 2, 2024 · 2 comments

Comments

@NotBadCoderr
Copy link

Hi!
My computer has dual monitors. There is no issue when recording the primary screen, but an error occurs when trying to record the secondary screen.
image

The error message seems to indicate an issue with BindFlags, and I have attempted to modify BindFlags=0. However, when attempting to CopyResource this time, another error occurs.
image

secondary screen info

DXGI_OUTPUT_DESC

  Name Value Type
DeviceName 0x000000ad09ffe3f8 L"\\.\DISPLAY1" wchar_t[32]
DesktopCoordinates {LT(1920, 0) RB(3840, 1080) [1920 x 1080]} tagRECT
AttachedToDesktop 1 int
Rotation DXGI_MODE_ROTATION_IDENTITY (1) DXGI_MODE_ROTATION
Monitor 0x0000000000010003 {unused=??? } HMONITOR__ *

DXGI_ADAPTER_DESC

  Name Value Type
Description 0x000000ad0dffec30 L"AMD Radeon(TM) Graphics" wchar_t[128]
  VendorId 4098 unsigned int
  DeviceId 5686 unsigned int
  SubSysId 977213354 unsigned int
  Revision 199 unsigned int
  DedicatedVideoMemory 520724480 unsigned __int64
  DedicatedSystemMemory 0 unsigned __int64
  SharedSystemMemory 8252983296 unsigned __int64
AdapterLuid {LowPart=73001 HighPart=0 } _LUID

primary screen info

DXGI_OUTPUT_DESC

  Name Value Type
DeviceName 0x00000017a0ffdf58 L"\\.\DISPLAY1" wchar_t[32]
DesktopCoordinates {LT(1920, 0) RB(3840, 1080) [1920 x 1080]} tagRECT
AttachedToDesktop 1 int
Rotation DXGI_MODE_ROTATION_IDENTITY (1) DXGI_MODE_ROTATION
Monitor 0x0000000000010003 {unused=??? } HMONITOR__ *

DXGI_ADAPTER_DESC

  Name Value Type
Description 0x00000017a492e7b0 L"NVIDIA GeForce GTX 1650" wchar_t[128]
VendorId 4318 unsigned int
DeviceId 8089 unsigned int
SubSysId 977475498 unsigned int
Revision 161 unsigned int
DedicatedVideoMemory 4154458112 unsigned __int64
DedicatedSystemMemory 0 unsigned __int64
SharedSystemMemory 8252983296 unsigned __int64
AdapterLuid {LowPart=75237 HighPart=0 } _LUID
@sskodje
Copy link
Owner

sskodje commented Jan 4, 2024

I believe the issue was that the texture was created on the ID3D11Device of the wrong monitor. Since you are recording from the outputs of two different video cards, there are also two ID3D11Devices, and textures have to be copied with the CPU between them. I pushed a fix with 805abff, let me know if it fixes the issue :)

@NotBadCoderr
Copy link
Author

Yes, it has been fixed. Thank you for your support.

yujahyf97 pushed a commit to yujacorp/ScreenRecorderLib that referenced this issue Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants