[Bug 44052] Multiple applications and games fail to run due to missing D2D device and device context and multiple API stubs (Temple+, DJKaty.com 'Simple2D' examples)
wine-bugs at winehq.org
wine-bugs at winehq.org
Sat Aug 25 17:22:52 CDT 2018
https://bugs.winehq.org/show_bug.cgi?id=44052
Anastasius Focht <focht at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |focht at gmx.net
Summary|Temple+ does not run due to |Multiple applications and
|missing D2D device and |games fail to run due to
|device context and multiple |missing D2D device and
|API stubs |device context and multiple
| |API stubs (Temple+,
| |DJKaty.com 'Simple2D'
| |examples)
Keywords| |download
Component|-unknown |d2d
URL| |http://files.djkaty.com/sof
| |tware/Simple2D/Simple2DSetu
| |p-1.13.exe
--- Comment #38 from Anastasius Focht <focht at gmx.net> ---
Hello folks,
another set of apps/examples requiring this:
http://files.djkaty.com/software/Simple2D/
Adding this as download link, it comes with source and prebuilt examples.
Every example apps crashes the same way.
--- snip ---
$ wd
/home/focht/.wine/drive_c/Program Files (x86)/DJKaty.com/Simple2D/examples
$ file *.exe
AnimationAndGlyphMetricsDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
AnimationChainDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
AsyncHTTPDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
BitmapBrushDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
BitmapDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
BoundingBoxDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
CollisionDemo1.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
CollisionDemo2.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
CollisionDemo2-Optimized.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
CollisionDemo3.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
GamepadCallbackDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
GamepadMappingDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
GamepadTextDemo.exe: PE32 executable (console) Intel 80386, for MS
Windows
GamepadWinMsgDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
LinearGradientDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
LinearMovementDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
MSDN-Direct2D-Demo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
PathGeometryDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
SceneGraphDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
Simple3DBoxDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
Simple3DBoxSceneDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
Simple3DInitDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
SkinnedDialogDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
SliderDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
SwingingRopeDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
TextInputDemo.exe: PE32 executable (GUI) Intel 80386, for MS
Windows
$ wine ./SliderDemo.exe
...
0009:fixme:d2d:d2d_device_CreateDeviceContext iface 0x17a298, options 0,
context 0x33fc44 stub!
wine: Unhandled page fault on read access to 0x00000000 at address 0x40cbb6
(thread 0009), starting debugger...
--- snip ---
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/d2d1/device.c#l3679
--- snip ---
3679 static HRESULT WINAPI d2d_device_CreateDeviceContext(ID2D1Device *iface,
D2D1_DEVICE_CONTEXT_OPTIONS options,
3680 ID2D1DeviceContext **context)
3681 {
3682 FIXME("iface %p, options %#x, context %p stub!\n", iface, options,
context);
3683
3684 return E_NOTIMPL;
3685 }
--- snip ---
Typical app code:
--- snip ---
// Create a render target and device-specific resources
HRESULT Simple2D::CreateDeviceResources()
{
//
=================================================================================
// Direct2D 1.1 version
//
=================================================================================
// Window-size-dependent resources
SafeRelease(&Direct2DBackBuffer);
SafeRelease(&Screen);
// Create 2D device context (replaces ID2D1RenderTarget sub-classes)
Direct2DDevice->CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS_NONE,
&Screen);
// Get the back buffer as an IDXGISurface (Direct2D doesn't accept an
ID3D11Texture2D directly as a render target)
IDXGISurface *dxgiBackBuffer;
DXGISwapChain->GetBuffer(0, IID_PPV_ARGS(&dxgiBackBuffer));
// Get screen DPI
FLOAT dpiX, dpiY;
Direct2D->GetDesktopDpi(&dpiX, &dpiY);
// Create a Direct2D surface (bitmap) linked to the Direct3D texture back
buffer via the DXGI back buffer
D2D1_BITMAP_PROPERTIES1 bitmapProperties =
D2D1::BitmapProperties1(D2D1_BITMAP_OPTIONS_TARGET |
D2D1_BITMAP_OPTIONS_CANNOT_DRAW,
D2D1::PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_IGNORE),
dpiX, dpiY);
Screen->CreateBitmapFromDxgiSurface(dxgiBackBuffer, &bitmapProperties,
&Direct2DBackBuffer);
// Set surface as render target in Direct2D device context
Screen->SetTarget(Direct2DBackBuffer);
// Direct3D-specific initialization
if (Enable3D)
HRSilentReturnOnFail(CreateDirect3DResources());
// Clean up
SafeRelease(&dxgiBackBuffer);
//
=================================================================================
// End of Direct2D 1.1 version
//
=================================================================================
// Use render target to create resources
if (!SetupResources())
HRReturnOnFail(
E_FAIL,
"Could not set up the application resources");
return S_OK;
}
--- snip ---
Please avoid these meta-bugs in future but focus on one functionality/interface
per ticket. It really makes collecting dupes hard because apps require
different sets of functionalities/APIs and it also messes up bisecting of
regressions later.
$ sha1sum Simple2DSetup-1.13.exe
269c002fb9ea11c2abd8958fc3cc4294af1b45d9 Simple2DSetup-1.13.exe
$ du -sh Simple2DSetup-1.13.exe
11M Simple2DSetup-1.13.exe
$ wine --version
wine-3.14-161-g70fbfa2cb8
Regards
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list