Selaa lähdekoodia

Lazy loading on texture only if texture is not array (waiting for fix on dx12).

clementlandrin 1 vuosi sitten
vanhempi
commit
7622436622
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5 1
      hxd/res/Image.hx

+ 5 - 1
hxd/res/Image.hx

@@ -624,7 +624,11 @@ class Image extends Resource {
 		if( DEFAULT_FILTER != Linear ) tex.filter = DEFAULT_FILTER;
 		tex.setName(entry.path);
 		setupTextureFlags(tex);
-		tex.realloc = () -> loadTexture();
+		// DirectX12 texture array triggers an access violation.
+		if ( tex.flags.has(IsArray) )
+			loadTexture();
+		else
+			tex.realloc = () -> loadTexture();
 		return tex;
 	}