Lines Matching refs:backendContext

61 sk_sp<GrGpu> GrVkGpu::Make(const GrVkBackendContext& backendContext,
63 if (backendContext.fInstance == VK_NULL_HANDLE ||
64 backendContext.fPhysicalDevice == VK_NULL_HANDLE ||
65 backendContext.fDevice == VK_NULL_HANDLE ||
66 backendContext.fQueue == VK_NULL_HANDLE) {
69 if (!backendContext.fGetProc) {
75 backendContext.fGetProc("vkEnumerateInstanceVersion",
90 backendContext.fGetProc("vkGetPhysicalDeviceProperties",
91 backendContext.fInstance,
98 localGetPhysicalDeviceProperties(backendContext.fPhysicalDevice, &physDeviceProperties);
101 uint32_t apiVersion = backendContext.fMaxAPIVersion ? backendContext.fMaxAPIVersion
109 if (backendContext.fVkExtensions) {
110 interface.reset(new GrVkInterface(backendContext.fGetProc,
111 backendContext.fInstance,
112 backendContext.fDevice,
115 backendContext.fVkExtensions));
116 if (!interface->validate(instanceVersion, physDevVersion, backendContext.fVkExtensions)) {
124 if (backendContext.fExtensions & kKHR_swapchain_GrVkExtensionFlag) {
126 extensions.init(backendContext.fGetProc, backendContext.fInstance,
127 backendContext.fPhysicalDevice, 0, nullptr, 1, &swapChainExtName);
129 interface.reset(new GrVkInterface(backendContext.fGetProc,
130 backendContext.fInstance,
131 backendContext.fDevice,
141 if (backendContext.fDeviceFeatures2) {
142 caps.reset(new GrVkCaps(options, interface.get(), backendContext.fPhysicalDevice,
143 *backendContext.fDeviceFeatures2, instanceVersion, physDevVersion,
144 *backendContext.fVkExtensions, backendContext.fProtectedContext));
145 } else if (backendContext.fDeviceFeatures) {
148 features2.features = *backendContext.fDeviceFeatures;
149 caps.reset(new GrVkCaps(options, interface.get(), backendContext.fPhysicalDevice,
151 *backendContext.fVkExtensions, backendContext.fProtectedContext));
156 if (backendContext.fFeatures & kGeometryShader_GrVkFeatureFlag) {
159 if (backendContext.fFeatures & kDualSrcBlend_GrVkFeatureFlag) {
162 if (backendContext.fFeatures & kSampleRateShading_GrVkFeatureFlag) {
169 if (backendContext.fExtensions & kKHR_swapchain_GrVkExtensionFlag) {
171 extensions.init(backendContext.fGetProc, backendContext.fInstance,
172 backendContext.fPhysicalDevice, 0, nullptr, 1, &swapChainExtName);
174 caps.reset(new GrVkCaps(options, interface.get(), backendContext.fPhysicalDevice,
176 backendContext.fProtectedContext));
183 sk_sp<GrVkMemoryAllocator> memoryAllocator = backendContext.fMemoryAllocator;
186 memoryAllocator = GrVkAMDMemoryAllocator::Make(backendContext.fInstance,
187 backendContext.fPhysicalDevice,
188 backendContext.fDevice, physDevVersion,
189 backendContext.fVkExtensions, interface,
198 GrVkAMDMemoryAllocator::Make(backendContext.fInstance,
199 backendContext.fPhysicalDevice,
200 backendContext.fDevice, physDevVersion,
201 backendContext.fVkExtensions, interface,
208 sk_sp<GrVkGpu> vkGpu(new GrVkGpu(direct, backendContext, std::move(caps), interface,
212 if (backendContext.fProtectedContext == GrProtected::kYes &&
221 GrVkGpu::GrVkGpu(GrDirectContext* direct, const GrVkBackendContext& backendContext,
231 , fPhysicalDevice(backendContext.fPhysicalDevice)
232 , fDevice(backendContext.fDevice)
233 , fQueue(backendContext.fQueue)
234 , fQueueIndex(backendContext.fGraphicsQueueIndex)
238 , fProtectedContext(backendContext.fProtectedContext) {
239 SkASSERT(!backendContext.fOwnsInstanceAndDevice);
245 VK_CALL(GetPhysicalDeviceProperties(backendContext.fPhysicalDevice, &fPhysDevProps));
246 VK_CALL(GetPhysicalDeviceMemoryProperties(backendContext.fPhysicalDevice, &fPhysDevMemProps));