From f5885defc9349bebac2bc3703f80cfda079693d3 Mon Sep 17 00:00:00 2001 From: Jason Edmeades Date: Mon, 20 Jan 2003 23:23:41 +0000 Subject: [PATCH] Only reload the mipmap images when dirty. --- dlls/d3d8/device.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index d27c1a5033..8036eeaca2 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -3178,6 +3178,9 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD glBindTexture(GL_TEXTURE_2D, pTexture2->surfaces[i]->textureName); checkGLcall("glBindTexture"); TRACE("Texture %p (level %d) given name %d\n", pTexture2->surfaces[i], i, pTexture2->surfaces[i]->textureName); + /* No need to walk through all mip-map levels, since already all assigned */ + i = pTexture2->levels; + } else { if (i==0) { @@ -3231,6 +3234,9 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD glBindTexture(GL_TEXTURE_3D, pTexture2->volumes[i]->textureName); checkGLcall("glBindTexture"); TRACE("Texture %p given name %d\n", pTexture2->volumes[i], pTexture2->volumes[i]->textureName); + + /* No need to walk through all mip-map levels, since already all assigned */ + i = pTexture2->levels; } else { if (i==0) { -- 2.33.8