| 1 |
load("//bazel:skia_rules.bzl", "skia_cc_library", "split_srcs_and_hdrs") |
| 2 |
|
| 3 |
package( |
| 4 |
default_applicable_licenses = ["//:license"], |
| 5 |
) |
| 6 |
|
| 7 |
licenses(["notice"]) |
| 8 |
|
| 9 |
VULKAN_FILES = [ |
| 10 |
"VulkanBackendSemaphore.cpp", |
| 11 |
"VulkanBackendTexture.cpp", |
| 12 |
"VulkanBuffer.cpp", |
| 13 |
"VulkanBuffer.h", |
| 14 |
"VulkanCaps.cpp", |
| 15 |
"VulkanCaps.h", |
| 16 |
"VulkanCommandBuffer.cpp", |
| 17 |
"VulkanCommandBuffer.h", |
| 18 |
"VulkanDescriptorPool.cpp", |
| 19 |
"VulkanDescriptorPool.h", |
| 20 |
"VulkanDescriptorSet.cpp", |
| 21 |
"VulkanDescriptorSet.h", |
| 22 |
"VulkanFramebuffer.cpp", |
| 23 |
"VulkanFramebuffer.h", |
| 24 |
"VulkanGraphicsPipeline.cpp", |
| 25 |
"VulkanGraphicsPipeline.h", |
| 26 |
"VulkanGraphiteUtils.cpp", |
| 27 |
"VulkanGraphiteUtils.h", |
| 28 |
"VulkanImageView.cpp", |
| 29 |
"VulkanImageView.h", |
| 30 |
"VulkanQueueManager.cpp", |
| 31 |
"VulkanQueueManager.h", |
| 32 |
"VulkanRenderPass.cpp", |
| 33 |
"VulkanRenderPass.h", |
| 34 |
"VulkanResourceProvider.cpp", |
| 35 |
"VulkanResourceProvider.h", |
| 36 |
"VulkanSampler.cpp", |
| 37 |
"VulkanSampler.h", |
| 38 |
"VulkanSharedContext.cpp", |
| 39 |
"VulkanSharedContext.h", |
| 40 |
"VulkanSpirvTransforms.cpp", |
| 41 |
"VulkanSpirvTransforms.h", |
| 42 |
"VulkanTexture.cpp", |
| 43 |
"VulkanTexture.h", |
| 44 |
"VulkanTextureInfo.cpp", |
| 45 |
"VulkanYcbcrConversion.cpp", |
| 46 |
"VulkanYcbcrConversion.h", |
| 47 |
] |
| 48 |
|
| 49 |
split_srcs_and_hdrs( |
| 50 |
name = "vk", |
| 51 |
files = VULKAN_FILES, |
| 52 |
) |
| 53 |
|
| 54 |
skia_cc_library( |
| 55 |
name = "graphite_native_vulkan", |
| 56 |
srcs = [ |
| 57 |
":vk_hdrs", |
| 58 |
":vk_srcs", |
| 59 |
], |
| 60 |
hdrs = [ |
| 61 |
"//include/gpu:shared_gpu_hdrs", |
| 62 |
"//include/gpu/graphite:public_hdrs", |
| 63 |
"//include/gpu/graphite/vk:public_hdrs", |
| 64 |
], |
| 65 |
defines = ["SK_VULKAN"], |
| 66 |
implementation_deps = [ |
| 67 |
"//include/third_party/vulkan", |
| 68 |
], |
| 69 |
local_defines = ["SK_USE_INTERNAL_VULKAN_HEADERS"], |
| 70 |
visibility = ["//:__pkg__"], |
| 71 |
deps = [ |
| 72 |
"//:core", |
| 73 |
"//src/base", |
| 74 |
"//src/core:core_priv", |
| 75 |
"//src/gpu", |
| 76 |
"//src/gpu/graphite", |
| 77 |
"//src/gpu/vk", |
| 78 |
] + select({ |
| 79 |
"//bazel/common_config_settings:debug_build": ["//src/sksl/codegen:spirv_validator"], |
| 80 |
"//conditions:default": [], |
| 81 |
}), |
| 82 |
) |
| 83 |
|
| 84 |
skia_cc_library( |
| 85 |
name = "graphite_native_vulkan_TEST_UTIL", |
| 86 |
testonly = True, |
| 87 |
srcs = [ |
| 88 |
":vk_hdrs", |
| 89 |
":vk_srcs", |
| 90 |
], |
| 91 |
hdrs = [ |
| 92 |
"//include/gpu:shared_gpu_hdrs", |
| 93 |
"//include/gpu/graphite:public_hdrs", |
| 94 |
"//include/gpu/graphite/vk:public_hdrs", |
| 95 |
], |
| 96 |
defines = [ |
| 97 |
"SK_VULKAN", |
| 98 |
"GPU_TEST_UTILS", |
| 99 |
], |
| 100 |
implementation_deps = [ |
| 101 |
"//include/third_party/vulkan", |
| 102 |
], |
| 103 |
local_defines = ["SK_USE_INTERNAL_VULKAN_HEADERS"], |
| 104 |
visibility = [ |
| 105 |
"//tools:__pkg__", |
| 106 |
"//tools/window:__pkg__", |
| 107 |
], |
| 108 |
deps = [ |
| 109 |
"//:core", |
| 110 |
"//src/base", |
| 111 |
"//src/core:core_priv", |
| 112 |
"//src/gpu", |
| 113 |
"//src/gpu/graphite:graphite_TEST_UTIL", |
| 114 |
"//src/gpu/vk", |
| 115 |
] + select({ |
| 116 |
"//bazel/common_config_settings:debug_build": ["//src/sksl/codegen:spirv_validator"], |
| 117 |
"//conditions:default": [], |
| 118 |
}), |
| 119 |
) |