2 // Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
7 // IndexRangeCache.h: Defines the rx::IndexRangeCache class which stores information about
10 #ifndef LIBGLESV2_RENDERER_INDEXRANGECACHE_H_
11 #define LIBGLESV2_RENDERER_INDEXRANGECACHE_H_
13 #include "common/angleutils.h"
21 void addRange(GLenum type, unsigned int offset, GLsizei count, unsigned int minIdx, unsigned int maxIdx,
22 unsigned int streamOffset);
23 bool findRange(GLenum type, unsigned int offset, GLsizei count, unsigned int *outMinIndex,
24 unsigned int *outMaxIndex, unsigned int *outStreamOffset) const;
26 void invalidateRange(unsigned int offset, unsigned int size);
37 IndexRange(GLenum type, intptr_t offset, GLsizei count);
39 bool operator<(const IndexRange& rhs) const;
44 unsigned int minIndex;
45 unsigned int maxIndex;
46 unsigned int streamOffset;
49 IndexBounds(unsigned int minIdx, unsigned int maxIdx, unsigned int offset);
52 typedef std::map<IndexRange, IndexBounds> IndexRangeMap;
53 IndexRangeMap mIndexRangeCache;
58 #endif LIBGLESV2_RENDERER_INDEXRANGECACHE_H