Lines Matching refs:backendContext
58 sk_sp<GrGpu> GrVkGpu::Make(const GrVkBackendContext& backendContext, in Make() argument
60 if (backendContext.fInstance == VK_NULL_HANDLE || in Make()
61 backendContext.fPhysicalDevice == VK_NULL_HANDLE || in Make()
62 backendContext.fDevice == VK_NULL_HANDLE || in Make()
63 backendContext.fQueue == VK_NULL_HANDLE) { in Make()
66 if (!backendContext.fGetProc) { in Make()
72 backendContext.fGetProc("vkEnumerateInstanceVersion", in Make()
87 backendContext.fGetProc("vkGetPhysicalDeviceProperties", in Make()
88 backendContext.fInstance, in Make()
95 localGetPhysicalDeviceProperties(backendContext.fPhysicalDevice, &physDeviceProperties); in Make()
98 uint32_t apiVersion = backendContext.fMaxAPIVersion ? backendContext.fMaxAPIVersion in Make()
106 if (backendContext.fVkExtensions) { in Make()
107 interface.reset(new GrVkInterface(backendContext.fGetProc, in Make()
108 backendContext.fInstance, in Make()
109 backendContext.fDevice, in Make()
112 backendContext.fVkExtensions)); in Make()
113 if (!interface->validate(instanceVersion, physDevVersion, backendContext.fVkExtensions)) { in Make()
121 if (backendContext.fExtensions & kKHR_swapchain_GrVkExtensionFlag) { in Make()
123 extensions.init(backendContext.fGetProc, backendContext.fInstance, in Make()
124 backendContext.fPhysicalDevice, 0, nullptr, 1, &swapChainExtName); in Make()
126 interface.reset(new GrVkInterface(backendContext.fGetProc, in Make()
127 backendContext.fInstance, in Make()
128 backendContext.fDevice, in Make()
138 if (backendContext.fDeviceFeatures2) { in Make()
139 caps.reset(new GrVkCaps(options, interface.get(), backendContext.fPhysicalDevice, in Make()
140 *backendContext.fDeviceFeatures2, instanceVersion, physDevVersion, in Make()
141 *backendContext.fVkExtensions, backendContext.fProtectedContext)); in Make()
142 } else if (backendContext.fDeviceFeatures) { in Make()
145 features2.features = *backendContext.fDeviceFeatures; in Make()
146 caps.reset(new GrVkCaps(options, interface.get(), backendContext.fPhysicalDevice, in Make()
148 *backendContext.fVkExtensions, backendContext.fProtectedContext)); in Make()
153 if (backendContext.fFeatures & kGeometryShader_GrVkFeatureFlag) { in Make()
156 if (backendContext.fFeatures & kDualSrcBlend_GrVkFeatureFlag) { in Make()
159 if (backendContext.fFeatures & kSampleRateShading_GrVkFeatureFlag) { in Make()
166 if (backendContext.fExtensions & kKHR_swapchain_GrVkExtensionFlag) { in Make()
168 extensions.init(backendContext.fGetProc, backendContext.fInstance, in Make()
169 backendContext.fPhysicalDevice, 0, nullptr, 1, &swapChainExtName); in Make()
171 caps.reset(new GrVkCaps(options, interface.get(), backendContext.fPhysicalDevice, in Make()
173 backendContext.fProtectedContext)); in Make()
180 sk_sp<GrVkMemoryAllocator> memoryAllocator = backendContext.fMemoryAllocator; in Make()
183 memoryAllocator = GrVkAMDMemoryAllocator::Make(backendContext.fInstance, in Make()
184 backendContext.fPhysicalDevice, in Make()
185 backendContext.fDevice, physDevVersion, in Make()
186 backendContext.fVkExtensions, interface, in Make()
194 sk_sp<GrVkGpu> vkGpu(new GrVkGpu(direct, backendContext, std::move(caps), interface, in Make()
197 if (backendContext.fProtectedContext == GrProtected::kYes && in Make()
206 GrVkGpu::GrVkGpu(GrDirectContext* direct, const GrVkBackendContext& backendContext, in GrVkGpu() argument
214 , fPhysicalDevice(backendContext.fPhysicalDevice) in GrVkGpu()
215 , fDevice(backendContext.fDevice) in GrVkGpu()
216 , fQueue(backendContext.fQueue) in GrVkGpu()
217 , fQueueIndex(backendContext.fGraphicsQueueIndex) in GrVkGpu()
221 , fProtectedContext(backendContext.fProtectedContext) { in GrVkGpu()
222 SkASSERT(!backendContext.fOwnsInstanceAndDevice); in GrVkGpu()
227 VK_CALL(GetPhysicalDeviceProperties(backendContext.fPhysicalDevice, &fPhysDevProps)); in GrVkGpu()
228 VK_CALL(GetPhysicalDeviceMemoryProperties(backendContext.fPhysicalDevice, &fPhysDevMemProps)); in GrVkGpu()