Fix Vulkan Build in Android
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1935523002 Review-Url: https://codereview.chromium.org/1935523002
This commit is contained in:
parent
fb5916486f
commit
b138fdc65f
@ -32,7 +32,11 @@ const char* kDebugLayerNames[] = {
|
||||
#endif
|
||||
|
||||
// the minimum version of Vulkan supported
|
||||
#ifdef SK_BUILD_FOR_ANDROID
|
||||
const uint32_t kGrVkMinimumVersion = VK_MAKE_VERSION(1, 0, 3);
|
||||
#else
|
||||
const uint32_t kGrVkMinimumVersion = VK_MAKE_VERSION(1, 0, 8);
|
||||
#endif
|
||||
|
||||
// Create the base Vulkan objects needed by the GrVkGpu object
|
||||
const GrVkBackendContext* GrVkBackendContext::Create(uint32_t* presentQueueIndexPtr,
|
||||
|
@ -82,7 +82,9 @@ GrGpu* GrVkGpu::Create(GrBackendContext backendContext, const GrContextOptions&
|
||||
GrVkGpu::GrVkGpu(GrContext* context, const GrContextOptions& options,
|
||||
const GrVkBackendContext* backendCtx)
|
||||
: INHERITED(context)
|
||||
#ifdef ENABLE_VK_LAYERS
|
||||
, fVkInstance(backendCtx->fInstance)
|
||||
#endif
|
||||
, fDevice(backendCtx->fDevice)
|
||||
, fQueue(backendCtx->fQueue)
|
||||
, fResourceProvider(this) {
|
||||
|
@ -204,7 +204,9 @@ private:
|
||||
|
||||
// These Vulkan objects are provided by the client, and also stored in fBackendContext.
|
||||
// They're copied here for convenient access.
|
||||
#ifdef ENABLE_VK_LAYERS
|
||||
VkInstance fVkInstance;
|
||||
#endif
|
||||
VkDevice fDevice;
|
||||
VkQueue fQueue; // Must be Graphics queue
|
||||
|
||||
|
@ -35,7 +35,7 @@ void Window_android::setTitle(const char* title) {
|
||||
SkDebugf("Title: %s", title);
|
||||
}
|
||||
|
||||
bool Window_android::attach(BackEndType attachType, int msaaSampleCount, AttachmentInfo*) {
|
||||
bool Window_android::attach(BackEndType attachType, int msaaSampleCount) {
|
||||
if (kVulkan_BackendType != attachType) {
|
||||
return false;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
void setTitle(const char*) override;
|
||||
void show() override {}
|
||||
|
||||
bool attach(BackEndType attachType, int msaaSampleCount, AttachmentInfo*) override;
|
||||
bool attach(BackEndType attachType, int msaaSampleCount) override;
|
||||
void inval() override;
|
||||
|
||||
void paintIfNeeded();
|
||||
|
Loading…
Reference in New Issue
Block a user