浏览代码

minor fixes

Nicolas Cannasse 3 年之前
父节点
当前提交
dd50f8b107
共有 1 个文件被更改,包括 9 次插入2 次删除
  1. 9 2
      h3d/impl/DX12Driver.hx

+ 9 - 2
h3d/impl/DX12Driver.hx

@@ -269,8 +269,13 @@ class DX12Driver extends h3d.impl.Driver {
 		reset();
 	}
 
-	override function hasFeature(f:Feature):Bool {
-		return true;
+	override function hasFeature(f:Feature) {
+		return switch(f) {
+		case Queries, BottomLeftCoords:
+			false;
+		default:
+			true;
+		};
 	}
 
 	override function isSupportedFormat(fmt:h3d.mat.Data.TextureFormat):Bool {
@@ -1175,6 +1180,8 @@ class DX12Driver extends h3d.impl.Driver {
 				var sampler = frame.samplerViews.alloc(regs.texturesCount);
 				for( i in 0...regs.texturesCount ) {
 					var t = buf.tex[i];
+					if( t.t == null )
+						t.alloc();
 					var tdesc : ShaderResourceViewDesc;
 					if( t.flags.has(Cube) ) {
 						var desc = tmp.texCubeSRV;