Skip to content

Commit

Permalink
Enable TINT_BUILD_SPV_READER on host platform webgpu builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bridgewaterrobbie committed Mar 6, 2025
1 parent 80e0dba commit 74b09c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libs/filamat/src/GLSLPostProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ void GLSLPostProcessor::spirvToMsl(const SpirvBlob* spirv, std::string* outMsl,
}

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

Expand Down
4 changes: 3 additions & 1 deletion third_party/dawn/tnt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ set(DAWN_ABSEIL_DIR ${EXTERNAL}/abseil)
set(DAWN_SPIRV_TOOLS_DIR ${EXTERNAL}/spirv-tools/)
set(DAWN_SPIRV_HEADERS_DIR ${EXTERNAL}/spirv-headers)
set(DAWN_GLSLANG_DIR ${EXTERNAL}/glslang/)

if(IS_HOST_PLATFORM)
set(TINT_BUILD_SPV_READER ON)
endif ()
add_subdirectory(../ ${PROJECT_BINARY_DIR}/third_party/dawn)

0 comments on commit 74b09c7

Please sign in to comment.