From 022de0d45abcf142e52ad9869d49a2be90af7c3c Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 13 May 2017 17:31:21 -0700 Subject: [PATCH] D3D11: Fix initialization of mipmaps. --- ext/native/thin3d/thin3d_d3d11.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/native/thin3d/thin3d_d3d11.cpp b/ext/native/thin3d/thin3d_d3d11.cpp index 5a32aca56c..2d40ad00ed 100644 --- a/ext/native/thin3d/thin3d_d3d11.cpp +++ b/ext/native/thin3d/thin3d_d3d11.cpp @@ -714,7 +714,7 @@ Texture *D3D11DrawContext::CreateTexture(const TextureDesc &desc) { int w = desc.width; int h = desc.height; for (int i = 0; i < (int)desc.initData.size(); i++) { - initData[i].pSysMem = desc.initData[0]; + initData[i].pSysMem = desc.initData[i]; initData[i].SysMemPitch = (UINT)(w * DataFormatSizeInBytes(desc.format)); initData[i].SysMemSlicePitch = (UINT)(w * h * DataFormatSizeInBytes(desc.format)); w /= 2;