st/nine: Textures start dirty
authorAxel Davy <axel.davy@ens.fr>
Sun, 3 May 2015 22:17:09 +0000 (00:17 +0200)
committerAxel Davy <axel.davy@ens.fr>
Fri, 21 Aug 2015 20:21:46 +0000 (22:21 +0200)
According to the spec all textures start
dirty.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/cubetexture9.c
src/gallium/state_trackers/nine/texture9.c
src/gallium/state_trackers/nine/volumetexture9.c

index 12157459852b5359e1f8718acb5649d659d4c081..c1e6cbdb0d834870a91b540fbf9d7c00e6683272 100644 (file)
@@ -150,8 +150,12 @@ NineCubeTexture9_ctor( struct NineCubeTexture9 *This,
         }
     }
 
-    for (i = 0; i < 6; ++i) /* width = 0 means empty, depth stays 1 */
+    for (i = 0; i < 6; ++i) {
+        /* Textures start initially dirty */
+        This->dirty_rect[i].width = EdgeLength;
+        This->dirty_rect[i].height = EdgeLength;
         This->dirty_rect[i].depth = 1;
+    }
 
     return D3D_OK;
 }
index 0127301ebdab26c602f4c625e203410e4ff190b3..6822865287ae00b5a209d733b38cc6da5f664ce2 100644 (file)
@@ -202,6 +202,9 @@ NineTexture9_ctor( struct NineTexture9 *This,
             return hr;
     }
 
+    /* Textures start initially dirty */
+    This->dirty_rect.width = Width;
+    This->dirty_rect.height = Height;
     This->dirty_rect.depth = 1; /* widht == 0 means empty, depth stays 1 */
 
     if (pSharedHandle && !*pSharedHandle) {/* Pool == D3DPOOL_SYSTEMMEM */
index 720ae57389ba69c08bafe5c9e839555839ee62cf..4b5614d0b66f806c5012f01dc765348869e9a0cb 100644 (file)
@@ -116,6 +116,9 @@ NineVolumeTexture9_ctor( struct NineVolumeTexture9 *This,
             return hr;
     }
 
+    /* Textures start initially dirty */
+    NineVolumeTexture9_AddDirtyBox(This, NULL);
+
     return D3D_OK;
 }