浏览代码

fixed textureSize() directx implementation

Nicolas Cannasse 4 年之前
父节点
当前提交
8caf26d78b
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      hxsl/HlslOut.hx

+ 3 - 3
hxsl/HlslOut.hx

@@ -341,9 +341,9 @@ class HlslOut {
 			}
 			add("))");
 		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(");
 			addValue(args[0], tabs);
 			if (args.length != 1) {