| // Copyright (C) 2016 The Android Open Source Project |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| //go:generate apic template vulkan.api ../templates/api.go.tmpl |
| //go:generate apic template vulkan.api ../templates/mutate.go.tmpl |
| |
| //go:generate apic template --dir ../../../cc/gapir vulkan.api ../templates/gfx_api.cpp.tmpl |
| //go:generate apic template --dir ../../../cc/gapir vulkan.api ../templates/gfx_api.h.tmpl |
| |
| //go:generate apic template --dir ../../../cc/gapii vulkan.api ../templates/api_exports.cpp.tmpl |
| //go:generate apic template --dir ../../../cc/gapii vulkan.api ../templates/api_imports.cpp.tmpl |
| //go:generate apic template --dir ../../../cc/gapii vulkan.api ../templates/api_imports.h.tmpl |
| //go:generate apic template --dir ../../../cc/gapii vulkan.api ../templates/api_spy.h.tmpl |
| //go:generate apic template --dir ../../../cc/gapii vulkan.api ../templates/api_spy.cpp.tmpl |
| //go:generate apic template --dir ../../../cc/gapii vulkan.api ../templates/api_types.h.tmpl |
| |
| //go:generate annotate -base64 snippets.base64 -text snippets.text -globals_base64 globals_snippets.base64 -globals_text globals_snippets.text vulkan.api |
| //go:generate embed -out snippets_embed.go snippets.base64 globals_snippets.base64 |
| |
| // Package vulkan implementes the API interface for the Vulkan graphics library. |
| package vulkan |
| |
| import ( |
| "android.googlesource.com/platform/tools/gpu/gapid/gfxapi" |
| ) |
| |
| // binary: cpp = vulkan |
| type VulkanContext struct{} |
| |
| func (VulkanContext) Name() string { |
| return "Vulkan Context" |
| } |
| |
| func (VulkanContext) ID() gfxapi.ContextID { |
| // ID returns the context's unique identifier |
| return gfxapi.ContextID{} |
| } |
| |
| func (api) Context(s *gfxapi.State) gfxapi.Context { |
| return VulkanContext{} |
| } |
| |
| func (api) GetFramebufferAttachmentSize(state *gfxapi.State, attachment gfxapi.FramebufferAttachment) (width uint32, height uint32, err error) { |
| return 0, 0, nil |
| } |