public bool Compile(ID3DCompiler compiler) { IDXShaderBlob blob; string msg; HasError = !compiler.Compile(this.Code, this.CompileOptions, out blob, out msg); WasCompiled = true; Messages = msg; CompiledBlob = blob; return(!HasError); }
public bool Compile(ID3DCompiler compiler, IDXILCompiler dxil) { if (CompileOptions.Target.ToString()[3] == '6') { if (dxil == null) { return(false); } IDXILShaderBlob blob; string msg; HasError = !dxil.Compile(this.Code, this.CompileOptions, this.SourceFilePath, out blob, out msg); WasCompiled = true; Messages = msg; CompiledBlob = blob; } else { if (compiler == null) { return(false); } IDXBCShaderBlob blob; string msg; HasError = !compiler.Compile(this.Code, this.CompileOptions, this.SourceFilePath, out blob, out msg); WasCompiled = true; Messages = msg; CompiledBlob = blob; } // check for embedded root signature and pull it out if there is one if (CompiledBlob != null) { IDXBlob rs = CompiledBlob.ExtractRootSignature(); if (rs != null) { RootSigWasCompiled = true; RootSigHasError = false; CompiledRootSig = rs; } } return(!HasError); }
public bool Compile( ID3DCompiler compiler ) { IDXShaderBlob blob; string msg; HasError = !compiler.Compile(this.Code, this.CompileOptions, out blob, out msg); WasCompiled = true; Messages = msg; CompiledBlob = blob; return !HasError; }