blob: a9dc1f679afe56c3b7617de2b237bda4b39700f4 [file] [log] [blame]
Jamie Madill9e54b5a2016-05-25 12:57:39 -04001//
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
14namespace rx
15{
16
Jamie Madillacccc6c2016-05-03 17:22:10 -040017RendererVk::RendererVk() : mCapsInitialized(false)
Jamie Madill9e54b5a2016-05-25 12:57:39 -040018{
19}
20
21RendererVk::~RendererVk()
22{
23}
24
Jamie Madillacccc6c2016-05-03 17:22:10 -040025void RendererVk::ensureCapsInitialized() const
26{
27 if (!mCapsInitialized)
28 {
29 generateCaps(&mNativeCaps, &mNativeTextureCaps, &mNativeExtensions, &mNativeLimitations);
30 mCapsInitialized = true;
31 }
32}
33
34void 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
42const gl::Caps &RendererVk::getNativeCaps() const
43{
44 ensureCapsInitialized();
45 return mNativeCaps;
46}
47
48const gl::TextureCapsMap &RendererVk::getNativeTextureCaps() const
49{
50 ensureCapsInitialized();
51 return mNativeTextureCaps;
52}
53
54const gl::Extensions &RendererVk::getNativeExtensions() const
55{
56 ensureCapsInitialized();
57 return mNativeExtensions;
58}
59
60const gl::Limitations &RendererVk::getNativeLimitations() const
61{
62 ensureCapsInitialized();
63 return mNativeLimitations;
64}
65
Jamie Madill9e54b5a2016-05-25 12:57:39 -040066} // namespace rx