소스 검색

Added RoundEven instruction in HXSL.
RoundEven maps to round in HLSL.

btoth 1 년 전
부모
커밋
b12384fa84
3개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      hxsl/Ast.hx
  2. 1 1
      hxsl/Checker.hx
  3. 1 0
      hxsl/HlslOut.hx

+ 1 - 0
hxsl/Ast.hx

@@ -279,6 +279,7 @@ enum TGlobal {
 	FloatBitsToUint;
 	IntBitsToFloat;
 	UintBitsToFloat;
+	RoundEven;
 }
 
 enum Component {

+ 1 - 1
hxsl/Checker.hx

@@ -51,7 +51,7 @@ class Checker {
 		for( g in Ast.TGlobal.createAll() ) {
 			var def = switch( g ) {
 			case Vec2, Vec3, Vec4, Mat2, Mat3, Mat3x4, Mat4, IVec2, IVec3, IVec4, BVec2, BVec3, BVec4: [];
-			case Radians, Degrees, Cos, Sin, Tan, Asin, Acos, Exp, Log, Exp2, Log2, Sqrt, Inversesqrt, Abs, Sign, Floor, Ceil, Fract, Saturate: genFloat;
+			case Radians, Degrees, Cos, Sin, Tan, Asin, Acos, Exp, Log, Exp2, Log2, Sqrt, Inversesqrt, Abs, Sign, Floor, Ceil, RoundEven, Fract, Saturate: genFloat;
 			case Atan: genFloat.concat(genFloat2);
 			case Pow: genFloat2;
 			case LReflect:

+ 1 - 0
hxsl/HlslOut.hx

@@ -84,6 +84,7 @@ class HlslOut {
 		m.set(FloatBitsToUint, "asuint");
 		m.set(IntBitsToFloat, "asfloat");
 		m.set(UintBitsToFloat, "_uintBitsToFloat");
+		m.set(RoundEven, "round");
 		for( g in m )
 			KWDS.set(g, true);
 		m;