diff --git a/CMakeLists.txt b/CMakeLists.txt index a661630..44cf3bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,7 +112,7 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/libtess2.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/flatbuffers.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/fml.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/impeller_base.cmake) -include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/impeller_blobcat.cmake) +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/impeller_shader_archive.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/impeller_core.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/impeller_geometry.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/impeller_renderer.cmake) diff --git a/cmake/impeller_renderer.cmake b/cmake/impeller_renderer.cmake index 7a1a02c..be2254e 100644 --- a/cmake/impeller_renderer.cmake +++ b/cmake/impeller_renderer.cmake @@ -52,7 +52,7 @@ target_include_directories(impeller_renderer target_link_libraries(impeller_renderer PUBLIC - fml impeller_base impeller_blobcat impeller_geometry) + fml impeller_base impeller_shader_archive impeller_geometry) target_include_directories(impeller_renderer PUBLIC $ # For includes starting with "flutter/" diff --git a/cmake/impeller_blobcat.cmake b/cmake/impeller_shader_archive.cmake similarity index 54% rename from cmake/impeller_blobcat.cmake rename to cmake/impeller_shader_archive.cmake index 3aa3f95..47342f4 100644 --- a/cmake/impeller_blobcat.cmake +++ b/cmake/impeller_shader_archive.cmake @@ -2,38 +2,43 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -set(IMPELLER_BLOBCAT_DIR ${FLUTTER_ENGINE_DIR}/impeller/blobcat - CACHE STRING "Location of the Impeller blobcat sources.") +set(IMPELLER_SHADER_ARCHIVE_DIR ${FLUTTER_ENGINE_DIR}/impeller/shader_archive + CACHE STRING "Location of the Impeller shader_archive sources.") -file(GLOB BLOBCAT_SOURCES ${IMPELLER_BLOBCAT_DIR}/*.cc) -list(FILTER BLOBCAT_SOURCES EXCLUDE REGEX ".*_unittests?\\.cc$") -list(REMOVE_ITEM BLOBCAT_SOURCES "${IMPELLER_BLOBCAT_DIR}/blobcat_main.cc") +file(GLOB SHADER_ARCHIVE_SOURCES ${IMPELLER_SHADER_ARCHIVE_DIR}/*.cc) +list(FILTER SHADER_ARCHIVE_SOURCES EXCLUDE REGEX ".*_unittests?\\.cc$") +list(REMOVE_ITEM SHADER_ARCHIVE_SOURCES "${IMPELLER_SHADER_ARCHIVE_DIR}/shader_archive_main.cc") -add_library(impeller_blobcat STATIC ${BLOBCAT_SOURCES}) +add_library(impeller_shader_archive STATIC ${SHADER_ARCHIVE_SOURCES}) flatbuffers_schema( - TARGET impeller_blobcat - INPUT ${IMPELLER_BLOBCAT_DIR}/blob.fbs - OUTPUT_DIR ${IMPELLER_GENERATED_DIR}/impeller/blobcat) + TARGET impeller_shader_archive + INPUT ${IMPELLER_SHADER_ARCHIVE_DIR}/shader_archive.fbs + OUTPUT_DIR ${IMPELLER_GENERATED_DIR}/impeller/shader_archive) -target_include_directories(impeller_blobcat +flatbuffers_schema( + TARGET impeller_shader_archive + INPUT ${IMPELLER_SHADER_ARCHIVE_DIR}/multi_arch_shader_archive.fbs + OUTPUT_DIR ${IMPELLER_GENERATED_DIR}/impeller/shader_archive) + +target_include_directories(impeller_shader_archive PUBLIC $ # For includes starting with "flutter/" $ # For includes starting with "impeller/" $) # For generated flatbuffer schemas -target_link_libraries(impeller_blobcat PUBLIC fml impeller_base) +target_link_libraries(impeller_shader_archive PUBLIC fml impeller_base) -add_executable(blobcat "${IMPELLER_BLOBCAT_DIR}/blobcat_main.cc") -target_include_directories(blobcat +add_executable(shader_archive "${IMPELLER_SHADER_ARCHIVE_DIR}/shader_archive_main.cc") +target_include_directories(shader_archive PUBLIC $ # For includes starting with "flutter/" $) # For includes starting with "impeller/" -target_link_libraries(blobcat PUBLIC impeller_blobcat) +target_link_libraries(shader_archive PUBLIC impeller_shader_archive) -# blobcat(OUTPUT filename INPUTS filename;filename) -function(blobcat) +# shader_archive(OUTPUT filename INPUTS filename;filename) +function(shader_archive) cmake_parse_arguments(ARG "" "OUTPUT" "INPUTS" ${ARGN}) - blobcat_parse(CLI + shader_archive_parse(CLI OUTPUT ${ARG_OUTPUT} INPUTS ${ARG_INPUTS} ${ARG_UNPARSED_ARGUMENTS}) get_filename_component(OUTPUT_DIR "${ARG_OUTPUT}" ABSOLUTE) @@ -41,19 +46,19 @@ function(blobcat) add_custom_command( COMMAND ${CMAKE_COMMAND} -E make_directory "${OUTPUT_DIR}" - COMMAND "$" ${CLI} + COMMAND "$" ${CLI} DEPENDS ${ARG_INPUTS} OUTPUT ${ARG_OUTPUT} COMMENT "Building blob ${ARG_OUTPUT}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") endfunction() -# blobcat_parse( +# shader_archive_parse( # cli_out # OUTPUT filename # INPUTS filename;filename # ) -function(blobcat_parse CLI_OUT) +function(shader_archive_parse CLI_OUT) cmake_parse_arguments(ARG "" "OUTPUT" "INPUTS" ${ARGN}) set(CLI "") diff --git a/cmake/impellerc.cmake b/cmake/impellerc.cmake index 7ef3fc8..6f167c3 100644 --- a/cmake/impellerc.cmake +++ b/cmake/impellerc.cmake @@ -64,7 +64,7 @@ function(add_gles_shader_library) list(APPEND BLOB_FILES ${ARG_OUTPUT_DIR}/${INPUT_FILENAME}.gles) endforeach() - blobcat( + shader_archive( OUTPUT ${ARG_OUTPUT_DIR}/${ARG_NAME}_gles.blob INPUTS ${BLOB_FILES}) diff --git a/third_party/flutter b/third_party/flutter index d28fdb0..79f6cc9 160000 --- a/third_party/flutter +++ b/third_party/flutter @@ -1 +1 @@ -Subproject commit d28fdb00c2cdc78313f160116876d46a20d46e10 +Subproject commit 79f6cc9dcd505e9766ecd5e1f5ef8ac981aa8f5d