summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/libGLESv2/renderer/IndexDataManager.h
diff options
context:
space:
mode:
authorAndrew Knight <andrew.knight@digia.com>2013-04-03 19:57:09 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-08 11:35:44 +0200
commit710ad8ce1bd5d01ce048851d210ac3831ca17dde (patch)
treebb3f645e57a7887341113275c9caa2583f7e2dfa /src/3rdparty/angle/src/libGLESv2/renderer/IndexDataManager.h
parent8307ab784eb4d8d22441ee61f02cb381684ca3a2 (diff)
Upgrade ANGLE to DX11 Proto
Upgrades ANGLE to dx11proto (dx11-MRT-support tag), which splits out support for DirectX9 & DirectX11. The DX9 codepath is used by default; CONFIG+=angle_d3d11 must be passed to the ANGLE project to build for DX11. Existing patches to ANGLE have been updated (or removed if no longer needed), and a patch has been added to make DX9/DX11 codepaths mutually exclusive. Change-Id: Ibe13befadb94f04883eca449d0ee1f0da955ff92 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Axel Waggershauser <awagger@gmail.com>
Diffstat (limited to 'src/3rdparty/angle/src/libGLESv2/renderer/IndexDataManager.h')
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/IndexDataManager.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/IndexDataManager.h b/src/3rdparty/angle/src/libGLESv2/renderer/IndexDataManager.h
new file mode 100644
index 0000000000..0e77c81d1b
--- /dev/null
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/IndexDataManager.h
@@ -0,0 +1,66 @@
+//
+// Copyright (c) 2002-2012 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.
+//
+
+// IndexDataManager.h: Defines the IndexDataManager, a class that
+// runs the Buffer translation process for index buffers.
+
+#ifndef LIBGLESV2_INDEXDATAMANAGER_H_
+#define LIBGLESV2_INDEXDATAMANAGER_H_
+
+#include "common/angleutils.h"
+
+namespace
+{
+ enum { INITIAL_INDEX_BUFFER_SIZE = 4096 * sizeof(GLuint) };
+}
+
+namespace gl
+{
+class Buffer;
+}
+
+namespace rx
+{
+class StaticIndexBufferInterface;
+class StreamingIndexBufferInterface;
+class IndexBuffer;
+class BufferStorage;
+class Renderer;
+
+struct TranslatedIndexData
+{
+ unsigned int minIndex;
+ unsigned int maxIndex;
+ unsigned int startIndex;
+ unsigned int startOffset; // In bytes
+
+ IndexBuffer *indexBuffer;
+ BufferStorage *storage;
+ unsigned int serial;
+};
+
+class IndexDataManager
+{
+ public:
+ explicit IndexDataManager(Renderer *renderer);
+ virtual ~IndexDataManager();
+
+ GLenum prepareIndexData(GLenum type, GLsizei count, gl::Buffer *arrayElementBuffer, const GLvoid *indices, TranslatedIndexData *translated);
+ StaticIndexBufferInterface *getCountingIndices(GLsizei count);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(IndexDataManager);
+
+ Renderer *const mRenderer;
+
+ StreamingIndexBufferInterface *mStreamingBufferShort;
+ StreamingIndexBufferInterface *mStreamingBufferInt;
+ StaticIndexBufferInterface *mCountingBuffer;
+};
+
+}
+
+#endif // LIBGLESV2_INDEXDATAMANAGER_H_