mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Refactor code to have rudimentary support for using SPVC
This is the first step for having a fully operational SPVC usage path. This version of SPVC integration uses SPVC for setting up the options to the compiler, but a lot of the actual interaction with spirv-cross is done in Dawn, just via SPVC's compiler object. Future CLs will migrate more of the spirv-cross interaction to using the SPVC API, eventually removing the need for Dawn to know about spirv-cross. BUG=dawn:288 Change-Id: I68e0773f910d7fe967235b6987b3debe1d13883f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14143 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
969df2b3a2
commit
be5c135672
@@ -35,7 +35,7 @@ namespace {
|
||||
options.SetGLSLLanguageVersion(440);
|
||||
options.SetFixupClipspace(true);
|
||||
if (context.InitializeForGlsl(input.data(), input.size(), options) ==
|
||||
shaderc_compilation_status_success) {
|
||||
shaderc_spvc_status_success) {
|
||||
context.CompileShader(&result);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace {
|
||||
options.SetHLSLPointCoordCompat(true);
|
||||
options.SetHLSLPointSizeCompat(true);
|
||||
if (context.InitializeForHlsl(input.data(), input.size(), options) ==
|
||||
shaderc_compilation_status_success) {
|
||||
shaderc_spvc_status_success) {
|
||||
context.CompileShader(&result);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace {
|
||||
|
||||
// Using the options that are used by Dawn, they appear in ShaderModuleMTL.mm
|
||||
if (context.InitializeForMsl(input.data(), input.size(), options) ==
|
||||
shaderc_compilation_status_success) {
|
||||
shaderc_spvc_status_success) {
|
||||
context.CompileShader(&result);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user