Add Vulkan stubs.
Currently enabled for Windows by default.
BUG=angleproject:1319
Change-Id: I87921c579bee466465fb1e3f629bb3a40fdff659
Reviewed-on: https://chromium-review.googlesource.com/328730
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/BufferVk.cpp b/src/libANGLE/renderer/vulkan/BufferVk.cpp
new file mode 100644
index 0000000..b0e01e8
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/BufferVk.cpp
@@ -0,0 +1,74 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// BufferVk.cpp:
+// Implements the class methods for BufferVk.
+//
+
+#include "libANGLE/renderer/vulkan/BufferVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+BufferVk::BufferVk() : BufferImpl()
+{
+}
+
+BufferVk::~BufferVk()
+{
+}
+
+gl::Error BufferVk::setData(const void *data, size_t size, GLenum usage)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error BufferVk::setSubData(const void *data, size_t size, size_t offset)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error BufferVk::copySubData(BufferImpl *source,
+ GLintptr sourceOffset,
+ GLintptr destOffset,
+ GLsizeiptr size)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error BufferVk::map(GLenum access, GLvoid **mapPtr)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error BufferVk::mapRange(size_t offset, size_t length, GLbitfield access, GLvoid **mapPtr)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error BufferVk::unmap(GLboolean *result)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error BufferVk::getIndexRange(GLenum type,
+ size_t offset,
+ size_t count,
+ bool primitiveRestartEnabled,
+ gl::IndexRange *outRange)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/BufferVk.h b/src/libANGLE/renderer/vulkan/BufferVk.h
new file mode 100644
index 0000000..19bd61e
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/BufferVk.h
@@ -0,0 +1,43 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// BufferVk.h:
+// Defines the class interface for BufferVk, implementing BufferImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_BUFFERVK_H_
+#define LIBANGLE_RENDERER_VULKAN_BUFFERVK_H_
+
+#include "libANGLE/renderer/BufferImpl.h"
+
+namespace rx
+{
+
+class BufferVk : public BufferImpl
+{
+ public:
+ BufferVk();
+ ~BufferVk() override;
+
+ gl::Error setData(const void *data, size_t size, GLenum usage) override;
+ gl::Error setSubData(const void *data, size_t size, size_t offset) override;
+ gl::Error copySubData(BufferImpl *source,
+ GLintptr sourceOffset,
+ GLintptr destOffset,
+ GLsizeiptr size) override;
+ gl::Error map(GLenum access, GLvoid **mapPtr) override;
+ gl::Error mapRange(size_t offset, size_t length, GLbitfield access, GLvoid **mapPtr) override;
+ gl::Error unmap(GLboolean *result) override;
+
+ gl::Error getIndexRange(GLenum type,
+ size_t offset,
+ size_t count,
+ bool primitiveRestartEnabled,
+ gl::IndexRange *outRange) override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_BUFFERVK_H_
diff --git a/src/libANGLE/renderer/vulkan/CompilerVk.cpp b/src/libANGLE/renderer/vulkan/CompilerVk.cpp
new file mode 100644
index 0000000..d3f31eb
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/CompilerVk.cpp
@@ -0,0 +1,37 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// CompilerVk.cpp:
+// Implements the class methods for CompilerVk.
+//
+
+#include "libANGLE/renderer/vulkan/CompilerVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+CompilerVk::CompilerVk() : CompilerImpl()
+{
+}
+
+CompilerVk::~CompilerVk()
+{
+}
+
+gl::Error CompilerVk::release()
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+ShShaderOutput CompilerVk::getTranslatorOutputType() const
+{
+ UNIMPLEMENTED();
+ return ShShaderOutput();
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/CompilerVk.h b/src/libANGLE/renderer/vulkan/CompilerVk.h
new file mode 100644
index 0000000..2246a27
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/CompilerVk.h
@@ -0,0 +1,32 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// CompilerVk.h:
+// Defines the class interface for CompilerVk, implementing CompilerImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_COMPILERVK_H_
+#define LIBANGLE_RENDERER_VULKAN_COMPILERVK_H_
+
+#include "libANGLE/renderer/CompilerImpl.h"
+
+namespace rx
+{
+
+class CompilerVk : public CompilerImpl
+{
+ public:
+ CompilerVk();
+ ~CompilerVk() override;
+
+ gl::Error release() override;
+
+ // TODO(jmadill): Expose translator built-in resources init method.
+ ShShaderOutput getTranslatorOutputType() const override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_COMPILERVK_H_
diff --git a/src/libANGLE/renderer/vulkan/ContextVk.cpp b/src/libANGLE/renderer/vulkan/ContextVk.cpp
new file mode 100644
index 0000000..bd13348
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/ContextVk.cpp
@@ -0,0 +1,269 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// ContextVk.cpp:
+// Implements the class methods for ContextVk.
+//
+
+#include "libANGLE/renderer/vulkan/ContextVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+ContextVk::ContextVk(const gl::ContextState &state) : ContextImpl(state)
+{
+}
+
+ContextVk::~ContextVk()
+{
+}
+
+gl::Error ContextVk::initialize()
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error ContextVk::flush()
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error ContextVk::finish()
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error ContextVk::drawArrays(GLenum mode, GLint first, GLsizei count)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error ContextVk::drawArraysInstanced(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei instanceCount)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error ContextVk::drawElements(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const GLvoid *indices,
+ const gl::IndexRange &indexRange)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error ContextVk::drawElementsInstanced(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const GLvoid *indices,
+ GLsizei instances,
+ const gl::IndexRange &indexRange)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error ContextVk::drawRangeElements(GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const GLvoid *indices,
+ const gl::IndexRange &indexRange)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+void ContextVk::notifyDeviceLost()
+{
+ UNIMPLEMENTED();
+}
+
+bool ContextVk::isDeviceLost() const
+{
+ UNIMPLEMENTED();
+ return bool();
+}
+
+bool ContextVk::testDeviceLost()
+{
+ UNIMPLEMENTED();
+ return bool();
+}
+
+bool ContextVk::testDeviceResettable()
+{
+ UNIMPLEMENTED();
+ return bool();
+}
+
+std::string ContextVk::getVendorString() const
+{
+ UNIMPLEMENTED();
+ return std::string();
+}
+
+std::string ContextVk::getRendererDescription() const
+{
+ UNIMPLEMENTED();
+ return std::string();
+}
+
+void ContextVk::insertEventMarker(GLsizei length, const char *marker)
+{
+ UNIMPLEMENTED();
+}
+
+void ContextVk::pushGroupMarker(GLsizei length, const char *marker)
+{
+ UNIMPLEMENTED();
+}
+
+void ContextVk::popGroupMarker()
+{
+ UNIMPLEMENTED();
+}
+
+void ContextVk::syncState(const gl::State &state, const gl::State::DirtyBits &dirtyBits)
+{
+ UNIMPLEMENTED();
+}
+
+GLint ContextVk::getGPUDisjoint()
+{
+ UNIMPLEMENTED();
+ return GLint();
+}
+
+GLint64 ContextVk::getTimestamp()
+{
+ UNIMPLEMENTED();
+ return GLint64();
+}
+
+void ContextVk::onMakeCurrent(const gl::ContextState &data)
+{
+ UNIMPLEMENTED();
+}
+
+const gl::Caps &ContextVk::getNativeCaps() const
+{
+ UNIMPLEMENTED();
+ static gl::Caps local;
+ return local;
+}
+
+const gl::TextureCapsMap &ContextVk::getNativeTextureCaps() const
+{
+ UNIMPLEMENTED();
+ static gl::TextureCapsMap local;
+ return local;
+}
+
+const gl::Extensions &ContextVk::getNativeExtensions() const
+{
+ UNIMPLEMENTED();
+ static gl::Extensions local;
+ return local;
+}
+
+const gl::Limitations &ContextVk::getNativeLimitations() const
+{
+ UNIMPLEMENTED();
+ static gl::Limitations local;
+ return local;
+}
+
+CompilerImpl *ContextVk::createCompiler()
+{
+ UNIMPLEMENTED();
+ return static_cast<CompilerImpl *>(0);
+}
+
+ShaderImpl *ContextVk::createShader(const gl::ShaderState &data)
+{
+ UNIMPLEMENTED();
+ return static_cast<ShaderImpl *>(0);
+}
+
+ProgramImpl *ContextVk::createProgram(const gl::ProgramState &data)
+{
+ UNIMPLEMENTED();
+ return static_cast<ProgramImpl *>(0);
+}
+
+FramebufferImpl *ContextVk::createFramebuffer(const gl::FramebufferState &data)
+{
+ UNIMPLEMENTED();
+ return static_cast<FramebufferImpl *>(0);
+}
+
+TextureImpl *ContextVk::createTexture(const gl::TextureState &state)
+{
+ UNIMPLEMENTED();
+ return static_cast<TextureImpl *>(0);
+}
+
+RenderbufferImpl *ContextVk::createRenderbuffer()
+{
+ UNIMPLEMENTED();
+ return static_cast<RenderbufferImpl *>(0);
+}
+
+BufferImpl *ContextVk::createBuffer()
+{
+ UNIMPLEMENTED();
+ return static_cast<BufferImpl *>(0);
+}
+
+VertexArrayImpl *ContextVk::createVertexArray(const gl::VertexArrayState &data)
+{
+ UNIMPLEMENTED();
+ return static_cast<VertexArrayImpl *>(0);
+}
+
+QueryImpl *ContextVk::createQuery(GLenum type)
+{
+ UNIMPLEMENTED();
+ return static_cast<QueryImpl *>(0);
+}
+
+FenceNVImpl *ContextVk::createFenceNV()
+{
+ UNIMPLEMENTED();
+ return static_cast<FenceNVImpl *>(0);
+}
+
+FenceSyncImpl *ContextVk::createFenceSync()
+{
+ UNIMPLEMENTED();
+ return static_cast<FenceSyncImpl *>(0);
+}
+
+TransformFeedbackImpl *ContextVk::createTransformFeedback()
+{
+ UNIMPLEMENTED();
+ return static_cast<TransformFeedbackImpl *>(0);
+}
+
+SamplerImpl *ContextVk::createSampler()
+{
+ UNIMPLEMENTED();
+ return static_cast<SamplerImpl *>(0);
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/ContextVk.h b/src/libANGLE/renderer/vulkan/ContextVk.h
new file mode 100644
index 0000000..8d83fc6
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/ContextVk.h
@@ -0,0 +1,121 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// ContextVk.h:
+// Defines the class interface for ContextVk, implementing ContextImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_CONTEXTVK_H_
+#define LIBANGLE_RENDERER_VULKAN_CONTEXTVK_H_
+
+#include "libANGLE/renderer/ContextImpl.h"
+
+namespace rx
+{
+
+class ContextVk : public ContextImpl
+{
+ public:
+ ContextVk(const gl::ContextState &state);
+ ~ContextVk() override;
+
+ gl::Error initialize() override;
+
+ // Flush and finish.
+ gl::Error flush() override;
+ gl::Error finish() override;
+
+ // Drawing methods.
+ gl::Error drawArrays(GLenum mode, GLint first, GLsizei count) override;
+ gl::Error drawArraysInstanced(GLenum mode,
+ GLint first,
+ GLsizei count,
+ GLsizei instanceCount) override;
+
+ gl::Error drawElements(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const GLvoid *indices,
+ const gl::IndexRange &indexRange) override;
+ gl::Error drawElementsInstanced(GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const GLvoid *indices,
+ GLsizei instances,
+ const gl::IndexRange &indexRange) override;
+ gl::Error drawRangeElements(GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const GLvoid *indices,
+ const gl::IndexRange &indexRange) override;
+
+ // TODO(jmadill): Investigate proper impl methods for this.
+ void notifyDeviceLost() override;
+ bool isDeviceLost() const override;
+ bool testDeviceLost() override;
+ bool testDeviceResettable() override;
+
+ // Vendor and description strings.
+ std::string getVendorString() const override;
+ std::string getRendererDescription() const override;
+
+ // Debug markers.
+ void insertEventMarker(GLsizei length, const char *marker) override;
+ void pushGroupMarker(GLsizei length, const char *marker) override;
+ void popGroupMarker() override;
+
+ // State sync with dirty bits.
+ void syncState(const gl::State &state, const gl::State::DirtyBits &dirtyBits) override;
+
+ // Disjoint timer queries
+ GLint getGPUDisjoint() override;
+ GLint64 getTimestamp() override;
+
+ // Context switching
+ void onMakeCurrent(const gl::ContextState &data) override;
+
+ // Native capabilities, unmodified by gl::Context.
+ const gl::Caps &getNativeCaps() const override;
+ const gl::TextureCapsMap &getNativeTextureCaps() const override;
+ const gl::Extensions &getNativeExtensions() const override;
+ const gl::Limitations &getNativeLimitations() const override;
+
+ // Shader creation
+ CompilerImpl *createCompiler() override;
+ ShaderImpl *createShader(const gl::ShaderState &data) override;
+ ProgramImpl *createProgram(const gl::ProgramState &data) override;
+
+ // Framebuffer creation
+ FramebufferImpl *createFramebuffer(const gl::FramebufferState &data) override;
+
+ // Texture creation
+ TextureImpl *createTexture(const gl::TextureState &state) override;
+
+ // Renderbuffer creation
+ RenderbufferImpl *createRenderbuffer() override;
+
+ // Buffer creation
+ BufferImpl *createBuffer() override;
+
+ // Vertex Array creation
+ VertexArrayImpl *createVertexArray(const gl::VertexArrayState &data) override;
+
+ // Query and Fence creation
+ QueryImpl *createQuery(GLenum type) override;
+ FenceNVImpl *createFenceNV() override;
+ FenceSyncImpl *createFenceSync() override;
+
+ // Transform Feedback creation
+ TransformFeedbackImpl *createTransformFeedback() override;
+
+ // Sampler object creation
+ SamplerImpl *createSampler() override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_CONTEXTVK_H_
diff --git a/src/libANGLE/renderer/vulkan/DeviceVk.cpp b/src/libANGLE/renderer/vulkan/DeviceVk.cpp
new file mode 100644
index 0000000..f4f60b9
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/DeviceVk.cpp
@@ -0,0 +1,48 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// DeviceVk.cpp:
+// Implements the class methods for DeviceVk.
+//
+
+#include "libANGLE/renderer/vulkan/DeviceVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+DeviceVk::DeviceVk() : DeviceImpl()
+{
+}
+
+DeviceVk::~DeviceVk()
+{
+}
+
+egl::Error DeviceVk::getDevice(void **outValue)
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+EGLint DeviceVk::getType()
+{
+ UNIMPLEMENTED();
+ return EGLint();
+}
+
+void DeviceVk::generateExtensions(egl::DeviceExtensions *outExtensions) const
+{
+ UNIMPLEMENTED();
+}
+
+bool DeviceVk::deviceExternallySourced()
+{
+ UNIMPLEMENTED();
+ return bool();
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/DeviceVk.h b/src/libANGLE/renderer/vulkan/DeviceVk.h
new file mode 100644
index 0000000..4613c17
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/DeviceVk.h
@@ -0,0 +1,32 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// DeviceVk.h:
+// Defines the class interface for DeviceVk, implementing DeviceImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_DEVICEVK_H_
+#define LIBANGLE_RENDERER_VULKAN_DEVICEVK_H_
+
+#include "libANGLE/renderer/DeviceImpl.h"
+
+namespace rx
+{
+
+class DeviceVk : public DeviceImpl
+{
+ public:
+ DeviceVk();
+ ~DeviceVk() override;
+
+ egl::Error getDevice(void **outValue) override;
+ EGLint getType() override;
+ void generateExtensions(egl::DeviceExtensions *outExtensions) const override;
+ bool deviceExternallySourced() override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_DEVICEVK_H_
diff --git a/src/libANGLE/renderer/vulkan/DisplayVk.cpp b/src/libANGLE/renderer/vulkan/DisplayVk.cpp
new file mode 100644
index 0000000..0cf155f
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/DisplayVk.cpp
@@ -0,0 +1,167 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// DisplayVk.cpp:
+// Implements the class methods for DisplayVk.
+//
+
+#include "libANGLE/renderer/vulkan/DisplayVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+DisplayVk::DisplayVk() : DisplayImpl()
+{
+}
+
+DisplayVk::~DisplayVk()
+{
+}
+
+egl::Error DisplayVk::initialize(egl::Display *display)
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+void DisplayVk::terminate()
+{
+ UNIMPLEMENTED();
+}
+
+egl::Error DisplayVk::makeCurrent(egl::Surface *drawSurface,
+ egl::Surface *readSurface,
+ gl::Context *context)
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+egl::ConfigSet DisplayVk::generateConfigs() const
+{
+ UNIMPLEMENTED();
+ return egl::ConfigSet();
+}
+
+bool DisplayVk::isDeviceLost() const
+{
+ UNIMPLEMENTED();
+ return bool();
+}
+
+bool DisplayVk::testDeviceLost()
+{
+ UNIMPLEMENTED();
+ return bool();
+}
+
+egl::Error DisplayVk::restoreLostDevice()
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+bool DisplayVk::isValidNativeWindow(EGLNativeWindowType window) const
+{
+ UNIMPLEMENTED();
+ return bool();
+}
+
+std::string DisplayVk::getVendorString() const
+{
+ UNIMPLEMENTED();
+ return std::string();
+}
+
+egl::Error DisplayVk::getDevice(DeviceImpl **device)
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+egl::Error DisplayVk::waitClient() const
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+egl::Error DisplayVk::waitNative(EGLint engine,
+ egl::Surface *drawSurface,
+ egl::Surface *readSurface) const
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+SurfaceImpl *DisplayVk::createWindowSurface(const egl::SurfaceState &state,
+ const egl::Config *configuration,
+ EGLNativeWindowType window,
+ const egl::AttributeMap &attribs)
+{
+ UNIMPLEMENTED();
+ return static_cast<SurfaceImpl *>(0);
+}
+
+SurfaceImpl *DisplayVk::createPbufferSurface(const egl::SurfaceState &state,
+ const egl::Config *configuration,
+ const egl::AttributeMap &attribs)
+{
+ UNIMPLEMENTED();
+ return static_cast<SurfaceImpl *>(0);
+}
+
+SurfaceImpl *DisplayVk::createPbufferFromClientBuffer(const egl::SurfaceState &state,
+ const egl::Config *configuration,
+ EGLClientBuffer shareHandle,
+ const egl::AttributeMap &attribs)
+{
+ UNIMPLEMENTED();
+ return static_cast<SurfaceImpl *>(0);
+}
+
+SurfaceImpl *DisplayVk::createPixmapSurface(const egl::SurfaceState &state,
+ const egl::Config *configuration,
+ NativePixmapType nativePixmap,
+ const egl::AttributeMap &attribs)
+{
+ UNIMPLEMENTED();
+ return static_cast<SurfaceImpl *>(0);
+}
+
+ImageImpl *DisplayVk::createImage(EGLenum target,
+ egl::ImageSibling *buffer,
+ const egl::AttributeMap &attribs)
+{
+ UNIMPLEMENTED();
+ return static_cast<ImageImpl *>(0);
+}
+
+ContextImpl *DisplayVk::createContext(const gl::ContextState &state)
+{
+ UNIMPLEMENTED();
+ return static_cast<ContextImpl *>(0);
+}
+
+StreamProducerImpl *DisplayVk::createStreamProducerD3DTextureNV12(
+ egl::Stream::ConsumerType consumerType,
+ const egl::AttributeMap &attribs)
+{
+ UNIMPLEMENTED();
+ return static_cast<StreamProducerImpl *>(0);
+}
+
+void DisplayVk::generateExtensions(egl::DisplayExtensions *outExtensions) const
+{
+ UNIMPLEMENTED();
+}
+
+void DisplayVk::generateCaps(egl::Caps *outCaps) const
+{
+ UNIMPLEMENTED();
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/DisplayVk.h b/src/libANGLE/renderer/vulkan/DisplayVk.h
new file mode 100644
index 0000000..d549f98
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/DisplayVk.h
@@ -0,0 +1,81 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// DisplayVk.h:
+// Defines the class interface for DisplayVk, implementing DisplayImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_DISPLAYVK_H_
+#define LIBANGLE_RENDERER_VULKAN_DISPLAYVK_H_
+
+#include "libANGLE/renderer/DisplayImpl.h"
+
+namespace rx
+{
+
+class DisplayVk : public DisplayImpl
+{
+ public:
+ DisplayVk();
+ ~DisplayVk() override;
+
+ egl::Error initialize(egl::Display *display) override;
+ void terminate() override;
+
+ egl::Error makeCurrent(egl::Surface *drawSurface,
+ egl::Surface *readSurface,
+ gl::Context *context) override;
+
+ egl::ConfigSet generateConfigs() const override;
+
+ bool isDeviceLost() const override;
+ bool testDeviceLost() override;
+ egl::Error restoreLostDevice() override;
+
+ bool isValidNativeWindow(EGLNativeWindowType window) const override;
+
+ std::string getVendorString() const override;
+
+ egl::Error getDevice(DeviceImpl **device) override;
+
+ egl::Error waitClient() const override;
+ egl::Error waitNative(EGLint engine,
+ egl::Surface *drawSurface,
+ egl::Surface *readSurface) const override;
+
+ SurfaceImpl *createWindowSurface(const egl::SurfaceState &state,
+ const egl::Config *configuration,
+ EGLNativeWindowType window,
+ const egl::AttributeMap &attribs) override;
+ SurfaceImpl *createPbufferSurface(const egl::SurfaceState &state,
+ const egl::Config *configuration,
+ const egl::AttributeMap &attribs) override;
+ SurfaceImpl *createPbufferFromClientBuffer(const egl::SurfaceState &state,
+ const egl::Config *configuration,
+ EGLClientBuffer shareHandle,
+ const egl::AttributeMap &attribs) override;
+ SurfaceImpl *createPixmapSurface(const egl::SurfaceState &state,
+ const egl::Config *configuration,
+ NativePixmapType nativePixmap,
+ const egl::AttributeMap &attribs) override;
+
+ ImageImpl *createImage(EGLenum target,
+ egl::ImageSibling *buffer,
+ const egl::AttributeMap &attribs) override;
+
+ ContextImpl *createContext(const gl::ContextState &state) override;
+
+ StreamProducerImpl *createStreamProducerD3DTextureNV12(
+ egl::Stream::ConsumerType consumerType,
+ const egl::AttributeMap &attribs) override;
+
+ private:
+ void generateExtensions(egl::DisplayExtensions *outExtensions) const override;
+ void generateCaps(egl::Caps *outCaps) const override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_DISPLAYVK_H_
diff --git a/src/libANGLE/renderer/vulkan/FenceNVVk.cpp b/src/libANGLE/renderer/vulkan/FenceNVVk.cpp
new file mode 100644
index 0000000..c46bd01
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/FenceNVVk.cpp
@@ -0,0 +1,43 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// FenceNVVk.cpp:
+// Implements the class methods for FenceNVVk.
+//
+
+#include "libANGLE/renderer/vulkan/FenceNVVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+FenceNVVk::FenceNVVk() : FenceNVImpl()
+{
+}
+
+FenceNVVk::~FenceNVVk()
+{
+}
+
+gl::Error FenceNVVk::set(GLenum condition)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FenceNVVk::test(GLboolean *outFinished)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FenceNVVk::finish()
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/FenceNVVk.h b/src/libANGLE/renderer/vulkan/FenceNVVk.h
new file mode 100644
index 0000000..be05471
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/FenceNVVk.h
@@ -0,0 +1,31 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// FenceNVVk.h:
+// Defines the class interface for FenceNVVk, implementing FenceNVImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_FENCENVVK_H_
+#define LIBANGLE_RENDERER_VULKAN_FENCENVVK_H_
+
+#include "libANGLE/renderer/FenceNVImpl.h"
+
+namespace rx
+{
+
+class FenceNVVk : public FenceNVImpl
+{
+ public:
+ FenceNVVk();
+ ~FenceNVVk() override;
+
+ gl::Error set(GLenum condition) override;
+ gl::Error test(GLboolean *outFinished) override;
+ gl::Error finish() override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_FENCENVVK_H_
diff --git a/src/libANGLE/renderer/vulkan/FenceSyncVk.cpp b/src/libANGLE/renderer/vulkan/FenceSyncVk.cpp
new file mode 100644
index 0000000..d27f130
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/FenceSyncVk.cpp
@@ -0,0 +1,49 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// FenceSyncVk.cpp:
+// Implements the class methods for FenceSyncVk.
+//
+
+#include "libANGLE/renderer/vulkan/FenceSyncVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+FenceSyncVk::FenceSyncVk() : FenceSyncImpl()
+{
+}
+
+FenceSyncVk::~FenceSyncVk()
+{
+}
+
+gl::Error FenceSyncVk::set(GLenum condition, GLbitfield flags)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FenceSyncVk::clientWait(GLbitfield flags, GLuint64 timeout, GLenum *outResult)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FenceSyncVk::serverWait(GLbitfield flags, GLuint64 timeout)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FenceSyncVk::getStatus(GLint *outResult)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/FenceSyncVk.h b/src/libANGLE/renderer/vulkan/FenceSyncVk.h
new file mode 100644
index 0000000..ab9a107
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/FenceSyncVk.h
@@ -0,0 +1,32 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// FenceSyncVk.h:
+// Defines the class interface for FenceSyncVk, implementing FenceSyncImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_FENCESYNCVK_H_
+#define LIBANGLE_RENDERER_VULKAN_FENCESYNCVK_H_
+
+#include "libANGLE/renderer/FenceSyncImpl.h"
+
+namespace rx
+{
+
+class FenceSyncVk : public FenceSyncImpl
+{
+ public:
+ FenceSyncVk();
+ ~FenceSyncVk() override;
+
+ gl::Error set(GLenum condition, GLbitfield flags) override;
+ gl::Error clientWait(GLbitfield flags, GLuint64 timeout, GLenum *outResult) override;
+ gl::Error serverWait(GLbitfield flags, GLuint64 timeout) override;
+ gl::Error getStatus(GLint *outResult) override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_FENCESYNCVK_H_
diff --git a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
new file mode 100644
index 0000000..e351dea
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
@@ -0,0 +1,131 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// FramebufferVk.cpp:
+// Implements the class methods for FramebufferVk.
+//
+
+#include "libANGLE/renderer/vulkan/FramebufferVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+FramebufferVk::FramebufferVk(const gl::FramebufferState &state) : FramebufferImpl(state)
+{
+}
+
+FramebufferVk::~FramebufferVk()
+{
+}
+
+gl::Error FramebufferVk::discard(size_t count, const GLenum *attachments)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FramebufferVk::invalidate(size_t count, const GLenum *attachments)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FramebufferVk::invalidateSub(size_t count,
+ const GLenum *attachments,
+ const gl::Rectangle &area)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FramebufferVk::clear(ContextImpl *context, GLbitfield mask)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FramebufferVk::clearBufferfv(ContextImpl *context,
+ GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat *values)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FramebufferVk::clearBufferuiv(ContextImpl *context,
+ GLenum buffer,
+ GLint drawbuffer,
+ const GLuint *values)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FramebufferVk::clearBufferiv(ContextImpl *context,
+ GLenum buffer,
+ GLint drawbuffer,
+ const GLint *values)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FramebufferVk::clearBufferfi(ContextImpl *context,
+ GLenum buffer,
+ GLint drawbuffer,
+ GLfloat depth,
+ GLint stencil)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+GLenum FramebufferVk::getImplementationColorReadFormat() const
+{
+ UNIMPLEMENTED();
+ return GLenum();
+}
+
+GLenum FramebufferVk::getImplementationColorReadType() const
+{
+ UNIMPLEMENTED();
+ return GLenum();
+}
+
+gl::Error FramebufferVk::readPixels(ContextImpl *context,
+ const gl::Rectangle &area,
+ GLenum format,
+ GLenum type,
+ GLvoid *pixels) const
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error FramebufferVk::blit(ContextImpl *context,
+ const gl::Rectangle &sourceArea,
+ const gl::Rectangle &destArea,
+ GLbitfield mask,
+ GLenum filter)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+bool FramebufferVk::checkStatus() const
+{
+ UNIMPLEMENTED();
+ return bool();
+}
+
+void FramebufferVk::syncState(const gl::Framebuffer::DirtyBits &dirtyBits)
+{
+ UNIMPLEMENTED();
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/FramebufferVk.h b/src/libANGLE/renderer/vulkan/FramebufferVk.h
new file mode 100644
index 0000000..9eb4abf
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/FramebufferVk.h
@@ -0,0 +1,70 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// FramebufferVk.h:
+// Defines the class interface for FramebufferVk, implementing FramebufferImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_FRAMEBUFFERVK_H_
+#define LIBANGLE_RENDERER_VULKAN_FRAMEBUFFERVK_H_
+
+#include "libANGLE/renderer/FramebufferImpl.h"
+
+namespace rx
+{
+
+class FramebufferVk : public FramebufferImpl
+{
+ public:
+ FramebufferVk(const gl::FramebufferState &state);
+ ~FramebufferVk() override;
+
+ gl::Error discard(size_t count, const GLenum *attachments) override;
+ gl::Error invalidate(size_t count, const GLenum *attachments) override;
+ gl::Error invalidateSub(size_t count,
+ const GLenum *attachments,
+ const gl::Rectangle &area) override;
+
+ gl::Error clear(ContextImpl *context, GLbitfield mask) override;
+ gl::Error clearBufferfv(ContextImpl *context,
+ GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat *values) override;
+ gl::Error clearBufferuiv(ContextImpl *context,
+ GLenum buffer,
+ GLint drawbuffer,
+ const GLuint *values) override;
+ gl::Error clearBufferiv(ContextImpl *context,
+ GLenum buffer,
+ GLint drawbuffer,
+ const GLint *values) override;
+ gl::Error clearBufferfi(ContextImpl *context,
+ GLenum buffer,
+ GLint drawbuffer,
+ GLfloat depth,
+ GLint stencil) override;
+
+ GLenum getImplementationColorReadFormat() const override;
+ GLenum getImplementationColorReadType() const override;
+ gl::Error readPixels(ContextImpl *context,
+ const gl::Rectangle &area,
+ GLenum format,
+ GLenum type,
+ GLvoid *pixels) const override;
+
+ gl::Error blit(ContextImpl *context,
+ const gl::Rectangle &sourceArea,
+ const gl::Rectangle &destArea,
+ GLbitfield mask,
+ GLenum filter) override;
+
+ bool checkStatus() const override;
+
+ void syncState(const gl::Framebuffer::DirtyBits &dirtyBits) override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_FRAMEBUFFERVK_H_
diff --git a/src/libANGLE/renderer/vulkan/ImageVk.cpp b/src/libANGLE/renderer/vulkan/ImageVk.cpp
new file mode 100644
index 0000000..0956a5e
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/ImageVk.cpp
@@ -0,0 +1,37 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// ImageVk.cpp:
+// Implements the class methods for ImageVk.
+//
+
+#include "libANGLE/renderer/vulkan/ImageVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+ImageVk::ImageVk() : ImageImpl()
+{
+}
+
+ImageVk::~ImageVk()
+{
+}
+
+egl::Error ImageVk::initialize()
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+gl::Error ImageVk::orphan(egl::ImageSibling *sibling)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/ImageVk.h b/src/libANGLE/renderer/vulkan/ImageVk.h
new file mode 100644
index 0000000..bc25e61
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/ImageVk.h
@@ -0,0 +1,30 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// ImageVk.h:
+// Defines the class interface for ImageVk, implementing ImageImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_IMAGEVK_H_
+#define LIBANGLE_RENDERER_VULKAN_IMAGEVK_H_
+
+#include "libANGLE/renderer/ImageImpl.h"
+
+namespace rx
+{
+
+class ImageVk : public ImageImpl
+{
+ public:
+ ImageVk();
+ ~ImageVk() override;
+ egl::Error initialize() override;
+
+ gl::Error orphan(egl::ImageSibling *sibling) override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_IMAGEVK_H_
diff --git a/src/libANGLE/renderer/vulkan/ProgramVk.cpp b/src/libANGLE/renderer/vulkan/ProgramVk.cpp
new file mode 100644
index 0000000..e2b3a70
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/ProgramVk.cpp
@@ -0,0 +1,204 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// ProgramVk.cpp:
+// Implements the class methods for ProgramVk.
+//
+
+#include "libANGLE/renderer/vulkan/ProgramVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+ProgramVk::ProgramVk(const gl::ProgramState &state) : ProgramImpl(state)
+{
+}
+
+ProgramVk::~ProgramVk()
+{
+}
+
+LinkResult ProgramVk::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream)
+{
+ UNIMPLEMENTED();
+ return LinkResult(false, gl::Error(GL_INVALID_OPERATION));
+}
+
+gl::Error ProgramVk::save(gl::BinaryOutputStream *stream)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+void ProgramVk::setBinaryRetrievableHint(bool retrievable)
+{
+ UNIMPLEMENTED();
+}
+
+LinkResult ProgramVk::link(const gl::ContextState &data, gl::InfoLog &infoLog)
+{
+ UNIMPLEMENTED();
+ return LinkResult(false, gl::Error(GL_INVALID_OPERATION));
+}
+
+GLboolean ProgramVk::validate(const gl::Caps &caps, gl::InfoLog *infoLog)
+{
+ UNIMPLEMENTED();
+ return GLboolean();
+}
+
+void ProgramVk::setUniform1fv(GLint location, GLsizei count, const GLfloat *v)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniform2fv(GLint location, GLsizei count, const GLfloat *v)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniform3fv(GLint location, GLsizei count, const GLfloat *v)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniform4fv(GLint location, GLsizei count, const GLfloat *v)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniform1iv(GLint location, GLsizei count, const GLint *v)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniform2iv(GLint location, GLsizei count, const GLint *v)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniform3iv(GLint location, GLsizei count, const GLint *v)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniform4iv(GLint location, GLsizei count, const GLint *v)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniform1uiv(GLint location, GLsizei count, const GLuint *v)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniform2uiv(GLint location, GLsizei count, const GLuint *v)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniform3uiv(GLint location, GLsizei count, const GLuint *v)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniform4uiv(GLint location, GLsizei count, const GLuint *v)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniformMatrix2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniformMatrix3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniformMatrix4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniformMatrix2x3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniformMatrix3x2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniformMatrix2x4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniformMatrix4x2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniformMatrix3x4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniformMatrix4x3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value)
+{
+ UNIMPLEMENTED();
+}
+
+void ProgramVk::setUniformBlockBinding(GLuint uniformBlockIndex, GLuint uniformBlockBinding)
+{
+ UNIMPLEMENTED();
+}
+
+bool ProgramVk::getUniformBlockSize(const std::string &blockName, size_t *sizeOut) const
+{
+ UNIMPLEMENTED();
+ return bool();
+}
+
+bool ProgramVk::getUniformBlockMemberInfo(const std::string &memberUniformName,
+ sh::BlockMemberInfo *memberInfoOut) const
+{
+ UNIMPLEMENTED();
+ return bool();
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/ProgramVk.h b/src/libANGLE/renderer/vulkan/ProgramVk.h
new file mode 100644
index 0000000..403a396
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/ProgramVk.h
@@ -0,0 +1,95 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// ProgramVk.h:
+// Defines the class interface for ProgramVk, implementing ProgramImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_PROGRAMVK_H_
+#define LIBANGLE_RENDERER_VULKAN_PROGRAMVK_H_
+
+#include "libANGLE/renderer/ProgramImpl.h"
+
+namespace rx
+{
+
+class ProgramVk : public ProgramImpl
+{
+ public:
+ ProgramVk(const gl::ProgramState &state);
+ ~ProgramVk() override;
+
+ LinkResult load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) override;
+ gl::Error save(gl::BinaryOutputStream *stream) override;
+ void setBinaryRetrievableHint(bool retrievable) override;
+
+ LinkResult link(const gl::ContextState &data, gl::InfoLog &infoLog) override;
+ GLboolean validate(const gl::Caps &caps, gl::InfoLog *infoLog) override;
+
+ void setUniform1fv(GLint location, GLsizei count, const GLfloat *v) override;
+ void setUniform2fv(GLint location, GLsizei count, const GLfloat *v) override;
+ void setUniform3fv(GLint location, GLsizei count, const GLfloat *v) override;
+ void setUniform4fv(GLint location, GLsizei count, const GLfloat *v) override;
+ void setUniform1iv(GLint location, GLsizei count, const GLint *v) override;
+ void setUniform2iv(GLint location, GLsizei count, const GLint *v) override;
+ void setUniform3iv(GLint location, GLsizei count, const GLint *v) override;
+ void setUniform4iv(GLint location, GLsizei count, const GLint *v) override;
+ void setUniform1uiv(GLint location, GLsizei count, const GLuint *v) override;
+ void setUniform2uiv(GLint location, GLsizei count, const GLuint *v) override;
+ void setUniform3uiv(GLint location, GLsizei count, const GLuint *v) override;
+ void setUniform4uiv(GLint location, GLsizei count, const GLuint *v) override;
+ void setUniformMatrix2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value) override;
+ void setUniformMatrix3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value) override;
+ void setUniformMatrix4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value) override;
+ void setUniformMatrix2x3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value) override;
+ void setUniformMatrix3x2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value) override;
+ void setUniformMatrix2x4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value) override;
+ void setUniformMatrix4x2fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value) override;
+ void setUniformMatrix3x4fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value) override;
+ void setUniformMatrix4x3fv(GLint location,
+ GLsizei count,
+ GLboolean transpose,
+ const GLfloat *value) override;
+
+ // TODO: synchronize in syncState when dirty bits exist.
+ void setUniformBlockBinding(GLuint uniformBlockIndex, GLuint uniformBlockBinding) override;
+
+ // May only be called after a successful link operation.
+ // Return false for inactive blocks.
+ bool getUniformBlockSize(const std::string &blockName, size_t *sizeOut) const override;
+
+ // May only be called after a successful link operation.
+ // Returns false for inactive members.
+ bool getUniformBlockMemberInfo(const std::string &memberUniformName,
+ sh::BlockMemberInfo *memberInfoOut) const override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_PROGRAMVK_H_
diff --git a/src/libANGLE/renderer/vulkan/QueryVk.cpp b/src/libANGLE/renderer/vulkan/QueryVk.cpp
new file mode 100644
index 0000000..01fd0c4
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/QueryVk.cpp
@@ -0,0 +1,73 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// QueryVk.cpp:
+// Implements the class methods for QueryVk.
+//
+
+#include "libANGLE/renderer/vulkan/QueryVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+QueryVk::QueryVk(GLenum type) : QueryImpl(type)
+{
+}
+
+QueryVk::~QueryVk()
+{
+}
+
+gl::Error QueryVk::begin()
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error QueryVk::end()
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error QueryVk::queryCounter()
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error QueryVk::getResult(GLint *params)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error QueryVk::getResult(GLuint *params)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error QueryVk::getResult(GLint64 *params)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error QueryVk::getResult(GLuint64 *params)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error QueryVk::isResultAvailable(bool *available)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/QueryVk.h b/src/libANGLE/renderer/vulkan/QueryVk.h
new file mode 100644
index 0000000..7c92734
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/QueryVk.h
@@ -0,0 +1,36 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// QueryVk.h:
+// Defines the class interface for QueryVk, implementing QueryImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_QUERYVK_H_
+#define LIBANGLE_RENDERER_VULKAN_QUERYVK_H_
+
+#include "libANGLE/renderer/QueryImpl.h"
+
+namespace rx
+{
+
+class QueryVk : public QueryImpl
+{
+ public:
+ QueryVk(GLenum type);
+ ~QueryVk() override;
+
+ gl::Error begin() override;
+ gl::Error end() override;
+ gl::Error queryCounter() override;
+ gl::Error getResult(GLint *params) override;
+ gl::Error getResult(GLuint *params) override;
+ gl::Error getResult(GLint64 *params) override;
+ gl::Error getResult(GLuint64 *params) override;
+ gl::Error isResultAvailable(bool *available) override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_QUERYVK_H_
diff --git a/src/libANGLE/renderer/vulkan/RenderbufferVk.cpp b/src/libANGLE/renderer/vulkan/RenderbufferVk.cpp
new file mode 100644
index 0000000..18f3947
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/RenderbufferVk.cpp
@@ -0,0 +1,53 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// RenderbufferVk.cpp:
+// Implements the class methods for RenderbufferVk.
+//
+
+#include "libANGLE/renderer/vulkan/RenderbufferVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+RenderbufferVk::RenderbufferVk() : RenderbufferImpl()
+{
+}
+
+RenderbufferVk::~RenderbufferVk()
+{
+}
+
+gl::Error RenderbufferVk::setStorage(GLenum internalformat, size_t width, size_t height)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error RenderbufferVk::setStorageMultisample(size_t samples,
+ GLenum internalformat,
+ size_t width,
+ size_t height)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error RenderbufferVk::setStorageEGLImageTarget(egl::Image *image)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error RenderbufferVk::getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target,
+ FramebufferAttachmentRenderTarget **rtOut)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/RenderbufferVk.h b/src/libANGLE/renderer/vulkan/RenderbufferVk.h
new file mode 100644
index 0000000..54c5f86
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/RenderbufferVk.h
@@ -0,0 +1,37 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// RenderbufferVk.h:
+// Defines the class interface for RenderbufferVk, implementing RenderbufferImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_RENDERBUFFERVK_H_
+#define LIBANGLE_RENDERER_VULKAN_RENDERBUFFERVK_H_
+
+#include "libANGLE/renderer/RenderbufferImpl.h"
+
+namespace rx
+{
+
+class RenderbufferVk : public RenderbufferImpl
+{
+ public:
+ RenderbufferVk();
+ ~RenderbufferVk() override;
+
+ gl::Error setStorage(GLenum internalformat, size_t width, size_t height) override;
+ gl::Error setStorageMultisample(size_t samples,
+ GLenum internalformat,
+ size_t width,
+ size_t height) override;
+ gl::Error setStorageEGLImageTarget(egl::Image *image) override;
+
+ gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target,
+ FramebufferAttachmentRenderTarget **rtOut) override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_RENDERBUFFERVK_H_
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.cpp b/src/libANGLE/renderer/vulkan/RendererVk.cpp
new file mode 100644
index 0000000..9dd4a2f
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/RendererVk.cpp
@@ -0,0 +1,25 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// RendererVk.cpp:
+// Implements the class methods for RendererVk.
+//
+
+#include "libANGLE/renderer/vulkan/RendererVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+RendererVk::RendererVk()
+{
+}
+
+RendererVk::~RendererVk()
+{
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/RendererVk.h b/src/libANGLE/renderer/vulkan/RendererVk.h
new file mode 100644
index 0000000..c59642e
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/RendererVk.h
@@ -0,0 +1,27 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// RendererVk.h:
+// Defines the class interface for RendererVk.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_RENDERERVK_H_
+#define LIBANGLE_RENDERER_VULKAN_RENDERERVK_H_
+
+#include "common/angleutils.h"
+
+namespace rx
+{
+
+class RendererVk : angle::NonCopyable
+{
+ public:
+ RendererVk();
+ ~RendererVk();
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_RENDERERVK_H_
diff --git a/src/libANGLE/renderer/vulkan/SamplerVk.cpp b/src/libANGLE/renderer/vulkan/SamplerVk.cpp
new file mode 100644
index 0000000..00bb81b
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/SamplerVk.cpp
@@ -0,0 +1,25 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// SamplerVk.cpp:
+// Implements the class methods for SamplerVk.
+//
+
+#include "libANGLE/renderer/vulkan/SamplerVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+SamplerVk::SamplerVk() : SamplerImpl()
+{
+}
+
+SamplerVk::~SamplerVk()
+{
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/SamplerVk.h b/src/libANGLE/renderer/vulkan/SamplerVk.h
new file mode 100644
index 0000000..1111f40
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/SamplerVk.h
@@ -0,0 +1,27 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// SamplerVk.h:
+// Defines the class interface for SamplerVk, implementing SamplerImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_SAMPLERVK_H_
+#define LIBANGLE_RENDERER_VULKAN_SAMPLERVK_H_
+
+#include "libANGLE/renderer/SamplerImpl.h"
+
+namespace rx
+{
+
+class SamplerVk : public SamplerImpl
+{
+ public:
+ SamplerVk();
+ ~SamplerVk() override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_SAMPLERVK_H_
diff --git a/src/libANGLE/renderer/vulkan/ShaderVk.cpp b/src/libANGLE/renderer/vulkan/ShaderVk.cpp
new file mode 100644
index 0000000..06355c3
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/ShaderVk.cpp
@@ -0,0 +1,44 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// ShaderVk.cpp:
+// Implements the class methods for ShaderVk.
+//
+
+#include "libANGLE/renderer/vulkan/ShaderVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+ShaderVk::ShaderVk(const gl::ShaderState &data) : ShaderImpl(data)
+{
+}
+
+ShaderVk::~ShaderVk()
+{
+}
+
+int ShaderVk::prepareSourceAndReturnOptions(std::stringstream *sourceStream,
+ std::string *sourcePath)
+{
+ UNIMPLEMENTED();
+ return int();
+}
+
+bool ShaderVk::postTranslateCompile(gl::Compiler *compiler, std::string *infoLog)
+{
+ UNIMPLEMENTED();
+ return bool();
+}
+
+std::string ShaderVk::getDebugInfo() const
+{
+ UNIMPLEMENTED();
+ return std::string();
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/ShaderVk.h b/src/libANGLE/renderer/vulkan/ShaderVk.h
new file mode 100644
index 0000000..f847070
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/ShaderVk.h
@@ -0,0 +1,35 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// ShaderVk.h:
+// Defines the class interface for ShaderVk, implementing ShaderImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_SHADERVK_H_
+#define LIBANGLE_RENDERER_VULKAN_SHADERVK_H_
+
+#include "libANGLE/renderer/ShaderImpl.h"
+
+namespace rx
+{
+
+class ShaderVk : public ShaderImpl
+{
+ public:
+ ShaderVk(const gl::ShaderState &data);
+ ~ShaderVk() override;
+
+ // Returns additional ShCompile options.
+ int prepareSourceAndReturnOptions(std::stringstream *sourceStream,
+ std::string *sourcePath) override;
+ // Returns success for compiling on the driver. Returns success.
+ bool postTranslateCompile(gl::Compiler *compiler, std::string *infoLog) override;
+
+ std::string getDebugInfo() const override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_SHADERVK_H_
diff --git a/src/libANGLE/renderer/vulkan/SurfaceVk.cpp b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
new file mode 100644
index 0000000..06732c2
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/SurfaceVk.cpp
@@ -0,0 +1,103 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// SurfaceVk.cpp:
+// Implements the class methods for SurfaceVk.
+//
+
+#include "libANGLE/renderer/vulkan/SurfaceVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+SurfaceVk::SurfaceVk(const egl::SurfaceState &surfaceState) : SurfaceImpl(surfaceState)
+{
+}
+
+SurfaceVk::~SurfaceVk()
+{
+}
+
+egl::Error SurfaceVk::initialize()
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+FramebufferImpl *SurfaceVk::createDefaultFramebuffer(const gl::FramebufferState &state)
+{
+ UNIMPLEMENTED();
+ return static_cast<FramebufferImpl *>(0);
+}
+
+egl::Error SurfaceVk::swap()
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+egl::Error SurfaceVk::postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height)
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+egl::Error SurfaceVk::querySurfacePointerANGLE(EGLint attribute, void **value)
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+egl::Error SurfaceVk::bindTexImage(gl::Texture *texture, EGLint buffer)
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+egl::Error SurfaceVk::releaseTexImage(EGLint buffer)
+{
+ UNIMPLEMENTED();
+ return egl::Error(EGL_BAD_ACCESS);
+}
+
+void SurfaceVk::setSwapInterval(EGLint interval)
+{
+ UNIMPLEMENTED();
+}
+
+EGLint SurfaceVk::getWidth() const
+{
+ UNIMPLEMENTED();
+ return EGLint();
+}
+
+EGLint SurfaceVk::getHeight() const
+{
+ UNIMPLEMENTED();
+ return EGLint();
+}
+
+EGLint SurfaceVk::isPostSubBufferSupported() const
+{
+ UNIMPLEMENTED();
+ return EGLint();
+}
+
+EGLint SurfaceVk::getSwapBehavior() const
+{
+ UNIMPLEMENTED();
+ return EGLint();
+}
+
+gl::Error SurfaceVk::getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target,
+ FramebufferAttachmentRenderTarget **rtOut)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/SurfaceVk.h b/src/libANGLE/renderer/vulkan/SurfaceVk.h
new file mode 100644
index 0000000..f7d54e4
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/SurfaceVk.h
@@ -0,0 +1,46 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// SurfaceVk.h:
+// Defines the class interface for SurfaceVk, implementing SurfaceImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_SURFACEVK_H_
+#define LIBANGLE_RENDERER_VULKAN_SURFACEVK_H_
+
+#include "libANGLE/renderer/SurfaceImpl.h"
+
+namespace rx
+{
+
+class SurfaceVk : public SurfaceImpl
+{
+ public:
+ SurfaceVk(const egl::SurfaceState &surfaceState);
+ ~SurfaceVk() override;
+
+ egl::Error initialize() override;
+ FramebufferImpl *createDefaultFramebuffer(const gl::FramebufferState &state) override;
+ egl::Error swap() override;
+ egl::Error postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height) override;
+ egl::Error querySurfacePointerANGLE(EGLint attribute, void **value) override;
+ egl::Error bindTexImage(gl::Texture *texture, EGLint buffer) override;
+ egl::Error releaseTexImage(EGLint buffer) override;
+ void setSwapInterval(EGLint interval) override;
+
+ // width and height can change with client window resizing
+ EGLint getWidth() const override;
+ EGLint getHeight() const override;
+
+ EGLint isPostSubBufferSupported() const override;
+ EGLint getSwapBehavior() const override;
+
+ gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target,
+ FramebufferAttachmentRenderTarget **rtOut) override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_SURFACEVK_H_
diff --git a/src/libANGLE/renderer/vulkan/TextureVk.cpp b/src/libANGLE/renderer/vulkan/TextureVk.cpp
new file mode 100644
index 0000000..440f987
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/TextureVk.cpp
@@ -0,0 +1,145 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// TextureVk.cpp:
+// Implements the class methods for TextureVk.
+//
+
+#include "libANGLE/renderer/vulkan/TextureVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+TextureVk::TextureVk(const gl::TextureState &state) : TextureImpl(state)
+{
+}
+
+TextureVk::~TextureVk()
+{
+}
+
+gl::Error TextureVk::setImage(GLenum target,
+ size_t level,
+ GLenum internalFormat,
+ const gl::Extents &size,
+ GLenum format,
+ GLenum type,
+ const gl::PixelUnpackState &unpack,
+ const uint8_t *pixels)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error TextureVk::setSubImage(GLenum target,
+ size_t level,
+ const gl::Box &area,
+ GLenum format,
+ GLenum type,
+ const gl::PixelUnpackState &unpack,
+ const uint8_t *pixels)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error TextureVk::setCompressedImage(GLenum target,
+ size_t level,
+ GLenum internalFormat,
+ const gl::Extents &size,
+ const gl::PixelUnpackState &unpack,
+ size_t imageSize,
+ const uint8_t *pixels)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error TextureVk::setCompressedSubImage(GLenum target,
+ size_t level,
+ const gl::Box &area,
+ GLenum format,
+ const gl::PixelUnpackState &unpack,
+ size_t imageSize,
+ const uint8_t *pixels)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error TextureVk::copyImage(GLenum target,
+ size_t level,
+ const gl::Rectangle &sourceArea,
+ GLenum internalFormat,
+ const gl::Framebuffer *source)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error TextureVk::copySubImage(GLenum target,
+ size_t level,
+ const gl::Offset &destOffset,
+ const gl::Rectangle &sourceArea,
+ const gl::Framebuffer *source)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error TextureVk::setStorage(GLenum target,
+ size_t levels,
+ GLenum internalFormat,
+ const gl::Extents &size)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error TextureVk::setEGLImageTarget(GLenum target, egl::Image *image)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error TextureVk::setImageExternal(GLenum target,
+ egl::Stream *stream,
+ const egl::Stream::GLTextureDescription &desc)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+gl::Error TextureVk::generateMipmap()
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+void TextureVk::setBaseLevel(GLuint baseLevel)
+{
+ UNIMPLEMENTED();
+}
+
+void TextureVk::bindTexImage(egl::Surface *surface)
+{
+ UNIMPLEMENTED();
+}
+
+void TextureVk::releaseTexImage()
+{
+ UNIMPLEMENTED();
+}
+
+gl::Error TextureVk::getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target,
+ FramebufferAttachmentRenderTarget **rtOut)
+{
+ UNIMPLEMENTED();
+ return gl::Error(GL_INVALID_OPERATION);
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/TextureVk.h b/src/libANGLE/renderer/vulkan/TextureVk.h
new file mode 100644
index 0000000..de45b93
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/TextureVk.h
@@ -0,0 +1,90 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// TextureVk.h:
+// Defines the class interface for TextureVk, implementing TextureImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_TEXTUREVK_H_
+#define LIBANGLE_RENDERER_VULKAN_TEXTUREVK_H_
+
+#include "libANGLE/renderer/TextureImpl.h"
+
+namespace rx
+{
+
+class TextureVk : public TextureImpl
+{
+ public:
+ TextureVk(const gl::TextureState &state);
+ ~TextureVk() override;
+
+ gl::Error setImage(GLenum target,
+ size_t level,
+ GLenum internalFormat,
+ const gl::Extents &size,
+ GLenum format,
+ GLenum type,
+ const gl::PixelUnpackState &unpack,
+ const uint8_t *pixels) override;
+ gl::Error setSubImage(GLenum target,
+ size_t level,
+ const gl::Box &area,
+ GLenum format,
+ GLenum type,
+ const gl::PixelUnpackState &unpack,
+ const uint8_t *pixels) override;
+
+ gl::Error setCompressedImage(GLenum target,
+ size_t level,
+ GLenum internalFormat,
+ const gl::Extents &size,
+ const gl::PixelUnpackState &unpack,
+ size_t imageSize,
+ const uint8_t *pixels) override;
+ gl::Error setCompressedSubImage(GLenum target,
+ size_t level,
+ const gl::Box &area,
+ GLenum format,
+ const gl::PixelUnpackState &unpack,
+ size_t imageSize,
+ const uint8_t *pixels) override;
+
+ gl::Error copyImage(GLenum target,
+ size_t level,
+ const gl::Rectangle &sourceArea,
+ GLenum internalFormat,
+ const gl::Framebuffer *source) override;
+ gl::Error copySubImage(GLenum target,
+ size_t level,
+ const gl::Offset &destOffset,
+ const gl::Rectangle &sourceArea,
+ const gl::Framebuffer *source) override;
+
+ gl::Error setStorage(GLenum target,
+ size_t levels,
+ GLenum internalFormat,
+ const gl::Extents &size) override;
+
+ gl::Error setEGLImageTarget(GLenum target, egl::Image *image) override;
+
+ gl::Error setImageExternal(GLenum target,
+ egl::Stream *stream,
+ const egl::Stream::GLTextureDescription &desc) override;
+
+ gl::Error generateMipmap() override;
+
+ void setBaseLevel(GLuint baseLevel) override;
+
+ void bindTexImage(egl::Surface *surface) override;
+ void releaseTexImage() override;
+
+ gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target,
+ FramebufferAttachmentRenderTarget **rtOut) override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_TEXTUREVK_H_
diff --git a/src/libANGLE/renderer/vulkan/TransformFeedbackVk.cpp b/src/libANGLE/renderer/vulkan/TransformFeedbackVk.cpp
new file mode 100644
index 0000000..782f11f
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/TransformFeedbackVk.cpp
@@ -0,0 +1,56 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// TransformFeedbackVk.cpp:
+// Implements the class methods for TransformFeedbackVk.
+//
+
+#include "libANGLE/renderer/vulkan/TransformFeedbackVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+TransformFeedbackVk::TransformFeedbackVk() : TransformFeedbackImpl()
+{
+}
+
+TransformFeedbackVk::~TransformFeedbackVk()
+{
+}
+
+void TransformFeedbackVk::begin(GLenum primitiveMode)
+{
+ UNIMPLEMENTED();
+}
+
+void TransformFeedbackVk::end()
+{
+ UNIMPLEMENTED();
+}
+
+void TransformFeedbackVk::pause()
+{
+ UNIMPLEMENTED();
+}
+
+void TransformFeedbackVk::resume()
+{
+ UNIMPLEMENTED();
+}
+
+void TransformFeedbackVk::bindGenericBuffer(const BindingPointer<gl::Buffer> &binding)
+{
+ UNIMPLEMENTED();
+}
+
+void TransformFeedbackVk::bindIndexedBuffer(size_t index,
+ const OffsetBindingPointer<gl::Buffer> &binding)
+{
+ UNIMPLEMENTED();
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/TransformFeedbackVk.h b/src/libANGLE/renderer/vulkan/TransformFeedbackVk.h
new file mode 100644
index 0000000..6702f6b
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/TransformFeedbackVk.h
@@ -0,0 +1,35 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// TransformFeedbackVk.h:
+// Defines the class interface for TransformFeedbackVk, implementing TransformFeedbackImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_TRANSFORMFEEDBACKVK_H_
+#define LIBANGLE_RENDERER_VULKAN_TRANSFORMFEEDBACKVK_H_
+
+#include "libANGLE/renderer/TransformFeedbackImpl.h"
+
+namespace rx
+{
+
+class TransformFeedbackVk : public TransformFeedbackImpl
+{
+ public:
+ TransformFeedbackVk();
+ ~TransformFeedbackVk() override;
+
+ void begin(GLenum primitiveMode) override;
+ void end() override;
+ void pause() override;
+ void resume() override;
+
+ void bindGenericBuffer(const BindingPointer<gl::Buffer> &binding) override;
+ void bindIndexedBuffer(size_t index, const OffsetBindingPointer<gl::Buffer> &binding) override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_TRANSFORMFEEDBACKVK_H_
diff --git a/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp b/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
new file mode 100644
index 0000000..9f639b9
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
@@ -0,0 +1,25 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// VertexArrayVk.cpp:
+// Implements the class methods for VertexArrayVk.
+//
+
+#include "libANGLE/renderer/vulkan/VertexArrayVk.h"
+
+#include "common/debug.h"
+
+namespace rx
+{
+
+VertexArrayVk::VertexArrayVk(const gl::VertexArrayState &data) : VertexArrayImpl(data)
+{
+}
+
+VertexArrayVk::~VertexArrayVk()
+{
+}
+
+} // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/VertexArrayVk.h b/src/libANGLE/renderer/vulkan/VertexArrayVk.h
new file mode 100644
index 0000000..9340d27
--- /dev/null
+++ b/src/libANGLE/renderer/vulkan/VertexArrayVk.h
@@ -0,0 +1,27 @@
+//
+// Copyright 2016 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// VertexArrayVk.h:
+// Defines the class interface for VertexArrayVk, implementing VertexArrayImpl.
+//
+
+#ifndef LIBANGLE_RENDERER_VULKAN_VERTEXARRAYVK_H_
+#define LIBANGLE_RENDERER_VULKAN_VERTEXARRAYVK_H_
+
+#include "libANGLE/renderer/VertexArrayImpl.h"
+
+namespace rx
+{
+
+class VertexArrayVk : public VertexArrayImpl
+{
+ public:
+ VertexArrayVk(const gl::VertexArrayState &data);
+ ~VertexArrayVk() override;
+};
+
+} // namespace rx
+
+#endif // LIBANGLE_RENDERER_VULKAN_VERTEXARRAYVK_H_