Selaa lähdekoodia

startup performances improved in -debug mode

ncannasse 11 vuotta sitten
vanhempi
commit
749eaf0dca
3 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 1 0
      h3d/prim/BigPrimitive.hx
  2. 1 0
      hxd/Pixels.hx
  3. 2 1
      hxsl/AgalOptim.hx

+ 1 - 0
h3d/prim/BigPrimitive.hx

@@ -105,6 +105,7 @@ class BigPrimitive extends Primitive {
 		return addSub(buf, idx, 0, 0, Std.int(buf.length / (stride < 0 ? this.stride : stride)), Std.int(idx.length / 3), dx, dy, dz, rotation, scale, stride);
 	}
 
+	@:noDebug
 	public function addSub( buf : hxd.FloatBuffer, idx : hxd.IndexBuffer, startVert, startTri, nvert, triCount, dx : Float = 0. , dy : Float = 0., dz : Float = 0., rotation = 0., scale = 1., stride = -1, deltaU = 0., deltaV = 0. ) {
 		if( tmpBuf == null ) {
 			tmpBuf = new hxd.FloatBuffer();

+ 1 - 0
hxd/Pixels.hx

@@ -55,6 +55,7 @@ class Pixels {
 		flags.unset(ReadOnly);
 	}
 
+	@:noDebug
 	public function convert( target : PixelFormat ) {
 		if( format == target )
 			return;

+ 2 - 1
hxsl/AgalOptim.hx

@@ -19,6 +19,7 @@ private class RegInfos {
 	}
 }
 
+@:noDebug
 class AgalOptim {
 
 	static var COMPS = [X, Y, Z, W];
@@ -678,7 +679,7 @@ class AgalOptim {
 		}
 	}
 
-	function map( op : Opcode, r : Reg -> Bool -> Reg ) {
+	inline function map( op : Opcode, r : Reg -> Bool -> Reg ) {
 		inline function unop(d, v, op) {
 			v = r(v, false);
 			return op(r(d, true), v);