mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 13:14:56 +00:00
Instantiate a stubbed SPIR-V parser if file ends in .spv
- spv parser just errors out for now - link against SPIRV-Tools-opt - Fixe CMake variable TINT_ENABLE_SPV_PARSER --> TINT_BUILD_SPV_PARSER Bug: tint:3 Change-Id: Ie4ef9b03e001fca3cc11f65a425612755857feac Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/16600 Reviewed-by: dan sinclair <dsinclair@google.com>
This commit is contained in:
@@ -305,8 +305,9 @@ add_library(libtint ${TINT_LIB_SRCS})
|
||||
tint_default_compile_options(libtint)
|
||||
set_target_properties(libtint PROPERTIES OUTPUT_NAME "tint")
|
||||
|
||||
if(${TINT_ENABLE_SPV_PARSER})
|
||||
target_link_libraries(libtint SPIRV-Tools)
|
||||
if(${TINT_BUILD_SPV_PARSER})
|
||||
# We'll use the optimizer for its nice SPIR-V in-memory representation
|
||||
target_link_libraries(libtint SPIRV-Tools-opt SPIRV-Tools)
|
||||
endif()
|
||||
|
||||
add_executable(tint_unittests ${TINT_TEST_SRCS})
|
||||
|
||||
@@ -25,6 +25,7 @@ Parser::Parser(const std::vector<uint32_t>&) : Reader() {}
|
||||
Parser::~Parser() = default;
|
||||
|
||||
bool Parser::Parse() {
|
||||
set_error("SPIR-V parsing is not supported yet");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ class Parser : public Reader {
|
||||
/// Creates a new parser
|
||||
/// @param input the input data to parse
|
||||
explicit Parser(const std::vector<uint32_t>& input);
|
||||
/// Destructor
|
||||
~Parser() override;
|
||||
|
||||
/// Run the parser
|
||||
|
||||
Reference in New Issue
Block a user