https://bugs.winehq.org/show_bug.cgi?id=51032
Bug ID: 51032 Summary: [wined3d]Autodesk Revit shows black frame in some scene. Product: Wine Version: 6.6 Hardware: x86-64 OS: Windows Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: acyellow@gmail.com
Created attachment 69886 --> https://bugs.winehq.org/attachment.cgi?id=69886 The Revit black screen picture
1. Compile directx dll for Windows including d3d9.dll, d3d11.dll, dxgi.dll, wined3d.dll. 2. Install Autodesk Revit on Windows OS and Nvidia Graphics card platform. 3. Intall the Wined3d dlls in Windows and make sure Revit load the wined3d dlls. 4. Open the default project: RAC_basic_sample_project.rvt 5. Open all -> 3D view -> Kitchen 6. The picture is black and report some errors in WinDBG in wine dlls.
please find the attachment the wrong picture and logs. Thanks a lot.
https://bugs.winehq.org/show_bug.cgi?id=51032
--- Comment #1 from Ancheng acyellow@gmail.com --- Created attachment 69887 --> https://bugs.winehq.org/attachment.cgi?id=69887 logs in WinDBG
https://bugs.winehq.org/show_bug.cgi?id=51032
Ancheng acyellow@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=51032
Ancheng acyellow@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |acyellow@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=51032
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com Summary|[wined3d]Autodesk Revit |Autodesk Revit shows a |shows black frame in some |black frame in some scenes |scene. |
https://bugs.winehq.org/show_bug.cgi?id=51032
--- Comment #2 from Stefan Dösinger stefan@codeweavers.com --- Did you test if the same issue happens when running the application on Linux? wined3d on windows is generally supposed to work, but it is a configuration we rarely test. The main purpose behind it is as a debugging tool - it allows us to separate d3d from non-d3d issues.
There are a few Windows-specific caveats that Wine doesn't have: WGL allows setting a window's pixel format only once. Wine's WGL has a wine-specific extension for d3d to use here. Furthermore, wglShareLists only works on non-current contexts on Windows. The latter is mostly moot with CSMT=1 (default) because the only reason we'd use two contexts are d3d calls from multiple threads.
I see two debug breakpoints in your output. Are those from attaching the debugger, or is it maybe a sign of a real problem?
https://bugs.winehq.org/show_bug.cgi?id=51032
--- Comment #3 from Stefan Dösinger stefan@codeweavers.com --- fwiw the log contains hints towards certain missing features in out d3d11 implementation:
"Class linkage is not implemented yet" - ID3D11ClassLinkage parameter for d3d11 shaders Backend can't handle opcode dcl_stream. Unhandled DXGI usage 0x40 WARP driver not implemented, falling back to hardware.
The latter is troublesome. I suspect there is a reason why the application specifically requests the WARP driver. Or are you running this inside a virtual machine without 3D hardware? Maybe the application is doing something questionable on its side that won't work with HW d3d; In this case it is also likely to fail with HW GL.
https://bugs.winehq.org/show_bug.cgi?id=51032
--- Comment #4 from Ancheng acyellow@gmail.com --- (In reply to Stefan Dösinger from comment #2)
Did you test if the same issue happens when running the application on Linux?
Ancheng: I don't test it on Linux. By the way, in Ubuntu18.04 Wine environment, I often encounter some errors in the App installation process, or some errors not related with D3D when run the App.
wined3d on windows is generally supposed to work, but it is a configuration we rarely test. The main purpose behind it is as a debugging tool - it allows us to separate d3d from non-d3d issues.
There are a few Windows-specific caveats that Wine doesn't have: WGL allows setting a window's pixel format only once. Wine's WGL has a wine-specific extension for d3d to use here.
Ancheng: In my environtment the OpenGL driver is from NVIDIA, seems not implement the wine-specific extension?
Furthermore, wglShareLists only works on non-current contexts on Windows. The latter is mostly moot with CSMT=1 (default) because the only reason we'd use two contexts are d3d calls from multiple threads.
Ancheng: I try to initialize cs_multithreaded with WINED3D_CSMT_SERIALIZE or 0, it still fails, the App D3D window is black.
I see two debug breakpoints in your output. Are those from attaching the debugger, or is it maybe a sign of a real problem?
Ancheng: It is from attaching the debugger and from breaking manually.
https://bugs.winehq.org/show_bug.cgi?id=51032
--- Comment #5 from Ancheng acyellow@gmail.com --- (In reply to Stefan Dösinger from comment #3)
fwiw the log contains hints towards certain missing features in out d3d11 implementation:
"Class linkage is not implemented yet" - ID3D11ClassLinkage parameter for d3d11 shaders Backend can't handle opcode dcl_stream. Unhandled DXGI usage 0x40 WARP driver not implemented, falling back to hardware.
Ancheng: is there any quick workaround for me to avoid the above error?
The latter is troublesome. I suspect there is a reason why the application specifically requests the WARP driver. Or are you running this inside a virtual machine without 3D hardware? Maybe the application is doing something questionable on its side that won't work with HW d3d; In thiscase it is also likely to fail with HW GL.
Ancheng: My environment: Windows VM + NVIDIA T4 GPU(Passthrough mode), replace d3d9.dll, d3d11.dll, dxgi.dll and wined3d.dll with Wine. In this case when run Revit, the GPU occupation is higher(5%-20%). In the original NVIDIA D3D dll environment, d3d10warp.dll is loaded by Revit and also use GPU hardware to render(GPU occupation is higher). So seems that Revit just uses WARP driver to render in some cases, it also uses GPU HW to render.
I attach a full log from openning Revit to the black screen bug, any sugguestion is welcome, I can try your idea in my environment. Thanks a lot.
https://bugs.winehq.org/show_bug.cgi?id=51032
--- Comment #6 from Ancheng acyellow@gmail.com --- Created attachment 69931 --> https://bugs.winehq.org/attachment.cgi?id=69931 full log for Revit black screen bug
https://bugs.winehq.org/show_bug.cgi?id=51032
--- Comment #7 from Ancheng acyellow@gmail.com --- Hi Stefan Dösinger,
I have a question about D3D hlsl compiler. If run the D3D11 App with VS/PS/CS on Windows, the d3dcompiler_xx.dll is needed, am I right? Does the d3dcompiler_xx.dll convert the hlsl to glsl? Thanks!
Ancheng
https://bugs.winehq.org/show_bug.cgi?id=51032
--- Comment #8 from Stefan Dösinger stefan@codeweavers.com --- d3dcompiler converts HLSL to d3d bytecode. Wined3d will convert d3d bytecode to GLSL or SPIR.
https://bugs.winehq.org/show_bug.cgi?id=51032
--- Comment #9 from Ancheng acyellow@gmail.com --- (In reply to Stefan Dösinger from comment #8)
d3dcompiler converts HLSL to d3d bytecode. Wined3d will convert d3d bytecode to GLSL or SPIR.
Thanks for your reply, I get it.
I find that in D3D SDK samples, the compute shader related samples are all failed(AdaptiveTessellationCS40.exe FluidCS11.exe HDRToneMappingCS11.exe NBodyGravityCS11.exe), and the failed Revit scene also uses compute shader, I guess maybe the render bug is caused by compute shader bug. I appreciate any clue/advice if you think up something. Thanks a lot.
https://bugs.winehq.org/show_bug.cgi?id=51032
--- Comment #10 from Ancheng acyellow@gmail.com --- Hi Stefan Dösinger,
The max OpenGL version on my Windows is 4.3, as the following code in Windd3d, it creates a gl context with version 3.2. I find that OpenGL supports compute shader feature on version 4.3 or later, so is it the reason DX compute shader samples fail on my system?
static const DWORD supported_gl_versions[] = { MAKEDWORD_VERSION(4, 4), MAKEDWORD_VERSION(3, 2), MAKEDWORD_VERSION(1, 0), };
https://bugs.winehq.org/show_bug.cgi?id=51032
--- Comment #11 from Ancheng acyellow@gmail.com --- Hi Stefan Dösinger,
From the log file, we find that class linkage is not implemented and Revit App
do use ID3D11ClassLinkage to create shader(ID3D11ClassLinkage *class_linkage is not NULL), may it cause the black screen bug? Do you have a schedule to implement the class linkage feature?
code as below: if (class_linkage) FIXME("d3d11_device_CreateVertexShader: Class linkage is not implemented yet.\n");
Ancheng
https://bugs.winehq.org/show_bug.cgi?id=51032
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Autodesk Revit shows a |Autodesk Revit 2021 shows a |black frame in some scenes |black frame in some scenes | |on Windows using wined3d CC| |focht@gmx.net URL| |https://edutrial.autodesk.c | |om/NetSWDLD/2021/RVT/5A103F | |CF-A48C-4B74-A1FB-3B46BAE71 | |CE5/SFX/Revit_2021_G1_Win_6 | |4bit_dlm_001_006.sfx.exe Keywords| |download
--- Comment #12 from Anastasius Focht focht@gmx.net --- Hello folks,
refining the summary to mention Revit version. It's an important property of a bug report.
I've found download links for Autodesk Revit 2021 here:
https://edutrial.autodesk.com/NetSWDLD/2021/RVT/5A103FCF-A48C-4B74-A1FB-3B46...
https://edutrial.autodesk.com/NetSWDLD/2021/RVT/5A103FCF-A48C-4B74-A1FB-3B46...
https://edutrial.autodesk.com/NetSWDLD/2021/RVT/5A103FCF-A48C-4B74-A1FB-3B46...
https://edutrial.autodesk.com/NetSWDLD/2021/RVT/5A103FCF-A48C-4B74-A1FB-3B46...
https://edutrial.autodesk.com/NetSWDLD/2021/RVT/5A103FCF-A48C-4B74-A1FB-3B46...
https://edutrial.autodesk.com/NetSWDLD/2021/RVT/5A103FCF-A48C-4B74-A1FB-3B46...
I'm currently creating snapshots via archive.org but that takes some time because these archives are large (10 GB combined).
Regards