Skip to content

Commit 1b09245

Browse files
Enable TINT_BUILD_SPV_READER on host platform webgpu builds
1 parent 1ec7946 commit 1b09245

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

libs/filamat/src/GLSLPostProcessor.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ void GLSLPostProcessor::spirvToMsl(const SpirvBlob* spirv, std::string* outMsl,
519519
}
520520

521521
bool GLSLPostProcessor::spirvToWgsl(const SpirvBlob *spirv, std::string *outWsl) {
522-
#ifdef FILAMENT_SUPPORTS_WEBGPU
522+
#if FILAMENT_SUPPORTS_WEBGPU
523523
//Currently no options we want to use
524524
const tint::spirv::reader::Options readerOpts{};
525525
tint::wgsl::writer::Options writerOpts{};
@@ -547,7 +547,7 @@ bool GLSLPostProcessor::spirvToWgsl(const SpirvBlob *spirv, std::string *outWsl)
547547
*outWsl = wgslOut->wgsl;
548548
return true;
549549
#else
550-
slog.i << "Trying to emit WGSL without including WebGPU dependencies, please set CMake arg FILAMENT_SUPPORTS_WEBGPU" << io::endl;
550+
slog.i << "Trying to emit WGSL without including WebGPU dependencies, please set CMake arg FILAMENT_SUPPORTS_WEBGPU and FILAMENT_SUPPORTS_WEBGPU" << io::endl;
551551
return false;
552552
#endif
553553

third_party/dawn/tnt/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ set(DAWN_ABSEIL_DIR ${EXTERNAL}/abseil)
1212
set(DAWN_SPIRV_TOOLS_DIR ${EXTERNAL}/spirv-tools/)
1313
set(DAWN_SPIRV_HEADERS_DIR ${EXTERNAL}/spirv-headers)
1414
set(DAWN_GLSLANG_DIR ${EXTERNAL}/glslang/)
15-
15+
if(IS_HOST_PLATFORM)
16+
set(TINT_BUILD_SPV_READER ON)
17+
endif ()
1618
add_subdirectory(../ ${PROJECT_BINARY_DIR}/third_party/dawn)

0 commit comments

Comments
 (0)