| 1 |
load("//bazel:skia_rules.bzl", "skia_cc_library", "skia_filegroup", "split_srcs_and_hdrs") |
| 2 |
|
| 3 |
package( |
| 4 |
default_applicable_licenses = ["//:license"], |
| 5 |
) |
| 6 |
|
| 7 |
licenses(["notice"]) |
| 8 |
|
| 9 |
VK_FILES = [ |
| 10 |
"GrVkBackendSemaphore.cpp", |
| 11 |
"GrVkBackendSurface.cpp", |
| 12 |
"GrVkBackendSurfacePriv.h", |
| 13 |
"GrVkBuffer.cpp", |
| 14 |
"GrVkBuffer.h", |
| 15 |
"GrVkCaps.cpp", |
| 16 |
"GrVkCaps.h", |
| 17 |
"GrVkCommandBuffer.cpp", |
| 18 |
"GrVkCommandBuffer.h", |
| 19 |
"GrVkCommandPool.cpp", |
| 20 |
"GrVkCommandPool.h", |
| 21 |
"GrVkContextThreadSafeProxy.cpp", |
| 22 |
"GrVkContextThreadSafeProxy.h", |
| 23 |
"GrVkDescriptorPool.cpp", |
| 24 |
"GrVkDescriptorPool.h", |
| 25 |
"GrVkDescriptorSet.cpp", |
| 26 |
"GrVkDescriptorSet.h", |
| 27 |
"GrVkDescriptorSetManager.cpp", |
| 28 |
"GrVkDescriptorSetManager.h", |
| 29 |
"GrVkDirectContext.cpp", |
| 30 |
"GrVkFramebuffer.cpp", |
| 31 |
"GrVkFramebuffer.h", |
| 32 |
"GrVkGpu.cpp", |
| 33 |
"GrVkGpu.h", |
| 34 |
"GrVkImage.cpp", |
| 35 |
"GrVkImage.h", |
| 36 |
"GrVkImageLayout.h", |
| 37 |
"GrVkImageView.cpp", |
| 38 |
"GrVkImageView.h", |
| 39 |
"GrVkManagedResource.h", |
| 40 |
"GrVkMSAALoadManager.cpp", |
| 41 |
"GrVkMSAALoadManager.h", |
| 42 |
"GrVkOpsRenderPass.cpp", |
| 43 |
"GrVkOpsRenderPass.h", |
| 44 |
"GrVkPipeline.cpp", |
| 45 |
"GrVkPipeline.h", |
| 46 |
"GrVkPipelineState.cpp", |
| 47 |
"GrVkPipelineState.h", |
| 48 |
"GrVkPipelineStateBuilder.cpp", |
| 49 |
"GrVkPipelineStateBuilder.h", |
| 50 |
"GrVkPipelineStateCache.cpp", |
| 51 |
"GrVkPipelineStateDataManager.cpp", |
| 52 |
"GrVkPipelineStateDataManager.h", |
| 53 |
"GrVkRenderPass.cpp", |
| 54 |
"GrVkRenderPass.h", |
| 55 |
"GrVkRenderTarget.cpp", |
| 56 |
"GrVkRenderTarget.h", |
| 57 |
"GrVkResourceProvider.cpp", |
| 58 |
"GrVkResourceProvider.h", |
| 59 |
"GrVkSampler.cpp", |
| 60 |
"GrVkSampler.h", |
| 61 |
"GrVkSamplerYcbcrConversion.cpp", |
| 62 |
"GrVkSamplerYcbcrConversion.h", |
| 63 |
"GrVkSemaphore.cpp", |
| 64 |
"GrVkSemaphore.h", |
| 65 |
"GrVkTexture.cpp", |
| 66 |
"GrVkTexture.h", |
| 67 |
"GrVkTextureRenderTarget.cpp", |
| 68 |
"GrVkTextureRenderTarget.h", |
| 69 |
"GrVkTypesPriv.cpp", |
| 70 |
"GrVkTypesPriv.h", |
| 71 |
"GrVkUniformHandler.cpp", |
| 72 |
"GrVkUniformHandler.h", |
| 73 |
"GrVkUtil.cpp", |
| 74 |
"GrVkUtil.h", |
| 75 |
"GrVkVaryingHandler.cpp", |
| 76 |
"GrVkVaryingHandler.h", |
| 77 |
] |
| 78 |
|
| 79 |
split_srcs_and_hdrs( |
| 80 |
name = "vk", |
| 81 |
files = VK_FILES, |
| 82 |
) |
| 83 |
|
| 84 |
skia_filegroup( |
| 85 |
name = "vk_chromium_srcs", |
| 86 |
srcs = ["GrVkSecondaryCBDrawContext.cpp"], |
| 87 |
) |
| 88 |
|
| 89 |
skia_filegroup( |
| 90 |
name = "android_srcs", |
| 91 |
srcs = ["AHardwareBufferVk.cpp"], |
| 92 |
) |
| 93 |
|
| 94 |
# TODO(kjlubick, egdaniel) Get G3 clients to update and remove. |
| 95 |
skia_cc_library( |
| 96 |
name = "legacy_ganesh_vulkan", |
| 97 |
srcs = [ |
| 98 |
":vk_hdrs", |
| 99 |
":vk_srcs", |
| 100 |
"//include/private/gpu/vk:private_hdrs", |
| 101 |
], |
| 102 |
hdrs = [ |
| 103 |
"//include/gpu:shared_gpu_hdrs", |
| 104 |
"//include/gpu/ganesh:ganesh_hdrs", |
| 105 |
"//include/gpu/ganesh/vk:public_hdrs", |
| 106 |
"//include/gpu/vk:shared_public_hdrs", |
| 107 |
], |
| 108 |
defines = [ |
| 109 |
"SK_VULKAN", |
| 110 |
], |
| 111 |
features = ["layering_check"], |
| 112 |
local_defines = [ |
| 113 |
"SK_USE_VMA", |
| 114 |
], |
| 115 |
visibility = ["//:__pkg__"], |
| 116 |
deps = [ |
| 117 |
"//:core", |
| 118 |
"//src/base", |
| 119 |
"//src/core:core_priv", |
| 120 |
"//src/gpu", |
| 121 |
"//src/gpu/ganesh", |
| 122 |
"//src/gpu/vk", |
| 123 |
"//src/gpu/vk/vulkanmemoryallocator:vulkanmemoryallocator_priv", |
| 124 |
"//src/utils:shader_utils", |
| 125 |
"@vulkan_headers", |
| 126 |
], |
| 127 |
) |
| 128 |
|
| 129 |
# TODO(kjlubick, egdaniel) Get G3 clients to update and remove. |
| 130 |
alias( |
| 131 |
name = "ganesh_vulkan", |
| 132 |
actual = ":legacy_ganesh_vulkan", |
| 133 |
visibility = ["//:__pkg__"], |
| 134 |
) |
| 135 |
|
| 136 |
# TODO(kjlubick, michaelludwig): Rename this target to `ganesh_vulkan` once we've migrated all |
| 137 |
# clients to this target. This is the same as above without the local define and |
| 138 |
# vulkanmemoryallocator_priv define. |
| 139 |
skia_cc_library( |
| 140 |
name = "ganesh_vulkan_novma", |
| 141 |
srcs = [ |
| 142 |
":vk_hdrs", |
| 143 |
":vk_srcs", |
| 144 |
"//include/private/gpu/vk:private_hdrs", |
| 145 |
], |
| 146 |
hdrs = [ |
| 147 |
"//include/gpu:shared_gpu_hdrs", |
| 148 |
"//include/gpu/ganesh:ganesh_hdrs", |
| 149 |
"//include/gpu/ganesh/vk:public_hdrs", |
| 150 |
"//include/gpu/vk:shared_public_hdrs", |
| 151 |
], |
| 152 |
defines = [ |
| 153 |
"SK_VULKAN", |
| 154 |
], |
| 155 |
features = ["layering_check"], |
| 156 |
visibility = ["//:__pkg__"], |
| 157 |
deps = [ |
| 158 |
"//:core", |
| 159 |
"//src/base", |
| 160 |
"//src/core:core_priv", |
| 161 |
"//src/gpu", |
| 162 |
"//src/gpu/ganesh", |
| 163 |
"//src/gpu/vk", |
| 164 |
"//src/utils:shader_utils", |
| 165 |
"@vulkan_headers", |
| 166 |
], |
| 167 |
) |
| 168 |
|
| 169 |
# TODO(lovisolo, kjlubick): Do this with a macro. |
| 170 |
skia_cc_library( |
| 171 |
name = "ganesh_vulkan_TEST_UTIL", |
| 172 |
testonly = True, |
| 173 |
srcs = [ |
| 174 |
":vk_hdrs", |
| 175 |
":vk_srcs", |
| 176 |
"//include/private/gpu/vk:private_hdrs", |
| 177 |
], |
| 178 |
hdrs = [ |
| 179 |
"//include/gpu:shared_gpu_hdrs", |
| 180 |
"//include/gpu/ganesh:ganesh_hdrs", |
| 181 |
"//include/gpu/ganesh/vk:public_hdrs", |
| 182 |
"//include/gpu/vk:shared_public_hdrs", |
| 183 |
], |
| 184 |
defines = [ |
| 185 |
"SK_VULKAN", |
| 186 |
], |
| 187 |
features = ["layering_check"], |
| 188 |
local_defines = [ |
| 189 |
"GPU_TEST_UTILS", |
| 190 |
], |
| 191 |
visibility = ["//tools:__subpackages__"], |
| 192 |
deps = [ |
| 193 |
"//:core", |
| 194 |
"//src/base", |
| 195 |
"//src/core:core_priv", |
| 196 |
"//src/gpu", |
| 197 |
"//src/gpu/ganesh:ganesh_TEST_UTIL", |
| 198 |
"//src/gpu/vk", |
| 199 |
"//src/utils:shader_utils", |
| 200 |
"@vulkan_headers", |
| 201 |
], |
| 202 |
) |