Skip to content

Commit

Permalink
DX10-11: workaround for crash on x64
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Jun 3, 2018
1 parent e8c0e94 commit 40fc8b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Layers/xrRenderDX10/dx10Texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,14 +452,16 @@ ID3DBaseTexture* CRender::texture_load(LPCSTR fRName, u32& ret_msize, bool bStag
#else
D3DX10_IMAGE_LOAD_INFO LoadInfo;
#endif
// LoadInfo.FirstMipLevel = img_loaded_lod;
LoadInfo.Width = IMG.Width;
LoadInfo.Height = IMG.Height;

// x64 crash workaround
#ifdef XR_X64
LoadInfo.FirstMipLevel = img_loaded_lod;
#else
if (img_loaded_lod)
{
Reduce(LoadInfo.Width, LoadInfo.Height, IMG.MipLevels, img_loaded_lod);
}
#endif

// LoadInfo.Usage = D3D_USAGE_IMMUTABLE;
if (bStaging)
Expand Down

0 comments on commit 40fc8b4

Please sign in to comment.