diff options
author | Andrew Knight <andrew.knight@theqtcompany.com> | 2014-11-14 10:52:01 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2014-11-14 19:01:38 +0100 |
commit | c6df5fe3ed0f2a722931be098914978cf17a666f (patch) | |
tree | 23abe340dbc427a3afd255c79316f79fef937059 /src/3rdparty/angle/src/libGLESv2/renderer/d3d/IndexDataManager.cpp | |
parent | 32db2f425a0b85bc03d7de42d7b44337d0aa16f4 (diff) |
ANGLE: Upgrade to version 1.2.30d6c255d238
The following patches have been changed:
0001-Fix-compilation-for-MSVC-2008-and-std-tuple.patch
Removed because it is no longer possible to build ANGLE with MSVC2008
0002-Fix-compilation-of-ANGLE-with-mingw-tdm64-gcc-4.8.1.patch
Removed because the minimum version of MinGW moved to 4.8.2
0005-Fix-build-when-SSE2-is-not-available.patch
Removed because it was fixed upstream
0006-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch
Removed because older versions of MinGW are not supported
0007-Fix-ANGLE-build-with-Microsoft-Visual-Studio-14-CTP.patch
Removed because it was fixed upstream
Task-number: QTBUG-41903
Change-Id: I976d30802f7f6fee725cf9a9f1325d5e82609835
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'src/3rdparty/angle/src/libGLESv2/renderer/d3d/IndexDataManager.cpp')
-rw-r--r-- | src/3rdparty/angle/src/libGLESv2/renderer/d3d/IndexDataManager.cpp | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/IndexDataManager.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/IndexDataManager.cpp index 8d455b4bf3..eddd9de887 100644 --- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/IndexDataManager.cpp +++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/IndexDataManager.cpp @@ -10,7 +10,7 @@ #include "libGLESv2/renderer/d3d/IndexDataManager.h" #include "libGLESv2/renderer/d3d/BufferD3D.h" #include "libGLESv2/renderer/d3d/IndexBuffer.h" -#include "libGLESv2/renderer/Renderer.h" +#include "libGLESv2/renderer/d3d/RendererD3D.h" #include "libGLESv2/Buffer.h" #include "libGLESv2/main.h" #include "libGLESv2/formatutils.h" @@ -57,7 +57,7 @@ static void ConvertIndices(GLenum sourceType, GLenum destinationType, const void else UNREACHABLE(); } -IndexDataManager::IndexDataManager(Renderer *renderer) +IndexDataManager::IndexDataManager(RendererD3D *renderer) : mRenderer(renderer), mStreamingBufferShort(NULL), mStreamingBufferInt(NULL) @@ -97,7 +97,14 @@ gl::Error IndexDataManager::prepareIndexData(GLenum type, GLsizei count, gl::Buf ASSERT(typeInfo.bytes * static_cast<unsigned int>(count) + offset <= storage->getSize()); - indices = static_cast<const GLubyte*>(storage->getData()) + offset; + const uint8_t *bufferData = NULL; + gl::Error error = storage->getData(&bufferData); + if (error.isError()) + { + return error; + } + + indices = bufferData + offset; } StaticIndexBufferInterface *staticBuffer = storage ? storage->getStaticIndexBuffer() : NULL; @@ -183,7 +190,16 @@ gl::Error IndexDataManager::prepareIndexData(GLenum type, GLsizei count, gl::Buf return error; } - ConvertIndices(type, destinationIndexType, staticBuffer ? storage->getData() : indices, convertCount, output); + const uint8_t *dataPointer = reinterpret_cast<const uint8_t*>(indices); + if (staticBuffer) + { + error = storage->getData(&dataPointer); + if (error.isError()) + { + return error; + } + } + ConvertIndices(type, destinationIndexType, dataPointer, convertCount, output); error = indexBuffer->unmapBuffer(); if (error.isError()) |