blob: ac33bf8dad3400a7c7bc845e3692c3fce846c7af [file] [log] [blame]
jvanverthfd359ca2016-03-18 11:57:24 -07001
2/*
3 * Copyright 2016 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9#ifndef GrVkTypes_DEFINED
10#define GrVkTypes_DEFINED
11
jvanverthe50f3e72016-03-28 07:03:06 -070012#include "vk/GrVkDefines.h"
jvanverthfd359ca2016-03-18 11:57:24 -070013
14/**
15 * KHR_debug
16 */
17/*typedef void (GR_GL_FUNCTION_TYPE* GrVkDEBUGPROC)(GrVkenum source,
18 GrVkenum type,
19 GrVkuint id,
20 GrVkenum severity,
21 GrVksizei length,
22 const GrVkchar* message,
23 const void* userParam);*/
24
25
26
27///////////////////////////////////////////////////////////////////////////////
28/**
29 * Types for interacting with Vulkan resources created externally to Skia. GrBackendObjects for
30 * Vulkan textures are really const GrVkTextureInfo*
31 */
32
33struct GrVkTextureInfo {
34 VkImage fImage;
35 VkDeviceMemory fAlloc; // this may be null iff the texture is an RT and uses borrow semantics
36 VkImageTiling fImageTiling;
37 VkImageLayout fImageLayout;
egdaniel58a8d922016-04-21 08:03:10 -070038 VkFormat fFormat;
jvanverthfd359ca2016-03-18 11:57:24 -070039};
40
41GR_STATIC_ASSERT(sizeof(GrBackendObject) >= sizeof(const GrVkTextureInfo*));
42
43#endif