Procházet zdrojové kódy

fixed textureSize() directx implementation

Nicolas Cannasse před 4 roky
rodič
revize
8caf26d78b
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      hxsl/HlslOut.hx

+ 3 - 3
hxsl/HlslOut.hx

@@ -341,9 +341,9 @@ class HlslOut {
 			}
 			}
 			add("))");
 			add("))");
 		case TCall({ e : TGlobal(g = (TextureSize)) }, args):
 		case TCall({ e : TGlobal(g = (TextureSize)) }, args):
-			decl("float2 textureSize(Texture2D tex, int lod) { float w; float h; tex.GetDimensions(tex, (uint)lod, out w, out h); return float2(w, h); }");
-			decl("float3 textureSize(Texture2DArray tex, int lod) { float w; float h; float els; tex.GetDimensions(tex, (uint)lod, out w, out h, out els); return float3(w, h, els); }");
-			decl("float2 textureSize(TextureCube tex, int lod) { float w; float h; tex.GetDimensions(tex, (uint)lod, out w, out h); return float2(w, h); }");
+			decl("float2 textureSize(Texture2D tex, int lod) { float w; float h; float levels; tex.GetDimensions((uint)lod,w,h,levels); return float2(w, h); }");
+			decl("float3 textureSize(Texture2DArray tex, int lod) { float w; float h; float els; float levels; tex.GetDimensions((uint)lod,w,h,els,levels); return float3(w, h, els); }");
+			decl("float2 textureSize(TextureCube tex, int lod) { float w; float h; float levels; tex.GetDimensions((uint)lod,w,h,levels); return float2(w, h); }");
 			add("textureSize(");
 			add("textureSize(");
 			addValue(args[0], tabs);
 			addValue(args[0], tabs);
 			if (args.length != 1) {
 			if (args.length != 1) {