浏览代码

CacheFile : Skip duplicate runtime shader instead of throw

TothBenoit 1 周之前
父节点
当前提交
dfb0738683
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      hxsl/CacheFile.hx

+ 4 - 1
hxsl/CacheFile.hx

@@ -332,7 +332,10 @@ class CacheFile extends Cache {
 					throw "assert";
 				}
 				var rt2 = rttMap.get(r.specSign);
-				if( rt2 != null ) throw "assert";
+				if( rt2 != null ) {
+					log("Duplicate runtime shader found");
+					continue;
+				}
 				runtimeShaders.push(rt);
 				rttMap.set(r.specSign, { rt : rt, shaders : shaderList });
 			}