diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /gfx/angle/src/libANGLE/renderer/null | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/angle/src/libANGLE/renderer/null')
38 files changed, 2442 insertions, 0 deletions
diff --git a/gfx/angle/src/libANGLE/renderer/null/BufferNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/BufferNULL.cpp new file mode 100644 index 000000000..95463c3f4 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/BufferNULL.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. +// +// BufferNULL.cpp: +// Implements the class methods for BufferNULL. +// + +#include "libANGLE/renderer/null/BufferNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +BufferNULL::BufferNULL(const gl::BufferState &state) : BufferImpl(state) +{ +} + +BufferNULL::~BufferNULL() +{ +} + +gl::Error BufferNULL::setData(GLenum target, const void *data, size_t size, GLenum usage) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error BufferNULL::setSubData(GLenum target, const void *data, size_t size, size_t offset) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error BufferNULL::copySubData(BufferImpl *source, + GLintptr sourceOffset, + GLintptr destOffset, + GLsizeiptr size) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error BufferNULL::map(GLenum access, GLvoid **mapPtr) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error BufferNULL::mapRange(size_t offset, size_t length, GLbitfield access, GLvoid **mapPtr) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error BufferNULL::unmap(GLboolean *result) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error BufferNULL::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/gfx/angle/src/libANGLE/renderer/null/BufferNULL.h b/gfx/angle/src/libANGLE/renderer/null/BufferNULL.h new file mode 100644 index 000000000..1578dacbb --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/BufferNULL.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. +// +// BufferNULL.h: +// Defines the class interface for BufferNULL, implementing BufferImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_BUFFERNULL_H_ +#define LIBANGLE_RENDERER_NULL_BUFFERNULL_H_ + +#include "libANGLE/renderer/BufferImpl.h" + +namespace rx +{ + +class BufferNULL : public BufferImpl +{ + public: + BufferNULL(const gl::BufferState &state); + ~BufferNULL() override; + + gl::Error setData(GLenum target, const void *data, size_t size, GLenum usage) override; + gl::Error setSubData(GLenum target, 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_NULL_BUFFERNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/CompilerNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/CompilerNULL.cpp new file mode 100644 index 000000000..547f4c4e1 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/CompilerNULL.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. +// +// CompilerNULL.cpp: +// Implements the class methods for CompilerNULL. +// + +#include "libANGLE/renderer/null/CompilerNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +CompilerNULL::CompilerNULL() : CompilerImpl() +{ +} + +CompilerNULL::~CompilerNULL() +{ +} + +gl::Error CompilerNULL::release() +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +ShShaderOutput CompilerNULL::getTranslatorOutputType() const +{ + UNIMPLEMENTED(); + return ShShaderOutput(); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/CompilerNULL.h b/gfx/angle/src/libANGLE/renderer/null/CompilerNULL.h new file mode 100644 index 000000000..5cd85e8bf --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/CompilerNULL.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. +// +// CompilerNULL.h: +// Defines the class interface for CompilerNULL, implementing CompilerImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_COMPILERNULL_H_ +#define LIBANGLE_RENDERER_NULL_COMPILERNULL_H_ + +#include "libANGLE/renderer/CompilerImpl.h" + +namespace rx +{ + +class CompilerNULL : public CompilerImpl +{ + public: + CompilerNULL(); + ~CompilerNULL() override; + + gl::Error release() override; + + // TODO(jmadill): Expose translator built-in resources init method. + ShShaderOutput getTranslatorOutputType() const override; +}; + +} // namespace rx + +#endif // LIBANGLE_RENDERER_NULL_COMPILERNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/ContextNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/ContextNULL.cpp new file mode 100644 index 000000000..95d4c046a --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/ContextNULL.cpp @@ -0,0 +1,175 @@ +// +// 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. +// +// ContextNULL.cpp: +// Implements the class methods for ContextNULL. +// + +#include "libANGLE/renderer/null/ContextNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +ContextNULL::ContextNULL(const gl::ContextState &state) : ContextImpl(state) +{ +} + +ContextNULL::~ContextNULL() +{ +} + +gl::Error ContextNULL::initialize() +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error ContextNULL::flush() +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error ContextNULL::finish() +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error ContextNULL::drawArrays(GLenum mode, GLint first, GLsizei count) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error ContextNULL::drawArraysInstanced(GLenum mode, + GLint first, + GLsizei count, + GLsizei instanceCount) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error ContextNULL::drawElements(GLenum mode, + GLsizei count, + GLenum type, + const GLvoid *indices, + const gl::IndexRange &indexRange) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error ContextNULL::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 ContextNULL::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); +} + +CompilerImpl *ContextNULL::createCompiler() +{ + UNIMPLEMENTED(); + return static_cast<CompilerImpl *>(0); +} + +ShaderImpl *ContextNULL::createShader(const gl::ShaderState &data) +{ + UNIMPLEMENTED(); + return static_cast<ShaderImpl *>(0); +} + +ProgramImpl *ContextNULL::createProgram(const gl::ProgramState &data) +{ + UNIMPLEMENTED(); + return static_cast<ProgramImpl *>(0); +} + +FramebufferImpl *ContextNULL::createFramebuffer(const gl::FramebufferState &data) +{ + UNIMPLEMENTED(); + return static_cast<FramebufferImpl *>(0); +} + +TextureImpl *ContextNULL::createTexture(const gl::TextureState &state) +{ + UNIMPLEMENTED(); + return static_cast<TextureImpl *>(0); +} + +RenderbufferImpl *ContextNULL::createRenderbuffer() +{ + UNIMPLEMENTED(); + return static_cast<RenderbufferImpl *>(0); +} + +BufferImpl *ContextNULL::createBuffer(const gl::BufferState &state) +{ + UNIMPLEMENTED(); + return static_cast<BufferImpl *>(0); +} + +VertexArrayImpl *ContextNULL::createVertexArray(const gl::VertexArrayState &data) +{ + UNIMPLEMENTED(); + return static_cast<VertexArrayImpl *>(0); +} + +QueryImpl *ContextNULL::createQuery(GLenum type) +{ + UNIMPLEMENTED(); + return static_cast<QueryImpl *>(0); +} + +FenceNVImpl *ContextNULL::createFenceNV() +{ + UNIMPLEMENTED(); + return static_cast<FenceNVImpl *>(0); +} + +FenceSyncImpl *ContextNULL::createFenceSync() +{ + UNIMPLEMENTED(); + return static_cast<FenceSyncImpl *>(0); +} + +TransformFeedbackImpl *ContextNULL::createTransformFeedback(const gl::TransformFeedbackState &state) +{ + UNIMPLEMENTED(); + return static_cast<TransformFeedbackImpl *>(0); +} + +SamplerImpl *ContextNULL::createSampler() +{ + UNIMPLEMENTED(); + return static_cast<SamplerImpl *>(0); +} + +std::vector<PathImpl *> ContextNULL::createPaths(GLsizei range) +{ + UNIMPLEMENTED(); + return std::vector<PathImpl *>(); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/ContextNULL.h b/gfx/angle/src/libANGLE/renderer/null/ContextNULL.h new file mode 100644 index 000000000..9a7987b67 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/ContextNULL.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. +// +// ContextNULL.h: +// Defines the class interface for ContextNULL, implementing ContextImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_CONTEXTNULL_H_ +#define LIBANGLE_RENDERER_NULL_CONTEXTNULL_H_ + +#include "libANGLE/renderer/ContextImpl.h" + +namespace rx +{ + +class ContextNULL : public ContextImpl +{ + public: + ContextNULL(const gl::ContextState &state); + ~ContextNULL() 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; + + // CHROMIUM_path_rendering path drawing methods. + + // 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(const gl::BufferState &state) 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( + const gl::TransformFeedbackState &state) override; + + // Sampler object creation + SamplerImpl *createSampler() override; + + std::vector<PathImpl *> createPaths(GLsizei range) override; +}; + +} // namespace rx + +#endif // LIBANGLE_RENDERER_NULL_CONTEXTNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/DeviceNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/DeviceNULL.cpp new file mode 100644 index 000000000..4893f9466 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/DeviceNULL.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. +// +// DeviceNULL.cpp: +// Implements the class methods for DeviceNULL. +// + +#include "libANGLE/renderer/null/DeviceNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +DeviceNULL::DeviceNULL() : DeviceImpl() +{ +} + +DeviceNULL::~DeviceNULL() +{ +} + +egl::Error DeviceNULL::getDevice(void **outValue) +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +EGLint DeviceNULL::getType() +{ + UNIMPLEMENTED(); + return EGLint(); +} + +void DeviceNULL::generateExtensions(egl::DeviceExtensions *outExtensions) const +{ + UNIMPLEMENTED(); +} + +bool DeviceNULL::deviceExternallySourced() +{ + UNIMPLEMENTED(); + return bool(); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/DeviceNULL.h b/gfx/angle/src/libANGLE/renderer/null/DeviceNULL.h new file mode 100644 index 000000000..ed921039e --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/DeviceNULL.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. +// +// DeviceNULL.h: +// Defines the class interface for DeviceNULL, implementing DeviceImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_DEVICENULL_H_ +#define LIBANGLE_RENDERER_NULL_DEVICENULL_H_ + +#include "libANGLE/renderer/DeviceImpl.h" + +namespace rx +{ + +class DeviceNULL : public DeviceImpl +{ + public: + DeviceNULL(); + ~DeviceNULL() 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_NULL_DEVICENULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/DisplayNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/DisplayNULL.cpp new file mode 100644 index 000000000..fc04e0465 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/DisplayNULL.cpp @@ -0,0 +1,168 @@ +// +// 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. +// +// DisplayNULL.cpp: +// Implements the class methods for DisplayNULL. +// + +#include "libANGLE/renderer/null/DisplayNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +DisplayNULL::DisplayNULL() : DisplayImpl() +{ +} + +DisplayNULL::~DisplayNULL() +{ +} + +egl::Error DisplayNULL::initialize(egl::Display *display) +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +void DisplayNULL::terminate() +{ + UNIMPLEMENTED(); +} + +egl::Error DisplayNULL::makeCurrent(egl::Surface *drawSurface, + egl::Surface *readSurface, + gl::Context *context) +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +egl::ConfigSet DisplayNULL::generateConfigs() +{ + UNIMPLEMENTED(); + return egl::ConfigSet(); +} + +bool DisplayNULL::testDeviceLost() +{ + UNIMPLEMENTED(); + return bool(); +} + +egl::Error DisplayNULL::restoreLostDevice() +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +bool DisplayNULL::isValidNativeWindow(EGLNativeWindowType window) const +{ + UNIMPLEMENTED(); + return bool(); +} + +std::string DisplayNULL::getVendorString() const +{ + UNIMPLEMENTED(); + return std::string(); +} + +egl::Error DisplayNULL::getDevice(DeviceImpl **device) +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +egl::Error DisplayNULL::waitClient() const +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +egl::Error DisplayNULL::waitNative(EGLint engine, + egl::Surface *drawSurface, + egl::Surface *readSurface) const +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +gl::Version DisplayNULL::getMaxSupportedESVersion() const +{ + UNIMPLEMENTED(); + return gl::Version(); +} + +SurfaceImpl *DisplayNULL::createWindowSurface(const egl::SurfaceState &state, + const egl::Config *configuration, + EGLNativeWindowType window, + const egl::AttributeMap &attribs) +{ + UNIMPLEMENTED(); + return static_cast<SurfaceImpl *>(0); +} + +SurfaceImpl *DisplayNULL::createPbufferSurface(const egl::SurfaceState &state, + const egl::Config *configuration, + const egl::AttributeMap &attribs) +{ + UNIMPLEMENTED(); + return static_cast<SurfaceImpl *>(0); +} + +SurfaceImpl *DisplayNULL::createPbufferFromClientBuffer(const egl::SurfaceState &state, + const egl::Config *configuration, + EGLenum buftype, + EGLClientBuffer buffer, + const egl::AttributeMap &attribs) +{ + UNIMPLEMENTED(); + return static_cast<SurfaceImpl *>(0); +} + +SurfaceImpl *DisplayNULL::createPixmapSurface(const egl::SurfaceState &state, + const egl::Config *configuration, + NativePixmapType nativePixmap, + const egl::AttributeMap &attribs) +{ + UNIMPLEMENTED(); + return static_cast<SurfaceImpl *>(0); +} + +ImageImpl *DisplayNULL::createImage(EGLenum target, + egl::ImageSibling *buffer, + const egl::AttributeMap &attribs) +{ + UNIMPLEMENTED(); + return static_cast<ImageImpl *>(0); +} + +ContextImpl *DisplayNULL::createContext(const gl::ContextState &state) +{ + UNIMPLEMENTED(); + return static_cast<ContextImpl *>(0); +} + +StreamProducerImpl *DisplayNULL::createStreamProducerD3DTextureNV12( + egl::Stream::ConsumerType consumerType, + const egl::AttributeMap &attribs) +{ + UNIMPLEMENTED(); + return static_cast<StreamProducerImpl *>(0); +} + +void DisplayNULL::generateExtensions(egl::DisplayExtensions *outExtensions) const +{ + UNIMPLEMENTED(); +} + +void DisplayNULL::generateCaps(egl::Caps *outCaps) const +{ + UNIMPLEMENTED(); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/DisplayNULL.h b/gfx/angle/src/libANGLE/renderer/null/DisplayNULL.h new file mode 100644 index 000000000..5a453810a --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/DisplayNULL.h @@ -0,0 +1,82 @@ +// +// 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. +// +// DisplayNULL.h: +// Defines the class interface for DisplayNULL, implementing DisplayImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_DISPLAYNULL_H_ +#define LIBANGLE_RENDERER_NULL_DISPLAYNULL_H_ + +#include "libANGLE/renderer/DisplayImpl.h" + +namespace rx +{ + +class DisplayNULL : public DisplayImpl +{ + public: + DisplayNULL(); + ~DisplayNULL() 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() 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; + gl::Version getMaxSupportedESVersion() 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, + EGLenum buftype, + EGLClientBuffer buffer, + 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_NULL_DISPLAYNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.cpp new file mode 100644 index 000000000..9d7f26043 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.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. +// +// FenceNVNULL.cpp: +// Implements the class methods for FenceNVNULL. +// + +#include "libANGLE/renderer/null/FenceNVNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +FenceNVNULL::FenceNVNULL() : FenceNVImpl() +{ +} + +FenceNVNULL::~FenceNVNULL() +{ +} + +gl::Error FenceNVNULL::set(GLenum condition) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FenceNVNULL::test(GLboolean *outFinished) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FenceNVNULL::finish() +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.h b/gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.h new file mode 100644 index 000000000..10cf5c2cb --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/FenceNVNULL.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. +// +// FenceNVNULL.h: +// Defines the class interface for FenceNVNULL, implementing FenceNVImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_FENCENVNULL_H_ +#define LIBANGLE_RENDERER_NULL_FENCENVNULL_H_ + +#include "libANGLE/renderer/FenceNVImpl.h" + +namespace rx +{ + +class FenceNVNULL : public FenceNVImpl +{ + public: + FenceNVNULL(); + ~FenceNVNULL() override; + + gl::Error set(GLenum condition) override; + gl::Error test(GLboolean *outFinished) override; + gl::Error finish() override; +}; + +} // namespace rx + +#endif // LIBANGLE_RENDERER_NULL_FENCENVNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.cpp new file mode 100644 index 000000000..37bfdfedb --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.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. +// +// FenceSyncNULL.cpp: +// Implements the class methods for FenceSyncNULL. +// + +#include "libANGLE/renderer/null/FenceSyncNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +FenceSyncNULL::FenceSyncNULL() : FenceSyncImpl() +{ +} + +FenceSyncNULL::~FenceSyncNULL() +{ +} + +gl::Error FenceSyncNULL::set(GLenum condition, GLbitfield flags) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FenceSyncNULL::clientWait(GLbitfield flags, GLuint64 timeout, GLenum *outResult) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FenceSyncNULL::serverWait(GLbitfield flags, GLuint64 timeout) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FenceSyncNULL::getStatus(GLint *outResult) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.h b/gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.h new file mode 100644 index 000000000..28a12f703 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/FenceSyncNULL.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. +// +// FenceSyncNULL.h: +// Defines the class interface for FenceSyncNULL, implementing FenceSyncImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_FENCESYNCNULL_H_ +#define LIBANGLE_RENDERER_NULL_FENCESYNCNULL_H_ + +#include "libANGLE/renderer/FenceSyncImpl.h" + +namespace rx +{ + +class FenceSyncNULL : public FenceSyncImpl +{ + public: + FenceSyncNULL(); + ~FenceSyncNULL() 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_NULL_FENCESYNCNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.cpp new file mode 100644 index 000000000..14ebe1eba --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.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. +// +// FramebufferNULL.cpp: +// Implements the class methods for FramebufferNULL. +// + +#include "libANGLE/renderer/null/FramebufferNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +FramebufferNULL::FramebufferNULL(const gl::FramebufferState &state) : FramebufferImpl(state) +{ +} + +FramebufferNULL::~FramebufferNULL() +{ +} + +gl::Error FramebufferNULL::discard(size_t count, const GLenum *attachments) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FramebufferNULL::invalidate(size_t count, const GLenum *attachments) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FramebufferNULL::invalidateSub(size_t count, + const GLenum *attachments, + const gl::Rectangle &area) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FramebufferNULL::clear(ContextImpl *context, GLbitfield mask) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FramebufferNULL::clearBufferfv(ContextImpl *context, + GLenum buffer, + GLint drawbuffer, + const GLfloat *values) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FramebufferNULL::clearBufferuiv(ContextImpl *context, + GLenum buffer, + GLint drawbuffer, + const GLuint *values) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FramebufferNULL::clearBufferiv(ContextImpl *context, + GLenum buffer, + GLint drawbuffer, + const GLint *values) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FramebufferNULL::clearBufferfi(ContextImpl *context, + GLenum buffer, + GLint drawbuffer, + GLfloat depth, + GLint stencil) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +GLenum FramebufferNULL::getImplementationColorReadFormat() const +{ + UNIMPLEMENTED(); + return GLenum(); +} + +GLenum FramebufferNULL::getImplementationColorReadType() const +{ + UNIMPLEMENTED(); + return GLenum(); +} + +gl::Error FramebufferNULL::readPixels(ContextImpl *context, + const gl::Rectangle &area, + GLenum format, + GLenum type, + GLvoid *pixels) const +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error FramebufferNULL::blit(ContextImpl *context, + const gl::Rectangle &sourceArea, + const gl::Rectangle &destArea, + GLbitfield mask, + GLenum filter) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +bool FramebufferNULL::checkStatus() const +{ + UNIMPLEMENTED(); + return bool(); +} + +void FramebufferNULL::syncState(const gl::Framebuffer::DirtyBits &dirtyBits) +{ + UNIMPLEMENTED(); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.h b/gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.h new file mode 100644 index 000000000..c53132c18 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/FramebufferNULL.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. +// +// FramebufferNULL.h: +// Defines the class interface for FramebufferNULL, implementing FramebufferImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_FRAMEBUFFERNULL_H_ +#define LIBANGLE_RENDERER_NULL_FRAMEBUFFERNULL_H_ + +#include "libANGLE/renderer/FramebufferImpl.h" + +namespace rx +{ + +class FramebufferNULL : public FramebufferImpl +{ + public: + FramebufferNULL(const gl::FramebufferState &state); + ~FramebufferNULL() 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_NULL_FRAMEBUFFERNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/ImageNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/ImageNULL.cpp new file mode 100644 index 000000000..23f3ca099 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/ImageNULL.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. +// +// ImageNULL.cpp: +// Implements the class methods for ImageNULL. +// + +#include "libANGLE/renderer/null/ImageNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +ImageNULL::ImageNULL() : ImageImpl() +{ +} + +ImageNULL::~ImageNULL() +{ +} + +egl::Error ImageNULL::initialize() +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +gl::Error ImageNULL::orphan(egl::ImageSibling *sibling) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/ImageNULL.h b/gfx/angle/src/libANGLE/renderer/null/ImageNULL.h new file mode 100644 index 000000000..b88b346dd --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/ImageNULL.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. +// +// ImageNULL.h: +// Defines the class interface for ImageNULL, implementing ImageImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_IMAGENULL_H_ +#define LIBANGLE_RENDERER_NULL_IMAGENULL_H_ + +#include "libANGLE/renderer/ImageImpl.h" + +namespace rx +{ + +class ImageNULL : public ImageImpl +{ + public: + ImageNULL(); + ~ImageNULL() override; + egl::Error initialize() override; + + gl::Error orphan(egl::ImageSibling *sibling) override; +}; + +} // namespace rx + +#endif // LIBANGLE_RENDERER_NULL_IMAGENULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/PathNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/PathNULL.cpp new file mode 100644 index 000000000..bb52ea2c2 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/PathNULL.cpp @@ -0,0 +1,40 @@ +// +// 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. +// +// PathNULL.cpp: +// Implements the class methods for PathNULL. +// + +#include "libANGLE/renderer/null/PathNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +PathNULL::PathNULL() : PathImpl() +{ +} + +PathNULL::~PathNULL() +{ +} + +gl::Error PathNULL::setCommands(GLsizei numCommands, + const GLubyte *commands, + GLsizei numCoords, + GLenum coordType, + const void *coords) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +void PathNULL::setPathParameter(GLenum pname, GLfloat value) +{ + UNIMPLEMENTED(); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/PathNULL.h b/gfx/angle/src/libANGLE/renderer/null/PathNULL.h new file mode 100644 index 000000000..4c80c1c91 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/PathNULL.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. +// +// PathNULL.h: +// Defines the class interface for PathNULL, implementing PathImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_PATHNULL_H_ +#define LIBANGLE_RENDERER_NULL_PATHNULL_H_ + +#include "libANGLE/renderer/PathImpl.h" + +namespace rx +{ + +class PathNULL : public PathImpl +{ + public: + PathNULL(); + ~PathNULL() override; + + gl::Error setCommands(GLsizei numCommands, + const GLubyte *commands, + GLsizei numCoords, + GLenum coordType, + const void *coords) override; + + void setPathParameter(GLenum pname, GLfloat value) override; +}; + +} // namespace rx + +#endif // LIBANGLE_RENDERER_NULL_PATHNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/ProgramNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/ProgramNULL.cpp new file mode 100644 index 000000000..fb44b6ee4 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/ProgramNULL.cpp @@ -0,0 +1,212 @@ +// +// 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. +// +// ProgramNULL.cpp: +// Implements the class methods for ProgramNULL. +// + +#include "libANGLE/renderer/null/ProgramNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +ProgramNULL::ProgramNULL(const gl::ProgramState &state) : ProgramImpl(state) +{ +} + +ProgramNULL::~ProgramNULL() +{ +} + +LinkResult ProgramNULL::load(gl::InfoLog &infoLog, gl::BinaryInputStream *stream) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error ProgramNULL::save(gl::BinaryOutputStream *stream) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +void ProgramNULL::setBinaryRetrievableHint(bool retrievable) +{ + UNIMPLEMENTED(); +} + +LinkResult ProgramNULL::link(const gl::ContextState &data, gl::InfoLog &infoLog) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +GLboolean ProgramNULL::validate(const gl::Caps &caps, gl::InfoLog *infoLog) +{ + UNIMPLEMENTED(); + return GLboolean(); +} + +void ProgramNULL::setUniform1fv(GLint location, GLsizei count, const GLfloat *v) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniform2fv(GLint location, GLsizei count, const GLfloat *v) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniform3fv(GLint location, GLsizei count, const GLfloat *v) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniform4fv(GLint location, GLsizei count, const GLfloat *v) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniform1iv(GLint location, GLsizei count, const GLint *v) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniform2iv(GLint location, GLsizei count, const GLint *v) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniform3iv(GLint location, GLsizei count, const GLint *v) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniform4iv(GLint location, GLsizei count, const GLint *v) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniform1uiv(GLint location, GLsizei count, const GLuint *v) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniform2uiv(GLint location, GLsizei count, const GLuint *v) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniform3uiv(GLint location, GLsizei count, const GLuint *v) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniform4uiv(GLint location, GLsizei count, const GLuint *v) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniformMatrix2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniformMatrix3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniformMatrix4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniformMatrix2x3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniformMatrix3x2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniformMatrix2x4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniformMatrix4x2fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniformMatrix3x4fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniformMatrix4x3fv(GLint location, + GLsizei count, + GLboolean transpose, + const GLfloat *value) +{ + UNIMPLEMENTED(); +} + +void ProgramNULL::setUniformBlockBinding(GLuint uniformBlockIndex, GLuint uniformBlockBinding) +{ + UNIMPLEMENTED(); +} + +bool ProgramNULL::getUniformBlockSize(const std::string &blockName, size_t *sizeOut) const +{ + UNIMPLEMENTED(); + return bool(); +} + +bool ProgramNULL::getUniformBlockMemberInfo(const std::string &memberUniformName, + sh::BlockMemberInfo *memberInfoOut) const +{ + UNIMPLEMENTED(); + return bool(); +} + +void ProgramNULL::setPathFragmentInputGen(const std::string &inputName, + GLenum genMode, + GLint components, + const GLfloat *coeffs) +{ + UNIMPLEMENTED(); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/ProgramNULL.h b/gfx/angle/src/libANGLE/renderer/null/ProgramNULL.h new file mode 100644 index 000000000..576a52c18 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/ProgramNULL.h @@ -0,0 +1,101 @@ +// +// 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. +// +// ProgramNULL.h: +// Defines the class interface for ProgramNULL, implementing ProgramImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_PROGRAMNULL_H_ +#define LIBANGLE_RENDERER_NULL_PROGRAMNULL_H_ + +#include "libANGLE/renderer/ProgramImpl.h" + +namespace rx +{ + +class ProgramNULL : public ProgramImpl +{ + public: + ProgramNULL(const gl::ProgramState &state); + ~ProgramNULL() 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; + // CHROMIUM_path_rendering + // Set parameters to control fragment shader input variable interpolation + void setPathFragmentInputGen(const std::string &inputName, + GLenum genMode, + GLint components, + const GLfloat *coeffs) override; +}; + +} // namespace rx + +#endif // LIBANGLE_RENDERER_NULL_PROGRAMNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/QueryNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/QueryNULL.cpp new file mode 100644 index 000000000..6276a0ff1 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/QueryNULL.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. +// +// QueryNULL.cpp: +// Implements the class methods for QueryNULL. +// + +#include "libANGLE/renderer/null/QueryNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +QueryNULL::QueryNULL(GLenum type) : QueryImpl(type) +{ +} + +QueryNULL::~QueryNULL() +{ +} + +gl::Error QueryNULL::begin() +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error QueryNULL::end() +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error QueryNULL::queryCounter() +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error QueryNULL::getResult(GLint *params) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error QueryNULL::getResult(GLuint *params) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error QueryNULL::getResult(GLint64 *params) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error QueryNULL::getResult(GLuint64 *params) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error QueryNULL::isResultAvailable(bool *available) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/QueryNULL.h b/gfx/angle/src/libANGLE/renderer/null/QueryNULL.h new file mode 100644 index 000000000..40082a9b8 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/QueryNULL.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. +// +// QueryNULL.h: +// Defines the class interface for QueryNULL, implementing QueryImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_QUERYNULL_H_ +#define LIBANGLE_RENDERER_NULL_QUERYNULL_H_ + +#include "libANGLE/renderer/QueryImpl.h" + +namespace rx +{ + +class QueryNULL : public QueryImpl +{ + public: + QueryNULL(GLenum type); + ~QueryNULL() 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_NULL_QUERYNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.cpp new file mode 100644 index 000000000..50f54a620 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.cpp @@ -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. +// +// RenderbufferNULL.cpp: +// Implements the class methods for RenderbufferNULL. +// + +#include "libANGLE/renderer/null/RenderbufferNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +RenderbufferNULL::RenderbufferNULL() : RenderbufferImpl() +{ +} + +RenderbufferNULL::~RenderbufferNULL() +{ +} + +gl::Error RenderbufferNULL::setStorage(GLenum internalformat, size_t width, size_t height) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error RenderbufferNULL::setStorageMultisample(size_t samples, + GLenum internalformat, + size_t width, + size_t height) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error RenderbufferNULL::setStorageEGLImageTarget(egl::Image *image) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.h b/gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.h new file mode 100644 index 000000000..79e529c4c --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/RenderbufferNULL.h @@ -0,0 +1,34 @@ +// +// 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. +// +// RenderbufferNULL.h: +// Defines the class interface for RenderbufferNULL, implementing RenderbufferImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_RENDERBUFFERNULL_H_ +#define LIBANGLE_RENDERER_NULL_RENDERBUFFERNULL_H_ + +#include "libANGLE/renderer/RenderbufferImpl.h" + +namespace rx +{ + +class RenderbufferNULL : public RenderbufferImpl +{ + public: + RenderbufferNULL(); + ~RenderbufferNULL() 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; +}; + +} // namespace rx + +#endif // LIBANGLE_RENDERER_NULL_RENDERBUFFERNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/SamplerNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/SamplerNULL.cpp new file mode 100644 index 000000000..e1e8c7c62 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/SamplerNULL.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. +// +// SamplerNULL.cpp: +// Implements the class methods for SamplerNULL. +// + +#include "libANGLE/renderer/null/SamplerNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +SamplerNULL::SamplerNULL() : SamplerImpl() +{ +} + +SamplerNULL::~SamplerNULL() +{ +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/SamplerNULL.h b/gfx/angle/src/libANGLE/renderer/null/SamplerNULL.h new file mode 100644 index 000000000..031fafa39 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/SamplerNULL.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. +// +// SamplerNULL.h: +// Defines the class interface for SamplerNULL, implementing SamplerImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_SAMPLERNULL_H_ +#define LIBANGLE_RENDERER_NULL_SAMPLERNULL_H_ + +#include "libANGLE/renderer/SamplerImpl.h" + +namespace rx +{ + +class SamplerNULL : public SamplerImpl +{ + public: + SamplerNULL(); + ~SamplerNULL() override; +}; + +} // namespace rx + +#endif // LIBANGLE_RENDERER_NULL_SAMPLERNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/ShaderNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/ShaderNULL.cpp new file mode 100644 index 000000000..168f4bdca --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/ShaderNULL.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. +// +// ShaderNULL.cpp: +// Implements the class methods for ShaderNULL. +// + +#include "libANGLE/renderer/null/ShaderNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +ShaderNULL::ShaderNULL(const gl::ShaderState &data) : ShaderImpl(data) +{ +} + +ShaderNULL::~ShaderNULL() +{ +} + +ShCompileOptions ShaderNULL::prepareSourceAndReturnOptions(std::stringstream *sourceStream, + std::string *sourcePath) +{ + UNIMPLEMENTED(); + return ShCompileOptions(); +} + +bool ShaderNULL::postTranslateCompile(gl::Compiler *compiler, std::string *infoLog) +{ + UNIMPLEMENTED(); + return bool(); +} + +std::string ShaderNULL::getDebugInfo() const +{ + UNIMPLEMENTED(); + return std::string(); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/ShaderNULL.h b/gfx/angle/src/libANGLE/renderer/null/ShaderNULL.h new file mode 100644 index 000000000..d29b4cfb7 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/ShaderNULL.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. +// +// ShaderNULL.h: +// Defines the class interface for ShaderNULL, implementing ShaderImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_SHADERNULL_H_ +#define LIBANGLE_RENDERER_NULL_SHADERNULL_H_ + +#include "libANGLE/renderer/ShaderImpl.h" + +namespace rx +{ + +class ShaderNULL : public ShaderImpl +{ + public: + ShaderNULL(const gl::ShaderState &data); + ~ShaderNULL() override; + + // Returns additional sh::Compile options. + ShCompileOptions 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_NULL_SHADERNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.cpp new file mode 100644 index 000000000..81d763783 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.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. +// +// SurfaceNULL.cpp: +// Implements the class methods for SurfaceNULL. +// + +#include "libANGLE/renderer/null/SurfaceNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +SurfaceNULL::SurfaceNULL(const egl::SurfaceState &surfaceState) : SurfaceImpl(surfaceState) +{ +} + +SurfaceNULL::~SurfaceNULL() +{ +} + +egl::Error SurfaceNULL::initialize() +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +FramebufferImpl *SurfaceNULL::createDefaultFramebuffer(const gl::FramebufferState &state) +{ + UNIMPLEMENTED(); + return static_cast<FramebufferImpl *>(0); +} + +egl::Error SurfaceNULL::swap() +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +egl::Error SurfaceNULL::postSubBuffer(EGLint x, EGLint y, EGLint width, EGLint height) +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +egl::Error SurfaceNULL::querySurfacePointerANGLE(EGLint attribute, void **value) +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +egl::Error SurfaceNULL::bindTexImage(gl::Texture *texture, EGLint buffer) +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +egl::Error SurfaceNULL::releaseTexImage(EGLint buffer) +{ + UNIMPLEMENTED(); + return egl::Error(EGL_BAD_ACCESS); +} + +void SurfaceNULL::setSwapInterval(EGLint interval) +{ + UNIMPLEMENTED(); +} + +EGLint SurfaceNULL::getWidth() const +{ + UNIMPLEMENTED(); + return EGLint(); +} + +EGLint SurfaceNULL::getHeight() const +{ + UNIMPLEMENTED(); + return EGLint(); +} + +EGLint SurfaceNULL::isPostSubBufferSupported() const +{ + UNIMPLEMENTED(); + return EGLint(); +} + +EGLint SurfaceNULL::getSwapBehavior() const +{ + UNIMPLEMENTED(); + return EGLint(); +} + +gl::Error SurfaceNULL::getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target, + FramebufferAttachmentRenderTarget **rtOut) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.h b/gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.h new file mode 100644 index 000000000..597f1c21c --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/SurfaceNULL.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. +// +// SurfaceNULL.h: +// Defines the class interface for SurfaceNULL, implementing SurfaceImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_SURFACENULL_H_ +#define LIBANGLE_RENDERER_NULL_SURFACENULL_H_ + +#include "libANGLE/renderer/SurfaceImpl.h" + +namespace rx +{ + +class SurfaceNULL : public SurfaceImpl +{ + public: + SurfaceNULL(const egl::SurfaceState &surfaceState); + ~SurfaceNULL() 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_NULL_SURFACENULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/TextureNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/TextureNULL.cpp new file mode 100644 index 000000000..2c952e528 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/TextureNULL.cpp @@ -0,0 +1,143 @@ +// +// 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. +// +// TextureNULL.cpp: +// Implements the class methods for TextureNULL. +// + +#include "libANGLE/renderer/null/TextureNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +TextureNULL::TextureNULL(const gl::TextureState &state) : TextureImpl(state) +{ +} + +TextureNULL::~TextureNULL() +{ +} + +gl::Error TextureNULL::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 TextureNULL::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 TextureNULL::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 TextureNULL::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 TextureNULL::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 TextureNULL::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 TextureNULL::setStorage(GLenum target, + size_t levels, + GLenum internalFormat, + const gl::Extents &size) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error TextureNULL::setEGLImageTarget(GLenum target, egl::Image *image) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error TextureNULL::setImageExternal(GLenum target, + egl::Stream *stream, + const egl::Stream::GLTextureDescription &desc) +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +gl::Error TextureNULL::generateMipmap() +{ + UNIMPLEMENTED(); + return gl::Error(GL_INVALID_OPERATION); +} + +void TextureNULL::setBaseLevel(GLuint baseLevel) +{ + UNIMPLEMENTED(); +} + +void TextureNULL::bindTexImage(egl::Surface *surface) +{ + UNIMPLEMENTED(); +} + +void TextureNULL::releaseTexImage() +{ + UNIMPLEMENTED(); +} + +void TextureNULL::syncState(const gl::Texture::DirtyBits &dirtyBits) +{ + UNIMPLEMENTED(); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/TextureNULL.h b/gfx/angle/src/libANGLE/renderer/null/TextureNULL.h new file mode 100644 index 000000000..10c2d3503 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/TextureNULL.h @@ -0,0 +1,89 @@ +// +// 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. +// +// TextureNULL.h: +// Defines the class interface for TextureNULL, implementing TextureImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_TEXTURENULL_H_ +#define LIBANGLE_RENDERER_NULL_TEXTURENULL_H_ + +#include "libANGLE/renderer/TextureImpl.h" + +namespace rx +{ + +class TextureNULL : public TextureImpl +{ + public: + TextureNULL(const gl::TextureState &state); + ~TextureNULL() 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; + + void syncState(const gl::Texture::DirtyBits &dirtyBits) override; +}; + +} // namespace rx + +#endif // LIBANGLE_RENDERER_NULL_TEXTURENULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.cpp new file mode 100644 index 000000000..e1433fb2d --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.cpp @@ -0,0 +1,57 @@ +// +// 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. +// +// TransformFeedbackNULL.cpp: +// Implements the class methods for TransformFeedbackNULL. +// + +#include "libANGLE/renderer/null/TransformFeedbackNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +TransformFeedbackNULL::TransformFeedbackNULL(const gl::TransformFeedbackState &state) + : TransformFeedbackImpl(state) +{ +} + +TransformFeedbackNULL::~TransformFeedbackNULL() +{ +} + +void TransformFeedbackNULL::begin(GLenum primitiveMode) +{ + UNIMPLEMENTED(); +} + +void TransformFeedbackNULL::end() +{ + UNIMPLEMENTED(); +} + +void TransformFeedbackNULL::pause() +{ + UNIMPLEMENTED(); +} + +void TransformFeedbackNULL::resume() +{ + UNIMPLEMENTED(); +} + +void TransformFeedbackNULL::bindGenericBuffer(const BindingPointer<gl::Buffer> &binding) +{ + UNIMPLEMENTED(); +} + +void TransformFeedbackNULL::bindIndexedBuffer(size_t index, + const OffsetBindingPointer<gl::Buffer> &binding) +{ + UNIMPLEMENTED(); +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.h b/gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.h new file mode 100644 index 000000000..477e81d85 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/TransformFeedbackNULL.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. +// +// TransformFeedbackNULL.h: +// Defines the class interface for TransformFeedbackNULL, implementing TransformFeedbackImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_TRANSFORMFEEDBACKNULL_H_ +#define LIBANGLE_RENDERER_NULL_TRANSFORMFEEDBACKNULL_H_ + +#include "libANGLE/renderer/TransformFeedbackImpl.h" + +namespace rx +{ + +class TransformFeedbackNULL : public TransformFeedbackImpl +{ + public: + TransformFeedbackNULL(const gl::TransformFeedbackState &state); + ~TransformFeedbackNULL() 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_NULL_TRANSFORMFEEDBACKNULL_H_ diff --git a/gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.cpp b/gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.cpp new file mode 100644 index 000000000..95a835df1 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.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. +// +// VertexArrayNULL.cpp: +// Implements the class methods for VertexArrayNULL. +// + +#include "libANGLE/renderer/null/VertexArrayNULL.h" + +#include "common/debug.h" + +namespace rx +{ + +VertexArrayNULL::VertexArrayNULL(const gl::VertexArrayState &data) : VertexArrayImpl(data) +{ +} + +VertexArrayNULL::~VertexArrayNULL() +{ +} + +} // namespace rx diff --git a/gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.h b/gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.h new file mode 100644 index 000000000..f8b2b0490 --- /dev/null +++ b/gfx/angle/src/libANGLE/renderer/null/VertexArrayNULL.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. +// +// VertexArrayNULL.h: +// Defines the class interface for VertexArrayNULL, implementing VertexArrayImpl. +// + +#ifndef LIBANGLE_RENDERER_NULL_VERTEXARRAYNULL_H_ +#define LIBANGLE_RENDERER_NULL_VERTEXARRAYNULL_H_ + +#include "libANGLE/renderer/VertexArrayImpl.h" + +namespace rx +{ + +class VertexArrayNULL : public VertexArrayImpl +{ + public: + VertexArrayNULL(const gl::VertexArrayState &data); + ~VertexArrayNULL() override; +}; + +} // namespace rx + +#endif // LIBANGLE_RENDERER_NULL_VERTEXARRAYNULL_H_ |