[bazel] Get GPU examples working
This adds targets which test our Dawn, GL, and Vulkan backends.
It follows the hierarchical filegroup pattern, as
outlined in https://skia-review.googlesource.com/c/skia/+/543977
Suggested Review order:
- tools/sk_app/BUILD.bazel. For many things in tools, I anticipate
they will depend on //:skia_core and other //tools targets.
sk_app shows this off, as well how to make the target
specific to a given platform and pull in the proper native code.
I'm trying out setting test_only = True, to see if we can
partition Skia's tests and helpers from the actual Skia library.
- other changes to //tools/, especially looking at sk_app's
dependencies.
- //example/BUILD.bazel. This uses the cc_binary_with_flags which
existed previously [1] to make it so people don't have to
specify all the flags for a given binary and can build it as is.
These targets nows how up in //bazel/Makefile
- //include/... and //src/..., where some typos from previous
CLs were fixed and rules expanded.
- Misc changes to .cpp files to remove unnecessary includes
that were assuming the GL backend was being compiled in.
- All other changes
[1] 162dfca340/bazel/cc_binary_with_flags.bzl
Change-Id: Ieacec464d44368cad0da0890c7dc85a6c0b900c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/544317
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
This commit is contained in:
parent
2c65579aad
commit
956704b387
@ -13,6 +13,10 @@ known_good_builds:
|
||||
bazelisk build //:skia_core --config=clang_linux
|
||||
bazelisk build //experimental/bazel_test/... --config=clang_linux
|
||||
bazelisk run //experimental/bazel_test:bazel_test_exe --config=clang_linux
|
||||
bazelisk build //example:hello_world_gl --config=clang_linux
|
||||
bazelisk build //example:hello_world_vulkan --config=clang_linux
|
||||
bazelisk build //example:hello_world_dawn --config=clang_linux
|
||||
bazelisk build //example:vulkan_basic --config=clang_linux
|
||||
#bazelisk build //src/sksl/lex:sksllex --config=clang_linux
|
||||
#bazelisk build //tools/skdiff --config=clang_linux
|
||||
#bazelisk build //tools/skslc --config=clang_linux
|
||||
@ -22,6 +26,10 @@ rbe_known_good_builds:
|
||||
bazelisk build //:skia_core --config=linux_rbe --remote_download_minimal
|
||||
bazelisk build //experimental/bazel_test/... --config=linux_rbe --remote_download_minimal
|
||||
bazelisk run //experimental/bazel_test:bazel_test_exe --config=linux_rbe --remote_download_toplevel
|
||||
bazelisk build //example:hello_world_gl --config=linux_rbe --remote_download_minimal
|
||||
bazelisk build //example:hello_world_vulkan --config=linux_rbe --remote_download_minimal
|
||||
bazelisk build //example:hello_world_dawn --config=linux_rbe --remote_download_minimal
|
||||
bazelisk build //example:vulkan_basic --config=linux_rbe --remote_download_minimal
|
||||
#bazelisk build //src/sksl/lex:sksllex --config=linux_rbe --remote_download_minimal
|
||||
#bazelisk build //tools/skdiff --config=linux_rbe --remote_download_minimal
|
||||
#bazelisk build //tools/skslc --config=linux_rbe --remote_download_minimal
|
||||
|
14
bazel/external/dawn/BUILD.bazel
vendored
14
bazel/external/dawn/BUILD.bazel
vendored
@ -563,15 +563,11 @@ cc_library(
|
||||
cc_library(
|
||||
name = "dawn",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = select({
|
||||
# Emscripten provides the dawn files necessary as system headers.
|
||||
":cpu_wasm": [],
|
||||
"//conditions:default": [
|
||||
":dawn_cpp",
|
||||
":dawn_native",
|
||||
":dawn_proc",
|
||||
],
|
||||
}),
|
||||
deps = [
|
||||
":dawn_cpp",
|
||||
":dawn_native",
|
||||
":dawn_proc",
|
||||
],
|
||||
)
|
||||
|
||||
TINT_HDRS = [
|
||||
|
102
example/BUILD.bazel
Normal file
102
example/BUILD.bazel
Normal file
@ -0,0 +1,102 @@
|
||||
load("//bazel:macros.bzl", "exports_files_legacy")
|
||||
load("//bazel:cc_binary_with_flags.bzl", "cc_binary_with_flags")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
cc_binary_with_flags(
|
||||
name = "hello_world_gl",
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"HelloWorld.cpp",
|
||||
"HelloWorld.h",
|
||||
],
|
||||
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
|
||||
set_flags = {
|
||||
# Use the GL backend with the normal GL standard (as opposed to WebGL or GLES)
|
||||
"gpu_backend": [
|
||||
"gl_backend",
|
||||
],
|
||||
"with_gl_standard": [
|
||||
"gl_standard",
|
||||
],
|
||||
# Load fonts from the standard system directory (e.g. "/usr/share/fonts/")
|
||||
# as defined in //src/ports/SkFontMgr_custom_directory_factory.cpp
|
||||
"fontmgr_factory": [
|
||||
"custom_directory_fontmgr_factory",
|
||||
],
|
||||
},
|
||||
deps = [
|
||||
"//:skia_core",
|
||||
"//tools/sk_app",
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary_with_flags(
|
||||
name = "hello_world_vulkan",
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"HelloWorld.cpp",
|
||||
"HelloWorld.h",
|
||||
],
|
||||
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
|
||||
set_flags = {
|
||||
"gpu_backend": [
|
||||
"vulkan_backend",
|
||||
],
|
||||
# Load fonts from the standard system directory (e.g. "/usr/share/fonts/")
|
||||
# as defined in //src/ports/SkFontMgr_custom_directory_factory.cpp
|
||||
"fontmgr_factory": [
|
||||
"custom_directory_fontmgr_factory",
|
||||
],
|
||||
},
|
||||
deps = [
|
||||
"//:skia_core",
|
||||
"//tools/sk_app",
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary_with_flags(
|
||||
name = "hello_world_dawn",
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"HelloWorld.cpp",
|
||||
"HelloWorld.h",
|
||||
],
|
||||
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
|
||||
set_flags = {
|
||||
"gpu_backend": [
|
||||
"dawn_backend",
|
||||
],
|
||||
# Load fonts from the standard system directory (e.g. "/usr/share/fonts/")
|
||||
# as defined in //src/ports/SkFontMgr_custom_directory_factory.cpp
|
||||
"fontmgr_factory": [
|
||||
"custom_directory_fontmgr_factory",
|
||||
],
|
||||
},
|
||||
deps = [
|
||||
"//:skia_core",
|
||||
"//tools/sk_app",
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary_with_flags(
|
||||
name = "vulkan_basic",
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"VulkanBasic.cpp",
|
||||
],
|
||||
# These flags are defined in //bazel/common_config_settings/BUILD.bazel
|
||||
set_flags = {
|
||||
"gpu_backend": [
|
||||
"vulkan_backend",
|
||||
],
|
||||
},
|
||||
deps = [
|
||||
"//:skia_core",
|
||||
# This DEPS is for the utility in the demo for creating a vulkan context.
|
||||
# Outside clients would not need it.
|
||||
"//tools/gpu/vk:testutils",
|
||||
],
|
||||
)
|
@ -24,11 +24,12 @@ filegroup(
|
||||
"GrYUVABackendTextures.h",
|
||||
"ShaderErrorHandler.h",
|
||||
"//include/gpu/mock:hdrs",
|
||||
# TODO(egdaniel, kjlubick) GrGLTypes.h is used unconditionally by GrBackendSemaphore.h
|
||||
"//include/gpu/gl:hdrs",
|
||||
] + select_multi(
|
||||
{
|
||||
"//bazel/common_config_settings:dawn_backend": ["//include/gpu/dawn:hdrs"],
|
||||
"//bazel/common_config_settings:gl_backend": ["//include/gpu/gl:hdrs"],
|
||||
"//bazel/common_config_settings:vulkan_backend": ["//include/gpu/vulkan:hdrs"],
|
||||
"//bazel/common_config_settings:vulkan_backend": ["//include/gpu/vk:hdrs"],
|
||||
# TODO(kjlubick) mtl and d3d backend
|
||||
},
|
||||
default = [],
|
||||
|
11
include/gpu/dawn/BUILD.bazel
Normal file
11
include/gpu/dawn/BUILD.bazel
Normal file
@ -0,0 +1,11 @@
|
||||
load("//bazel:macros.bzl", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
filegroup(
|
||||
name = "hdrs",
|
||||
srcs = ["GrDawnTypes.h"],
|
||||
visibility = ["//include/gpu:__pkg__"],
|
||||
)
|
17
include/gpu/vk/BUILD.bazel
Normal file
17
include/gpu/vk/BUILD.bazel
Normal file
@ -0,0 +1,17 @@
|
||||
load("//bazel:macros.bzl", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
filegroup(
|
||||
name = "hdrs",
|
||||
srcs = [
|
||||
"GrVkBackendContext.h",
|
||||
"GrVkExtensions.h",
|
||||
"GrVkMemoryAllocator.h",
|
||||
"GrVkTypes.h",
|
||||
"GrVkVulkan.h",
|
||||
],
|
||||
visibility = ["//include/gpu:__pkg__"],
|
||||
)
|
@ -4,6 +4,11 @@ licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
exports_files(
|
||||
["SkBitmaskEnum.h"],
|
||||
visibility = ["//tools/skui:__pkg__"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = [
|
||||
|
@ -1,4 +1,4 @@
|
||||
load("//bazel:macros.bzl", "exports_files_legacy")
|
||||
load("//bazel:macros.bzl", "exports_files_legacy", "select_multi")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
@ -8,14 +8,17 @@ filegroup(
|
||||
name = "srcs",
|
||||
srcs = [
|
||||
"GrContext_Base.h",
|
||||
"GrD3DTypesMinimal.h",
|
||||
"GrDawnTypesPriv.h",
|
||||
"GrGLTypesPriv.h",
|
||||
"GrImageContext.h",
|
||||
"GrMockTypesPriv.h",
|
||||
"GrMtlTypesPriv.h",
|
||||
"GrTypesPriv.h",
|
||||
"GrVkTypesPriv.h",
|
||||
],
|
||||
] + select_multi(
|
||||
{
|
||||
"//bazel/common_config_settings:dawn_backend": ["GrDawnTypesPriv.h"],
|
||||
"//bazel/common_config_settings:gl_backend": ["GrGLTypesPriv.h"],
|
||||
"//bazel/common_config_settings:vulkan_backend": ["GrVkTypesPriv.h"],
|
||||
# TODO(kjlubick) Direct3D and Metal Backends
|
||||
},
|
||||
default = [],
|
||||
),
|
||||
visibility = ["//include/private/gpu:__pkg__"],
|
||||
)
|
||||
|
19
include/third_party/vulkan/BUILD.bazel
vendored
Normal file
19
include/third_party/vulkan/BUILD.bazel
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
load("//bazel:macros.bzl", "cc_library", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
cc_library(
|
||||
name = "vulkan",
|
||||
srcs = [
|
||||
"vulkan/vk_platform.h",
|
||||
"vulkan/vulkan_xcb.h",
|
||||
], #TODO(kjlubick) The other files are necessary on different platforms
|
||||
hdrs = [
|
||||
"vulkan/vulkan.h",
|
||||
"vulkan/vulkan_core.h",
|
||||
],
|
||||
includes = ["."],
|
||||
visibility = ["//:__subpackages__"],
|
||||
)
|
@ -35,7 +35,10 @@ filegroup(
|
||||
":core_srcs",
|
||||
"//src/gpu/ganesh:srcs",
|
||||
"//src/gpu/tessellate:srcs",
|
||||
],
|
||||
] + select({
|
||||
"//bazel/common_config_settings:vulkan_backend": ["//src/gpu/vk:srcs"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
visibility = ["//src:__pkg__"],
|
||||
)
|
||||
|
||||
@ -43,6 +46,6 @@ cc_library(
|
||||
name = "deps",
|
||||
visibility = ["//src:__pkg__"],
|
||||
deps = [
|
||||
"//src/ganesh:deps",
|
||||
"//src/gpu/ganesh:deps",
|
||||
],
|
||||
)
|
||||
|
@ -258,7 +258,7 @@ filegroup(
|
||||
|
||||
cc_library(
|
||||
name = "deps",
|
||||
visibility = ["//src/ganesh:__pkg__"],
|
||||
visibility = ["//src/gpu:__pkg__"],
|
||||
deps = select_multi(
|
||||
{
|
||||
"//bazel/common_config_settings:dawn_backend": ["//src/gpu/ganesh/dawn:deps"],
|
||||
|
@ -9,7 +9,10 @@
|
||||
|
||||
#include "include/private/gpu/ganesh/GrTypesPriv.h"
|
||||
#include "src/gpu/ganesh/GrBackendSurfaceMutableStateImpl.h"
|
||||
|
||||
#if defined(SK_GL)
|
||||
#include "src/gpu/ganesh/gl/GrGLUtil.h"
|
||||
#endif
|
||||
|
||||
#ifdef SK_DAWN
|
||||
#include "include/gpu/dawn/GrDawnTypes.h"
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "src/gpu/ganesh/GrTexture.h"
|
||||
#include "src/gpu/ganesh/GrTextureProxyPriv.h"
|
||||
#include "src/gpu/ganesh/SkGr.h"
|
||||
#include "src/gpu/ganesh/gl/GrGLTexture.h"
|
||||
|
||||
GrBackendTextureImageGenerator::RefHelper::RefHelper(
|
||||
sk_sp<GrTexture> texture,
|
||||
|
@ -1,7 +1,47 @@
|
||||
load("//bazel:macros.bzl", "exports_files_legacy")
|
||||
load("//bazel:macros.bzl", "cc_library", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
# TODO(kjlubick)
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = [
|
||||
"GrDawnAsyncWait.cpp",
|
||||
"GrDawnAsyncWait.h",
|
||||
"GrDawnAttachment.cpp",
|
||||
"GrDawnAttachment.h",
|
||||
"GrDawnBuffer.cpp",
|
||||
"GrDawnBuffer.h",
|
||||
"GrDawnCaps.cpp",
|
||||
"GrDawnCaps.h",
|
||||
"GrDawnGpu.cpp",
|
||||
"GrDawnGpu.h",
|
||||
"GrDawnOpsRenderPass.cpp",
|
||||
"GrDawnOpsRenderPass.h",
|
||||
"GrDawnProgramBuilder.cpp",
|
||||
"GrDawnProgramBuilder.h",
|
||||
"GrDawnProgramDataManager.cpp",
|
||||
"GrDawnProgramDataManager.h",
|
||||
"GrDawnRenderTarget.cpp",
|
||||
"GrDawnRenderTarget.h",
|
||||
"GrDawnRingBuffer.cpp",
|
||||
"GrDawnRingBuffer.h",
|
||||
"GrDawnTexture.cpp",
|
||||
"GrDawnTexture.h",
|
||||
"GrDawnTextureRenderTarget.cpp",
|
||||
"GrDawnTextureRenderTarget.h",
|
||||
"GrDawnTypesPriv.cpp",
|
||||
"GrDawnUtil.cpp",
|
||||
"GrDawnUtil.h",
|
||||
],
|
||||
visibility = ["//src/gpu/ganesh:__pkg__"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "deps",
|
||||
visibility = ["//src/gpu/ganesh:__pkg__"],
|
||||
deps = [
|
||||
"@dawn",
|
||||
],
|
||||
)
|
||||
|
@ -1,7 +1,82 @@
|
||||
load("//bazel:macros.bzl", "exports_files_legacy")
|
||||
load("//bazel:macros.bzl", "cc_library", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
# TODO(kjlubick)
|
||||
filegroup(
|
||||
name = "core_srcs",
|
||||
srcs = [
|
||||
"GrGLAssembleGLESInterfaceAutogen.cpp",
|
||||
"GrGLAssembleGLInterfaceAutogen.cpp",
|
||||
"GrGLAssembleHelpers.cpp",
|
||||
"GrGLAssembleInterface.cpp",
|
||||
"GrGLAssembleWebGLInterfaceAutogen.cpp",
|
||||
"GrGLAttachment.cpp",
|
||||
"GrGLAttachment.h",
|
||||
"GrGLBuffer.cpp",
|
||||
"GrGLBuffer.h",
|
||||
"GrGLCaps.cpp",
|
||||
"GrGLCaps.h",
|
||||
"GrGLContext.cpp",
|
||||
"GrGLContext.h",
|
||||
"GrGLDefines_impl.h",
|
||||
"GrGLExtensions.cpp",
|
||||
"GrGLGLSL.cpp",
|
||||
"GrGLGLSL.h",
|
||||
"GrGLGpu.cpp",
|
||||
"GrGLGpu.h",
|
||||
"GrGLGpuProgramCache.cpp",
|
||||
"GrGLInterfaceAutogen.cpp",
|
||||
"GrGLOpsRenderPass.cpp",
|
||||
"GrGLOpsRenderPass.h",
|
||||
"GrGLProgram.cpp",
|
||||
"GrGLProgram.h",
|
||||
"GrGLProgramDataManager.cpp",
|
||||
"GrGLProgramDataManager.h",
|
||||
"GrGLRenderTarget.cpp",
|
||||
"GrGLRenderTarget.h",
|
||||
"GrGLSemaphore.cpp",
|
||||
"GrGLSemaphore.h",
|
||||
"GrGLTexture.cpp",
|
||||
"GrGLTexture.h",
|
||||
"GrGLTextureRenderTarget.cpp",
|
||||
"GrGLTextureRenderTarget.h",
|
||||
"GrGLTypesPriv.cpp",
|
||||
"GrGLUniformHandler.cpp",
|
||||
"GrGLUniformHandler.h",
|
||||
"GrGLUtil.cpp",
|
||||
"GrGLUtil.h",
|
||||
"GrGLVaryingHandler.h",
|
||||
"GrGLVertexArray.cpp",
|
||||
"GrGLVertexArray.h",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = [
|
||||
":core_srcs",
|
||||
"//src/gpu/ganesh/gl/builders:srcs",
|
||||
] + select({
|
||||
"//bazel/common_config_settings:linux_x64": ["//src/gpu/ganesh/gl/glx:srcs"],
|
||||
"//bazel/common_config_settings:cpu_wasm": ["//src/gpu/ganesh/gl/webgl:srcs"],
|
||||
"@platforms//os:android": ["//src/gpu/ganesh/gl/egl:srcs"],
|
||||
"@platforms//os:ios": ["//src/gpu/ganesh/gl/iOS:srcs"],
|
||||
"@platforms//os:macos": ["//src/gpu/ganesh/gl/mac:srcs"],
|
||||
"@platforms//os:windows": ["//src/gpu/ganesh/gl/win:srcs"],
|
||||
"//conditions:default": [":GrGLMakeNativeInterface_none.cpp"],
|
||||
}),
|
||||
visibility = ["//src/gpu/ganesh:__pkg__"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "deps",
|
||||
linkopts = select({
|
||||
"@platforms//os:android": ["-landroid"],
|
||||
"@platforms//os:linux": ["-lGL"],
|
||||
# TODO(kjlubick) need OpenGL32.lib for non-arm windows
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
visibility = ["//src/gpu/ganesh:__pkg__"],
|
||||
)
|
||||
|
16
src/gpu/ganesh/gl/builders/BUILD.bazel
Normal file
16
src/gpu/ganesh/gl/builders/BUILD.bazel
Normal file
@ -0,0 +1,16 @@
|
||||
load("//bazel:macros.bzl", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = [
|
||||
"GrGLProgramBuilder.cpp",
|
||||
"GrGLProgramBuilder.h",
|
||||
"GrGLShaderStringBuilder.cpp",
|
||||
"GrGLShaderStringBuilder.h",
|
||||
],
|
||||
visibility = ["//src/gpu/ganesh/gl:__pkg__"],
|
||||
)
|
14
src/gpu/ganesh/gl/glx/BUILD.bazel
Normal file
14
src/gpu/ganesh/gl/glx/BUILD.bazel
Normal file
@ -0,0 +1,14 @@
|
||||
load("//bazel:macros.bzl", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = [
|
||||
"GrGLMakeGLXInterface.cpp",
|
||||
"GrGLMakeNativeInterface_glx.cpp",
|
||||
],
|
||||
visibility = ["//src/gpu/ganesh/gl:__pkg__"],
|
||||
)
|
@ -1,7 +1,90 @@
|
||||
load("//bazel:macros.bzl", "exports_files_legacy")
|
||||
load("//bazel:macros.bzl", "cc_library", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
# TODO(kjlubick)
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = [
|
||||
"GrVkAMDMemoryAllocator.cpp",
|
||||
"GrVkAMDMemoryAllocator.h",
|
||||
"GrVkBuffer.cpp",
|
||||
"GrVkBuffer.h",
|
||||
"GrVkCaps.cpp",
|
||||
"GrVkCaps.h",
|
||||
"GrVkCommandBuffer.cpp",
|
||||
"GrVkCommandBuffer.h",
|
||||
"GrVkCommandPool.cpp",
|
||||
"GrVkCommandPool.h",
|
||||
"GrVkDescriptorPool.cpp",
|
||||
"GrVkDescriptorPool.h",
|
||||
"GrVkDescriptorSet.cpp",
|
||||
"GrVkDescriptorSet.h",
|
||||
"GrVkDescriptorSetManager.cpp",
|
||||
"GrVkDescriptorSetManager.h",
|
||||
"GrVkExtensions.cpp",
|
||||
"GrVkFramebuffer.cpp",
|
||||
"GrVkFramebuffer.h",
|
||||
"GrVkGpu.cpp",
|
||||
"GrVkGpu.h",
|
||||
"GrVkImage.cpp",
|
||||
"GrVkImage.h",
|
||||
"GrVkImageLayout.h",
|
||||
"GrVkImageView.cpp",
|
||||
"GrVkImageView.h",
|
||||
"GrVkInterface.cpp",
|
||||
"GrVkInterface.h",
|
||||
"GrVkMSAALoadManager.cpp",
|
||||
"GrVkMSAALoadManager.h",
|
||||
"GrVkManagedResource.h",
|
||||
"GrVkMemory.cpp",
|
||||
"GrVkMemory.h",
|
||||
"GrVkOpsRenderPass.cpp",
|
||||
"GrVkOpsRenderPass.h",
|
||||
"GrVkPipeline.cpp",
|
||||
"GrVkPipeline.h",
|
||||
"GrVkPipelineState.cpp",
|
||||
"GrVkPipelineState.h",
|
||||
"GrVkPipelineStateBuilder.cpp",
|
||||
"GrVkPipelineStateBuilder.h",
|
||||
"GrVkPipelineStateCache.cpp",
|
||||
"GrVkPipelineStateDataManager.cpp",
|
||||
"GrVkPipelineStateDataManager.h",
|
||||
"GrVkRenderPass.cpp",
|
||||
"GrVkRenderPass.h",
|
||||
"GrVkRenderTarget.cpp",
|
||||
"GrVkRenderTarget.h",
|
||||
"GrVkResourceProvider.cpp",
|
||||
"GrVkResourceProvider.h",
|
||||
"GrVkSampler.cpp",
|
||||
"GrVkSampler.h",
|
||||
"GrVkSamplerYcbcrConversion.cpp",
|
||||
"GrVkSamplerYcbcrConversion.h",
|
||||
"GrVkSecondaryCBDrawContext.cpp",
|
||||
"GrVkSecondaryCBDrawContext_impl.h",
|
||||
"GrVkSemaphore.cpp",
|
||||
"GrVkSemaphore.h",
|
||||
"GrVkTexture.cpp",
|
||||
"GrVkTexture.h",
|
||||
"GrVkTextureRenderTarget.cpp",
|
||||
"GrVkTextureRenderTarget.h",
|
||||
"GrVkTypesPriv.cpp",
|
||||
"GrVkUniformHandler.cpp",
|
||||
"GrVkUniformHandler.h",
|
||||
"GrVkUtil.cpp",
|
||||
"GrVkUtil.h",
|
||||
"GrVkVaryingHandler.cpp",
|
||||
"GrVkVaryingHandler.h",
|
||||
],
|
||||
visibility = ["//src/gpu/ganesh:__pkg__"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "deps",
|
||||
visibility = ["//src/gpu/ganesh:__pkg__"],
|
||||
deps = select({
|
||||
"//bazel/common_config_settings:vulkan_with_vma": ["//third_party/vulkanmemoryallocator"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
||||
|
11
src/gpu/vk/BUILD.bazel
Normal file
11
src/gpu/vk/BUILD.bazel
Normal file
@ -0,0 +1,11 @@
|
||||
load("//bazel:macros.bzl", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = ["GrVkSecondaryCBDrawContext.h"],
|
||||
visibility = ["//src/gpu:__pkg__"],
|
||||
)
|
@ -39,7 +39,6 @@
|
||||
#include "src/gpu/ganesh/GrYUVATextureProxies.h"
|
||||
#include "src/gpu/ganesh/SurfaceFillContext.h"
|
||||
#include "src/gpu/ganesh/effects/GrTextureEffect.h"
|
||||
#include "src/gpu/ganesh/gl/GrGLTexture.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
|
3
third_party/BUILD.bazel
vendored
3
third_party/BUILD.bazel
vendored
@ -159,6 +159,9 @@ ZLIB_DEFINES = ["ZLIB_IMPLEMENTATION"] + select({
|
||||
ZLIB_COPTS = [
|
||||
"-Wno-unused-function",
|
||||
"-Wno-deprecated-non-prototype",
|
||||
# no-deprecated-non-prototype was added in Clang 14+, used in emscripten for CanvasKit, but
|
||||
# it is not in Clang 13, currently used for Skia.
|
||||
"-Wno-unknown-warning-option",
|
||||
# Make the headers in contrib available, without exposing them in hdrs.
|
||||
"-isystem third_party/externals/zlib/",
|
||||
] + select({
|
||||
|
@ -17,7 +17,7 @@ cc_library(
|
||||
],
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//include/third_party/vulkan:skias_vulkan_headers",
|
||||
"//include/third_party/vulkan",
|
||||
"@vulkanmemoryallocator//:hdrs",
|
||||
],
|
||||
)
|
||||
|
5
tools/BUILD.bazel
Normal file
5
tools/BUILD.bazel
Normal file
@ -0,0 +1,5 @@
|
||||
load("//bazel:macros.bzl", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
23
tools/gpu/vk/BUILD.bazel
Normal file
23
tools/gpu/vk/BUILD.bazel
Normal file
@ -0,0 +1,23 @@
|
||||
load("//bazel:macros.bzl", "cc_library", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
cc_library(
|
||||
name = "testutils",
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"GrVulkanDefines.h",
|
||||
"VkTestUtils.cpp",
|
||||
],
|
||||
hdrs = ["VkTestUtils.h"],
|
||||
visibility = [
|
||||
"//example:__subpackages__",
|
||||
"//tools:__subpackages__",
|
||||
],
|
||||
deps = [
|
||||
"//:skia_core",
|
||||
"//include/third_party/vulkan",
|
||||
],
|
||||
)
|
74
tools/sk_app/BUILD.bazel
Normal file
74
tools/sk_app/BUILD.bazel
Normal file
@ -0,0 +1,74 @@
|
||||
load("//bazel:macros.bzl", "cc_library", "exports_files_legacy", "select_multi", "selects")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "dawn_unix",
|
||||
match_all = [
|
||||
"//bazel/common_config_settings:dawn_backend",
|
||||
"@platforms//os:linux",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "gl_unix",
|
||||
match_all = [
|
||||
"//bazel/common_config_settings:gl_backend",
|
||||
"@platforms//os:linux",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "vulkan_unix",
|
||||
match_all = [
|
||||
"//bazel/common_config_settings:vulkan_backend",
|
||||
"@platforms//os:linux",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "sk_app",
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"Window.cpp",
|
||||
"WindowContext.cpp",
|
||||
"RasterWindowContext.h",
|
||||
] + select_multi(
|
||||
{
|
||||
"//bazel/common_config_settings:dawn_backend": [
|
||||
"DawnWindowContext.h",
|
||||
"DawnWindowContext.cpp",
|
||||
],
|
||||
"//bazel/common_config_settings:gl_backend": [
|
||||
"GLWindowContext.cpp",
|
||||
"GLWindowContext.h",
|
||||
],
|
||||
"//bazel/common_config_settings:vulkan_backend": [
|
||||
"VulkanWindowContext.h",
|
||||
"VulkanWindowContext.cpp",
|
||||
],
|
||||
},
|
||||
default = [],
|
||||
) + select({
|
||||
"@platforms//os:linux": ["//tools/sk_app/unix:srcs"],
|
||||
"//conditions:default": [],
|
||||
# TODO(kjlubick) add Windows/Mac support
|
||||
}),
|
||||
hdrs = [
|
||||
"Application.h",
|
||||
"DisplayParams.h",
|
||||
"Window.h",
|
||||
"WindowContext.h",
|
||||
],
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = [
|
||||
"//:skia_core",
|
||||
"//tools/skui",
|
||||
"//tools/timer",
|
||||
] + select({
|
||||
"@platforms//os:linux": ["//tools/sk_app/unix:deps"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
52
tools/sk_app/unix/BUILD.bazel
Normal file
52
tools/sk_app/unix/BUILD.bazel
Normal file
@ -0,0 +1,52 @@
|
||||
load("//bazel:macros.bzl", "cc_library", "exports_files_legacy", "selects")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
testonly = True,
|
||||
srcs = [
|
||||
"RasterWindowContext_unix.cpp",
|
||||
"WindowContextFactory_unix.h",
|
||||
"Window_unix.cpp",
|
||||
"Window_unix.h",
|
||||
"keysym2ucs.c",
|
||||
"keysym2ucs.h",
|
||||
"main_unix.cpp",
|
||||
] + select({
|
||||
"//bazel/common_config_settings:dawn_backend": ["DawnVulkanWindowContext_unix.cpp"],
|
||||
"//bazel/common_config_settings:gl_backend": ["GLWindowContext_unix.cpp"],
|
||||
"//bazel/common_config_settings:vulkan_backend": ["VulkanWindowContext_unix.cpp"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
visibility = ["//tools/sk_app:__pkg__"],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "dawn_or_vulkan",
|
||||
match_any = [
|
||||
"//bazel/common_config_settings:dawn_backend",
|
||||
"//bazel/common_config_settings:vulkan_backend",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "deps",
|
||||
testonly = True,
|
||||
linkopts = [
|
||||
"-lX11",
|
||||
"-lxcb", # dep of X11
|
||||
"-lXau", # dep of xcb
|
||||
"-lXdmcp", # dep of xcb
|
||||
] + select({
|
||||
":dawn_or_vulkan": ["-lX11-xcb"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
visibility = ["//tools/sk_app:__pkg__"],
|
||||
deps = select({
|
||||
":dawn_or_vulkan": ["//tools/gpu/vk:testutils"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
)
|
@ -2,20 +2,13 @@
|
||||
* Copyright 2016 Google Inc.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license that can be
|
||||
* f 49
|
||||
* Prev
|
||||
* Up
|
||||
*
|
||||
*
|
||||
* found in the LICENSE file.
|
||||
*/
|
||||
|
||||
//#include <tchar.h>
|
||||
|
||||
#include "tools/sk_app/unix/WindowContextFactory_unix.h"
|
||||
|
||||
#include "src/utils/SkUTF.h"
|
||||
#include "tools/sk_app/GLWindowContext.h"
|
||||
#include "tools/sk_app/WindowContext.h"
|
||||
#include "tools/sk_app/unix/Window_unix.h"
|
||||
#include "tools/skui/ModifierKey.h"
|
||||
#include "tools/timer/Timer.h"
|
||||
|
16
tools/skui/BUILD.bazel
Normal file
16
tools/skui/BUILD.bazel
Normal file
@ -0,0 +1,16 @@
|
||||
load("//bazel:macros.bzl", "cc_library", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
cc_library(
|
||||
name = "skui",
|
||||
srcs = ["//include/private:SkBitmaskEnum.h"],
|
||||
hdrs = [
|
||||
"InputState.h",
|
||||
"Key.h",
|
||||
"ModifierKey.h",
|
||||
],
|
||||
visibility = ["//:__subpackages__"],
|
||||
)
|
16
tools/timer/BUILD.bazel
Normal file
16
tools/timer/BUILD.bazel
Normal file
@ -0,0 +1,16 @@
|
||||
load("//bazel:macros.bzl", "cc_library", "exports_files_legacy")
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
exports_files_legacy()
|
||||
|
||||
cc_library(
|
||||
name = "timer",
|
||||
srcs = [
|
||||
"TimeUtils.h",
|
||||
"Timer.cpp",
|
||||
],
|
||||
hdrs = ["Timer.h"],
|
||||
visibility = ["//:__subpackages__"],
|
||||
deps = ["//:skia_core"],
|
||||
)
|
Loading…
Reference in New Issue
Block a user