Ver Fonte

disabled optim if no const (close #113)

ncannasse há 10 anos atrás
pai
commit
852b0ca58e
1 ficheiros alterados com 1 adições e 15 exclusões
  1. 1 15
      hxsl/SharedShader.hx

+ 1 - 15
hxsl/SharedShader.hx

@@ -49,21 +49,7 @@ class SharedShader {
 		globals = [];
 		for( v in data.vars )
 			browseVar(v);
-		if( consts == null ) {
-			var hasFun = false;
-			for( f in data.funs )
-				switch( f.ref.name ) {
-				case "vertex", "fragment", "__init__", "__init__vertex", "__init__fragment":
-				default: hasFun = true; break;
-				}
-			if( !hasFun ) {
-				var i = new ShaderInstance(data);
-				paramsCount = 0;
-				for( v in data.vars )
-					addSelfParam(i, v);
-				instanceCache.set(0, i);
-			}
-		}
+		// don't try to optimize if consts is null, we need to do a few things in Eval
 	}
 
 	public inline function getInstance( constBits : Int ) {