aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/_all.js
diff options
context:
space:
mode:
authorJeremy Ong <jeremycong@gmail.com>2022-08-09 05:32:19 -0700
committerGitHub <noreply@github.com>2022-08-09 07:32:19 -0500
commitd928bccf5a23c482837a3be007434607f1ac268a (patch)
tree38f59be0a19b04919399d963aee07c66b155cbe4 /lib/compilers/_all.js
parent6c278766e1c94bf046d1b574237c33d88ba59f91 (diff)
downloadcompiler-explorer-d928bccf5a23c482837a3be007434607f1ac268a.tar.gz
compiler-explorer-d928bccf5a23c482837a3be007434607f1ac268a.zip
Add preliminary HLSL support (#3932)gh-3870
* Add preliminary HLSL support - Adds a new language mode to monaco, extending the base C++ layer with HLSL intrinsics and types - Adds a new `HLSLCompiler` class - Adds a sample pixel shader The compiler used to test this locally is the [DirectX Shader Compiler](https://github.com/microsoft/DirectXShaderCompiler) (aka DXC), which needs to also be added to the [infra](https://github.com/compiler-explorer/infra) project. Some guidance is needed before this PR can be merged: 1. While DXC can run on Linux, there are no binaries available so this compiler must be built. Are there examples that show how we should do this as part of the infra CI/CD? Should we build and host it separately instead? The build process for DXC on Linux is relatively straightforward and documented [here](https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/DxcOnUnix.rst). 2. The example code doesn't compile unless the user also supplies additional compiler flags `-T ps_6_6 -E PSMain`. Is there a way to load these flags conditionally only if the sample is loaded? 3. Technically, DXC emits DXIL IR (based on LLVM IR) and I am wondering if it's possible to extend an existing LLVM backend. In addition, the `-spirv` compiler flag could be emitted to target the SPIR-V backend instead, so I'm curious if there is a good way to express the target backend. Signed-off-by: Jeremy Ong <jeremycong@gmail.com> * Fix copyright dates, remove unnecessary strict usage, and remove placeholder logo Signed-off-by: Jeremy Ong <jeremycong@gmail.com> * Rebase and remove unneeded HLSL logo Signed-off-by: Jeremy Ong <jeremycong@gmail.com> * Fix lint errors Signed-off-by: Jeremy Ong <jeremycong@gmail.com> * Simply HLSL sample and remove default config Signed-off-by: Jeremy Ong <jeremycong@gmail.com>
Diffstat (limited to 'lib/compilers/_all.js')
-rw-r--r--lib/compilers/_all.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compilers/_all.js b/lib/compilers/_all.js
index 83cb3738c..18c4f20aa 100644
--- a/lib/compilers/_all.js
+++ b/lib/compilers/_all.js
@@ -53,6 +53,7 @@ export {GCCCompiler} from './gcc';
export {GCCRSCompiler} from './gccrs';
export {GolangCompiler} from './golang';
export {HaskellCompiler} from './haskell';
+export {HLSLCompiler} from './hlsl';
export {ISPCCompiler} from './ispc';
export {JaktCompiler} from './jakt';
export {JavaCompiler} from './java';