Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 1 | // |
| 2 | // Copyright 2016 The ANGLE Project Authors. All rights reserved. |
| 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
| 6 | // RendererVk.cpp: |
| 7 | // Implements the class methods for RendererVk. |
| 8 | // |
| 9 | |
| 10 | #include "libANGLE/renderer/vulkan/RendererVk.h" |
| 11 | |
| 12 | #include "common/debug.h" |
| 13 | |
| 14 | namespace rx |
| 15 | { |
| 16 | |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame^] | 17 | RendererVk::RendererVk() : mCapsInitialized(false) |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 18 | { |
| 19 | } |
| 20 | |
| 21 | RendererVk::~RendererVk() |
| 22 | { |
| 23 | } |
| 24 | |
Jamie Madill | acccc6c | 2016-05-03 17:22:10 -0400 | [diff] [blame^] | 25 | void RendererVk::ensureCapsInitialized() const |
| 26 | { |
| 27 | if (!mCapsInitialized) |
| 28 | { |
| 29 | generateCaps(&mNativeCaps, &mNativeTextureCaps, &mNativeExtensions, &mNativeLimitations); |
| 30 | mCapsInitialized = true; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | void RendererVk::generateCaps(gl::Caps * /*outCaps*/, |
| 35 | gl::TextureCapsMap * /*outTextureCaps*/, |
| 36 | gl::Extensions * /*outExtensions*/, |
| 37 | gl::Limitations * /* outLimitations */) const |
| 38 | { |
| 39 | // TODO(jmadill): Caps |
| 40 | } |
| 41 | |
| 42 | const gl::Caps &RendererVk::getNativeCaps() const |
| 43 | { |
| 44 | ensureCapsInitialized(); |
| 45 | return mNativeCaps; |
| 46 | } |
| 47 | |
| 48 | const gl::TextureCapsMap &RendererVk::getNativeTextureCaps() const |
| 49 | { |
| 50 | ensureCapsInitialized(); |
| 51 | return mNativeTextureCaps; |
| 52 | } |
| 53 | |
| 54 | const gl::Extensions &RendererVk::getNativeExtensions() const |
| 55 | { |
| 56 | ensureCapsInitialized(); |
| 57 | return mNativeExtensions; |
| 58 | } |
| 59 | |
| 60 | const gl::Limitations &RendererVk::getNativeLimitations() const |
| 61 | { |
| 62 | ensureCapsInitialized(); |
| 63 | return mNativeLimitations; |
| 64 | } |
| 65 | |
Jamie Madill | 9e54b5a | 2016-05-25 12:57:39 -0400 | [diff] [blame] | 66 | } // namespace rx |