Switch to using bitfields in the streambuffer class so we can exclude buggy streambuffer types. This disables pinned memory on ATI for GL_ELEMENT_ARRAY_BUFFER because it seems to be buggy. This fixes ATI for me.

This commit is contained in:
Ryan Houdek
2013-03-23 15:37:01 -05:00
parent 086252380d
commit ff61dc3840
4 changed files with 19 additions and 23 deletions

View File

@ -32,18 +32,19 @@
namespace OGL
{
enum StreamType {
STREAM_DETECT,
MAP_AND_ORPHAN,
MAP_AND_SYNC,
MAP_AND_RISK,
PINNED_MEMORY,
BUFFERSUBDATA
DETECT_MASK = 0x1F,
STREAM_DETECT = (1 << 0),
MAP_AND_ORPHAN = (1 << 1),
MAP_AND_SYNC = (1 << 2),
MAP_AND_RISK = (1 << 3),
PINNED_MEMORY = (1 << 4),
BUFFERSUBDATA = (1 << 5)
};
class StreamBuffer {
public:
StreamBuffer(u32 type, size_t size, StreamType uploadType = STREAM_DETECT);
StreamBuffer(u32 type, size_t size, StreamType uploadType = DETECT_MASK);
~StreamBuffer();
void Alloc(size_t size, u32 stride = 0);