blob: a0a6ccc977c24ce735fb44b0f6203d8e54a1ca14 [file] [log] [blame]
// Copyright 2014 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.
// Buffer9.h: Defines the rx::Buffer9 class which implements rx::BufferImpl via rx::BufferD3D.
#include "common/MemoryBuffer.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/renderer/d3d/BufferD3D.h"
namespace rx
class Renderer9;
class Buffer9 : public BufferD3D
Buffer9(const gl::BufferState &state, Renderer9 *renderer);
virtual ~Buffer9();
// BufferD3D implementation
virtual size_t getSize() const { return mSize; }
virtual bool supportsDirectBinding() const { return false; }
gl::Error getData(const uint8_t **outData) override;
// BufferImpl implementation
gl::Error setData(ContextImpl *context,
GLenum target,
const void *data,
size_t size,
GLenum usage) override;
gl::Error setSubData(ContextImpl *context,
GLenum target,
const void *data,
size_t size,
size_t offset) override;
gl::Error copySubData(ContextImpl *context,
BufferImpl *source,
GLintptr sourceOffset,
GLintptr destOffset,
GLsizeiptr size) override;
gl::Error map(ContextImpl *context, GLenum access, void **mapPtr) override;
gl::Error mapRange(ContextImpl *context,
size_t offset,
size_t length,
GLbitfield access,
void **mapPtr) override;
gl::Error unmap(ContextImpl *context, GLboolean *result) override;
gl::Error markTransformFeedbackUsage() override;
angle::MemoryBuffer mMemory;
size_t mSize;
} // namespace rx