Normalize generated file paths to match main tree.
Previously dawn_native files were in src/dawn_native/ while generated files were in dawn_native/. This makes some things complicated when integrating in other source trees so normalize all generated files to be in paths that match the main tree. BUG=dawn:225 Change-Id: I5b3e04d37a16251143578dfb7a31445b229fe4ac Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11300 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
b495e48405
commit
897ebc7a71
46
BUILD.gn
46
BUILD.gn
|
@ -55,11 +55,11 @@ config("libdawn_native_internal") {
|
|||
dawn_json_generator("libdawn_native_utils_gen") {
|
||||
target = "dawn_native_utils"
|
||||
outputs = [
|
||||
"dawn_native/ProcTable.cpp",
|
||||
"dawn_native/dawn_structs_autogen.h",
|
||||
"dawn_native/dawn_structs_autogen.cpp",
|
||||
"dawn_native/ValidationUtils_autogen.h",
|
||||
"dawn_native/ValidationUtils_autogen.cpp",
|
||||
"src/dawn_native/ProcTable.cpp",
|
||||
"src/dawn_native/dawn_structs_autogen.h",
|
||||
"src/dawn_native/dawn_structs_autogen.cpp",
|
||||
"src/dawn_native/ValidationUtils_autogen.h",
|
||||
"src/dawn_native/ValidationUtils_autogen.cpp",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -74,9 +74,9 @@ if (dawn_enable_opengl) {
|
|||
root_build_dir),
|
||||
]
|
||||
outputs = [
|
||||
"dawn_native/opengl/OpenGLFunctionsBase_autogen.cpp",
|
||||
"dawn_native/opengl/OpenGLFunctionsBase_autogen.h",
|
||||
"dawn_native/opengl/opengl_platform_autogen.h",
|
||||
"src/dawn_native/opengl/OpenGLFunctionsBase_autogen.cpp",
|
||||
"src/dawn_native/opengl/OpenGLFunctionsBase_autogen.h",
|
||||
"src/dawn_native/opengl/opengl_platform_autogen.h",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -400,9 +400,9 @@ source_set("libdawn_native_sources") {
|
|||
"src/dawn_native/vulkan/BufferVk.h",
|
||||
"src/dawn_native/vulkan/CommandBufferVk.cpp",
|
||||
"src/dawn_native/vulkan/CommandBufferVk.h",
|
||||
"src/dawn_native/vulkan/CommandRecordingContext.h",
|
||||
"src/dawn_native/vulkan/ComputePipelineVk.cpp",
|
||||
"src/dawn_native/vulkan/ComputePipelineVk.h",
|
||||
"src/dawn_native/vulkan/CommandRecordingContext.h",
|
||||
"src/dawn_native/vulkan/DeviceVk.cpp",
|
||||
"src/dawn_native/vulkan/DeviceVk.h",
|
||||
"src/dawn_native/vulkan/ExternalHandle.h",
|
||||
|
@ -520,18 +520,18 @@ dawn_component("libdawn_native") {
|
|||
dawn_json_generator("libdawn_wire_gen") {
|
||||
target = "dawn_wire"
|
||||
outputs = [
|
||||
"dawn_wire/WireCmd_autogen.h",
|
||||
"dawn_wire/WireCmd_autogen.cpp",
|
||||
"dawn_wire/client/ApiObjects_autogen.h",
|
||||
"dawn_wire/client/ApiProcs_autogen.cpp",
|
||||
"dawn_wire/client/ApiProcs_autogen.h",
|
||||
"dawn_wire/client/ClientBase_autogen.h",
|
||||
"dawn_wire/client/ClientHandlers_autogen.cpp",
|
||||
"dawn_wire/client/ClientPrototypes_autogen.inc",
|
||||
"dawn_wire/server/ServerBase_autogen.h",
|
||||
"dawn_wire/server/ServerDoers_autogen.cpp",
|
||||
"dawn_wire/server/ServerHandlers_autogen.cpp",
|
||||
"dawn_wire/server/ServerPrototypes_autogen.inc",
|
||||
"src/dawn_wire/WireCmd_autogen.h",
|
||||
"src/dawn_wire/WireCmd_autogen.cpp",
|
||||
"src/dawn_wire/client/ApiObjects_autogen.h",
|
||||
"src/dawn_wire/client/ApiProcs_autogen.cpp",
|
||||
"src/dawn_wire/client/ApiProcs_autogen.h",
|
||||
"src/dawn_wire/client/ClientBase_autogen.h",
|
||||
"src/dawn_wire/client/ClientHandlers_autogen.cpp",
|
||||
"src/dawn_wire/client/ClientPrototypes_autogen.inc",
|
||||
"src/dawn_wire/server/ServerBase_autogen.h",
|
||||
"src/dawn_wire/server/ServerDoers_autogen.cpp",
|
||||
"src/dawn_wire/server/ServerHandlers_autogen.cpp",
|
||||
"src/dawn_wire/server/ServerPrototypes_autogen.inc",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -723,8 +723,8 @@ static_library("dawn_bindings") {
|
|||
dawn_json_generator("mock_dawn_gen") {
|
||||
target = "mock_dawn"
|
||||
outputs = [
|
||||
"mock/mock_dawn.h",
|
||||
"mock/mock_dawn.cpp",
|
||||
"src/dawn/mock_dawn.h",
|
||||
"src/dawn/mock_dawn.cpp",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -493,17 +493,17 @@ class MultiGeneratorFromDawnJSON(Generator):
|
|||
cpp_params = {'native_methods': lambda typ: cpp_native_methods(api_params['types'], typ)}
|
||||
|
||||
if 'dawn_headers' in targets:
|
||||
renders.append(FileRender('api.h', 'dawn/dawn.h', [base_params, api_params, c_params]))
|
||||
renders.append(FileRender('apicpp.h', 'dawn/dawncpp.h', [base_params, api_params, cpp_params]))
|
||||
renders.append(FileRender('api.h', 'src/include/dawn/dawn.h', [base_params, api_params, c_params]))
|
||||
renders.append(FileRender('apicpp.h', 'src/include/dawn/dawncpp.h', [base_params, api_params, cpp_params]))
|
||||
|
||||
if 'libdawn' in targets:
|
||||
additional_params = {'native_methods': lambda typ: cpp_native_methods(api_params['types'], typ)}
|
||||
renders.append(FileRender('api.c', 'dawn/dawn.c', [base_params, api_params, c_params]))
|
||||
renders.append(FileRender('apicpp.cpp', 'dawn/dawncpp.cpp', [base_params, api_params, cpp_params]))
|
||||
renders.append(FileRender('api.c', 'src/dawn/dawn.c', [base_params, api_params, c_params]))
|
||||
renders.append(FileRender('apicpp.cpp', 'src/dawn/dawncpp.cpp', [base_params, api_params, cpp_params]))
|
||||
|
||||
if 'mock_dawn' in targets:
|
||||
renders.append(FileRender('mock_api.h', 'mock/mock_dawn.h', [base_params, api_params, c_params]))
|
||||
renders.append(FileRender('mock_api.cpp', 'mock/mock_dawn.cpp', [base_params, api_params, c_params]))
|
||||
renders.append(FileRender('mock_api.h', 'src/dawn/mock_dawn.h', [base_params, api_params, c_params]))
|
||||
renders.append(FileRender('mock_api.cpp', 'src/dawn/mock_dawn.cpp', [base_params, api_params, c_params]))
|
||||
|
||||
if 'dawn_native_utils' in targets:
|
||||
frontend_params = [
|
||||
|
@ -516,11 +516,11 @@ class MultiGeneratorFromDawnJSON(Generator):
|
|||
}
|
||||
]
|
||||
|
||||
renders.append(FileRender('dawn_native/ValidationUtils.h', 'dawn_native/ValidationUtils_autogen.h', frontend_params))
|
||||
renders.append(FileRender('dawn_native/ValidationUtils.cpp', 'dawn_native/ValidationUtils_autogen.cpp', frontend_params))
|
||||
renders.append(FileRender('dawn_native/api_structs.h', 'dawn_native/dawn_structs_autogen.h', frontend_params))
|
||||
renders.append(FileRender('dawn_native/api_structs.cpp', 'dawn_native/dawn_structs_autogen.cpp', frontend_params))
|
||||
renders.append(FileRender('dawn_native/ProcTable.cpp', 'dawn_native/ProcTable.cpp', frontend_params))
|
||||
renders.append(FileRender('dawn_native/ValidationUtils.h', 'src/dawn_native/ValidationUtils_autogen.h', frontend_params))
|
||||
renders.append(FileRender('dawn_native/ValidationUtils.cpp', 'src/dawn_native/ValidationUtils_autogen.cpp', frontend_params))
|
||||
renders.append(FileRender('dawn_native/api_structs.h', 'src/dawn_native/dawn_structs_autogen.h', frontend_params))
|
||||
renders.append(FileRender('dawn_native/api_structs.cpp', 'src/dawn_native/dawn_structs_autogen.cpp', frontend_params))
|
||||
renders.append(FileRender('dawn_native/ProcTable.cpp', 'src/dawn_native/ProcTable.cpp', frontend_params))
|
||||
|
||||
if 'dawn_wire' in targets:
|
||||
additional_params = compute_wire_params(api_params, wire_json)
|
||||
|
@ -535,18 +535,18 @@ class MultiGeneratorFromDawnJSON(Generator):
|
|||
},
|
||||
additional_params
|
||||
]
|
||||
renders.append(FileRender('dawn_wire/WireCmd.h', 'dawn_wire/WireCmd_autogen.h', wire_params))
|
||||
renders.append(FileRender('dawn_wire/WireCmd.cpp', 'dawn_wire/WireCmd_autogen.cpp', wire_params))
|
||||
renders.append(FileRender('dawn_wire/client/ApiObjects.h', 'dawn_wire/client/ApiObjects_autogen.h', wire_params))
|
||||
renders.append(FileRender('dawn_wire/client/ApiProcs.cpp', 'dawn_wire/client/ApiProcs_autogen.cpp', wire_params))
|
||||
renders.append(FileRender('dawn_wire/client/ApiProcs.h', 'dawn_wire/client/ApiProcs_autogen.h', wire_params))
|
||||
renders.append(FileRender('dawn_wire/client/ClientBase.h', 'dawn_wire/client/ClientBase_autogen.h', wire_params))
|
||||
renders.append(FileRender('dawn_wire/client/ClientHandlers.cpp', 'dawn_wire/client/ClientHandlers_autogen.cpp', wire_params))
|
||||
renders.append(FileRender('dawn_wire/client/ClientPrototypes.inc', 'dawn_wire/client/ClientPrototypes_autogen.inc', wire_params))
|
||||
renders.append(FileRender('dawn_wire/server/ServerBase.h', 'dawn_wire/server/ServerBase_autogen.h', wire_params))
|
||||
renders.append(FileRender('dawn_wire/server/ServerDoers.cpp', 'dawn_wire/server/ServerDoers_autogen.cpp', wire_params))
|
||||
renders.append(FileRender('dawn_wire/server/ServerHandlers.cpp', 'dawn_wire/server/ServerHandlers_autogen.cpp', wire_params))
|
||||
renders.append(FileRender('dawn_wire/server/ServerPrototypes.inc', 'dawn_wire/server/ServerPrototypes_autogen.inc', wire_params))
|
||||
renders.append(FileRender('dawn_wire/WireCmd.h', 'src/dawn_wire/WireCmd_autogen.h', wire_params))
|
||||
renders.append(FileRender('dawn_wire/WireCmd.cpp', 'src/dawn_wire/WireCmd_autogen.cpp', wire_params))
|
||||
renders.append(FileRender('dawn_wire/client/ApiObjects.h', 'src/dawn_wire/client/ApiObjects_autogen.h', wire_params))
|
||||
renders.append(FileRender('dawn_wire/client/ApiProcs.cpp', 'src/dawn_wire/client/ApiProcs_autogen.cpp', wire_params))
|
||||
renders.append(FileRender('dawn_wire/client/ApiProcs.h', 'src/dawn_wire/client/ApiProcs_autogen.h', wire_params))
|
||||
renders.append(FileRender('dawn_wire/client/ClientBase.h', 'src/dawn_wire/client/ClientBase_autogen.h', wire_params))
|
||||
renders.append(FileRender('dawn_wire/client/ClientHandlers.cpp', 'src/dawn_wire/client/ClientHandlers_autogen.cpp', wire_params))
|
||||
renders.append(FileRender('dawn_wire/client/ClientPrototypes.inc', 'src/dawn_wire/client/ClientPrototypes_autogen.inc', wire_params))
|
||||
renders.append(FileRender('dawn_wire/server/ServerBase.h', 'src/dawn_wire/server/ServerBase_autogen.h', wire_params))
|
||||
renders.append(FileRender('dawn_wire/server/ServerDoers.cpp', 'src/dawn_wire/server/ServerDoers_autogen.cpp', wire_params))
|
||||
renders.append(FileRender('dawn_wire/server/ServerHandlers.cpp', 'src/dawn_wire/server/ServerHandlers_autogen.cpp', wire_params))
|
||||
renders.append(FileRender('dawn_wire/server/ServerPrototypes.inc', 'src/dawn_wire/server/ServerPrototypes_autogen.inc', wire_params))
|
||||
|
||||
return renders
|
||||
|
||||
|
|
|
@ -229,9 +229,9 @@ class OpenGLLoaderGenerator(Generator):
|
|||
params = compute_params(etree.parse(args.gl_xml).getroot(), supported_extensions)
|
||||
|
||||
return [
|
||||
FileRender('opengl/OpenGLFunctionsBase.cpp', 'dawn_native/opengl/OpenGLFunctionsBase_autogen.cpp', [params]),
|
||||
FileRender('opengl/OpenGLFunctionsBase.h', 'dawn_native/opengl/OpenGLFunctionsBase_autogen.h', [params]),
|
||||
FileRender('opengl/opengl_platform.h', 'dawn_native/opengl/opengl_platform_autogen.h', [params]),
|
||||
FileRender('opengl/OpenGLFunctionsBase.cpp', 'src/dawn_native/opengl/OpenGLFunctionsBase_autogen.cpp', [params]),
|
||||
FileRender('opengl/OpenGLFunctionsBase.h', 'src/dawn_native/opengl/OpenGLFunctionsBase_autogen.h', [params]),
|
||||
FileRender('opengl/opengl_platform.h', 'src/dawn_native/opengl/opengl_platform_autogen.h', [params]),
|
||||
]
|
||||
|
||||
def get_dependencies(self, args):
|
||||
|
|
|
@ -31,13 +31,16 @@ if (build_with_chromium) {
|
|||
|
||||
config("dawn_public_include_dirs") {
|
||||
include_dirs = [
|
||||
"${target_gen_dir}/../..",
|
||||
"${target_gen_dir}/../../src/include",
|
||||
"${dawn_root}/src/include",
|
||||
]
|
||||
}
|
||||
|
||||
config("dawn_internal") {
|
||||
include_dirs = [ "${dawn_root}/src" ]
|
||||
include_dirs = [
|
||||
"${target_gen_dir}/../../src",
|
||||
"${dawn_root}/src",
|
||||
]
|
||||
|
||||
defines = []
|
||||
if (dawn_always_assert || dcheck_always_on || is_debug) {
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
import("../../scripts/dawn_overrides_with_defaults.gni")
|
||||
|
||||
import("${dawn_root}/scripts/dawn_component.gni")
|
||||
import("${dawn_root}/generator/dawn_generator.gni")
|
||||
import("${dawn_root}/scripts/dawn_component.gni")
|
||||
|
||||
###############################################################################
|
||||
# Dawn headers
|
||||
|
@ -28,8 +28,8 @@ dawn_json_generator("dawn_headers_gen") {
|
|||
# the case and we can't move generated files without clobbering the build.
|
||||
custom_gen_dir = "${target_gen_dir}/../.."
|
||||
outputs = [
|
||||
"dawn/dawncpp.h",
|
||||
"dawn/dawn.h",
|
||||
"src/include/dawn/dawncpp.h",
|
||||
"src/include/dawn/dawn.h",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -54,8 +54,8 @@ source_set("dawn_headers") {
|
|||
dawn_json_generator("libdawn_gen") {
|
||||
target = "libdawn"
|
||||
outputs = [
|
||||
"dawn/dawncpp.cpp",
|
||||
"dawn/dawn.c",
|
||||
"src/dawn/dawncpp.cpp",
|
||||
"src/dawn/dawn.c",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// limitations under the License.
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "mock/mock_dawn.h"
|
||||
#include "dawn/mock_dawn.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
Loading…
Reference in New Issue