Skip to content

Commit 40fc8b4

Browse files
committed
DX10-11: workaround for crash on x64
Thanks @abramcumner
1 parent e8c0e94 commit 40fc8b4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Layers/xrRenderDX10/dx10Texture.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,14 +452,16 @@ ID3DBaseTexture* CRender::texture_load(LPCSTR fRName, u32& ret_msize, bool bStag
452452
#else
453453
D3DX10_IMAGE_LOAD_INFO LoadInfo;
454454
#endif
455-
// LoadInfo.FirstMipLevel = img_loaded_lod;
456455
LoadInfo.Width = IMG.Width;
457456
LoadInfo.Height = IMG.Height;
458457

458+
// x64 crash workaround
459+
#ifdef XR_X64
460+
LoadInfo.FirstMipLevel = img_loaded_lod;
461+
#else
459462
if (img_loaded_lod)
460-
{
461463
Reduce(LoadInfo.Width, LoadInfo.Height, IMG.MipLevels, img_loaded_lod);
462-
}
464+
#endif
463465

464466
// LoadInfo.Usage = D3D_USAGE_IMMUTABLE;
465467
if (bStaging)

0 commit comments

Comments
 (0)