[PATCH 1/4] wined3d: 1x1 texures have a power of two size

Stefan Dösinger stefan at codeweavers.com
Sat Apr 13 09:37:14 CDT 2013


---
 dlls/wined3d/texture.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 9bf4c2e..6353a50 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -965,8 +965,6 @@ static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT he
             && !(format->id == WINED3DFMT_P8_UINT && gl_info->supported[EXT_PALETTED_TEXTURE]
             && wined3d_settings.rendertargetlock_mode == RTL_READTEX))
     {
-        if (width != 1 || height != 1)
-            texture->flags &= ~WINED3D_TEXTURE_POW2_MAT_IDENT;
 
         texture->pow2_matrix[0] = (float)width;
         texture->pow2_matrix[5] = (float)height;
@@ -974,6 +972,7 @@ static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT he
         texture->pow2_matrix[15] = 1.0f;
         texture->target = GL_TEXTURE_RECTANGLE_ARB;
         texture->flags |= WINED3D_TEXTURE_COND_NP2;
+        texture->flags &= ~WINED3D_TEXTURE_POW2_MAT_IDENT;
 
         if (texture->resource.format->flags & WINED3DFMT_FLAG_FILTERING)
             texture->min_mip_lookup = minMipLookup_noMip;
-- 
1.8.1.5




More information about the wine-patches mailing list