瀏覽代碼

[DX12] invalidate unbound rtvFormat in pipeline

TothBenoit 1 年之前
父節點
當前提交
07fa3064cf
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      h3d/impl/DX12Driver.hx

+ 2 - 0
h3d/impl/DX12Driver.hx

@@ -2182,6 +2182,8 @@ class DX12Driver extends h3d.impl.Driver {
 			p.rtvFormats[i] = t == null ? R8G8B8A8_UNORM : t.t.format;
 		}
 		p.dsvFormat = cast pipelineSignature.getI32(PSIGN_DEPTH_TARGET_FORMAT);
+		for ( i in rtCount...8 )
+			p.rtvFormats[i] = DxgiFormat.UNKOWN;
 
 		for( i in 0...shader.inputCount ) {
 			var d = shader.inputLayout[i];