Bug 1076743 - Fixed angle compilation with mingw. (upstream part)

--HG--
rename : gfx/angle/src/libGLESv2/constants.h => gfx/angle/src/libGLESv2/Constants.h
extra : rebase_source : 3147126bc9ccd9df61f4f27e91efe397a6538943
This commit is contained in:
Jacek Caban 2014-10-06 18:02:43 +02:00
Родитель 9e6b1ce2ef
Коммит aae8678c90
16 изменённых файлов: 18 добавлений и 47 удалений

Просмотреть файл

@ -124,7 +124,7 @@ namespace gl
#endif
// A macro functioning as a compile-time assert to validate constant conditions
#if defined(_MSC_VER) && _MSC_VER >= 1600
#if (defined(_MSC_VER) && _MSC_VER >= 1600) || (defined(__GNUC__) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 3))
#define META_ASSERT_MSG(condition, msg) static_assert(condition, msg)
#else
#define META_ASSERT_CONCAT(a, b) a ## b

Просмотреть файл

@ -14,6 +14,7 @@
#include <map>
#include <vector>
#include <sstream>
#include <iterator>
#include "common/debug.h"
#include "common/mathutil.h"

Просмотреть файл

@ -46,6 +46,7 @@
'libGLESv2/Buffer.h',
'libGLESv2/Caps.cpp',
'libGLESv2/Caps.h',
'libGLESv2/Constants.h',
'libGLESv2/Context.cpp',
'libGLESv2/Context.h',
'libGLESv2/Error.cpp',
@ -87,7 +88,6 @@
'libGLESv2/VertexAttribute.h',
'libGLESv2/angletypes.cpp',
'libGLESv2/angletypes.h',
'libGLESv2/constants.h',
'libGLESv2/formatutils.cpp',
'libGLESv2/formatutils.h',
'libGLESv2/libGLESv2.cpp',

Просмотреть файл

@ -33,6 +33,7 @@
#include "libEGL/Surface.h"
#include <sstream>
#include <iterator>
namespace gl
{
@ -341,7 +342,7 @@ void Context::deleteFenceSync(GLsync fenceSync)
// wait commands finish. However, since the name becomes invalid, we cannot query the fence,
// and since our API is currently designed for being called from a single thread, we can delete
// the fence immediately.
mResourceManager->deleteFenceSync(reinterpret_cast<GLuint>(fenceSync));
mResourceManager->deleteFenceSync(reinterpret_cast<uintptr_t>(fenceSync));
}
void Context::deleteVertexArray(GLuint vertexArray)
@ -447,7 +448,7 @@ Renderbuffer *Context::getRenderbuffer(GLuint handle)
FenceSync *Context::getFenceSync(GLsync handle) const
{
return mResourceManager->getFenceSync(reinterpret_cast<GLuint>(handle));
return mResourceManager->getFenceSync(reinterpret_cast<uintptr_t>(handle));
}
VertexArray *Context::getVertexArray(GLuint handle) const

Просмотреть файл

@ -12,7 +12,7 @@
#include "common/angleutils.h"
#include "common/RefCountObject.h"
#include "constants.h"
#include "Constants.h"
namespace rx
{

Просмотреть файл

@ -14,7 +14,7 @@
#include "common/debug.h"
#include "common/RefCountObject.h"
#include "libGLESv2/angletypes.h"
#include "libGLESv2/constants.h"
#include "libGLESv2/Constants.h"
#include "libGLESv2/renderer/TextureImpl.h"
#include "libGLESv2/Caps.h"

Просмотреть файл

@ -14,7 +14,7 @@
#define LIBGLESV2_VERTEXARRAY_H_
#include "common/RefCountObject.h"
#include "libGLESv2/constants.h"
#include "libGLESv2/Constants.h"
#include "libGLESv2/VertexAttribute.h"
#include <vector>

Просмотреть файл

@ -9,7 +9,7 @@
#ifndef LIBGLESV2_ANGLETYPES_H_
#define LIBGLESV2_ANGLETYPES_H_
#include "libGLESv2/constants.h"
#include "libGLESv2/Constants.h"
#include "common/RefCountObject.h"
namespace gl

Просмотреть файл

@ -6,7 +6,7 @@
// copyimage.cpp: Defines image copying functions
#include "libGLESv2/renderer/copyImage.h"
#include "libGLESv2/renderer/copyimage.h"
namespace rx
{

Просмотреть файл

@ -24,7 +24,7 @@ inline void WriteColor(const uint8_t *source, uint8_t *dest)
template <typename sourceType, typename destType, typename colorDataType>
inline void CopyPixel(const uint8_t *source, uint8_t *dest)
{
colorType temp;
colorDataType temp;
ReadColor<sourceType, colorDataType>(source, &temp);
WriteColor<destType, colorDataType>(&temp, dest);
}

Просмотреть файл

@ -10,7 +10,7 @@
#define LIBGLESV2_RENDERER_DYNAMIC_HLSL_H_
#include "common/angleutils.h"
#include "libGLESv2/constants.h"
#include "libGLESv2/Constants.h"
#include "angle_gl.h"

Просмотреть файл

@ -129,7 +129,7 @@ bool TextureD3D::subImage(GLint xoffset, GLint yoffset, GLint zoffset, GLsizei w
if (unpack.pixelBuffer.id() != 0)
{
gl::Buffer *pixelBuffer = unpack.pixelBuffer.get();
unsigned int offset = reinterpret_cast<unsigned int>(pixels);
uintptr_t offset = reinterpret_cast<uintptr_t>(pixels);
// TODO: setImage/subImage is the only place outside of renderer that asks for a buffers raw data.
// This functionality should be moved into renderer and the getData method of BufferImpl removed.
const void *bufferData = pixelBuffer->getImplementation()->getData();
@ -183,7 +183,7 @@ bool TextureD3D::fastUnpackPixels(const gl::PixelUnpackState &unpack, const void
// to create a render target.
ASSERT(mRenderer->supportsFastCopyBufferToTexture(sizedInternalFormat));
unsigned int offset = reinterpret_cast<unsigned int>(pixels);
uintptr_t offset = reinterpret_cast<uintptr_t>(pixels);
return mRenderer->fastCopyBufferToTexture(unpack, offset, destRenderTarget, sizedInternalFormat, type, destArea);
}

Просмотреть файл

@ -11,7 +11,7 @@
#include "libGLESv2/renderer/TextureImpl.h"
#include "libGLESv2/angletypes.h"
#include "libGLESv2/constants.h"
#include "libGLESv2/Constants.h"
namespace gl
{

Просмотреть файл

@ -1646,7 +1646,7 @@ bool ValidateDrawElements(Context *context, GLenum mode, GLsizei count, GLenum t
// TODO: also disable index checking on back-ends that are robust to out-of-range accesses.
if (elementArrayBuffer)
{
unsigned int offset = reinterpret_cast<unsigned int>(indices);
uintptr_t offset = reinterpret_cast<uintptr_t>(indices);
if (!elementArrayBuffer->getIndexRangeCache()->findRange(type, offset, count, indexRangeOut, NULL))
{
const void *dataPointer = elementArrayBuffer->getImplementation()->getData();

Просмотреть файл

@ -587,7 +587,7 @@ const unsigned long long noEventId = 0;
class TraceID {
public:
explicit TraceID(const void* id, unsigned char* flags) :
m_data(static_cast<unsigned long long>(reinterpret_cast<unsigned long>(id)))
m_data(static_cast<unsigned long long>(reinterpret_cast<uintptr_t>(id)))
{
*flags |= TRACE_EVENT_FLAG_MANGLE_ID;
}
@ -788,37 +788,6 @@ private:
Data m_data;
};
// TraceEventSamplingStateScope records the current sampling state
// and sets a new sampling state. When the scope exists, it restores
// the sampling state having recorded.
template<size_t BucketNumber>
class SamplingStateScope {
public:
SamplingStateScope(const char* categoryAndName)
{
m_previousState = SamplingStateScope<BucketNumber>::current();
SamplingStateScope<BucketNumber>::set(categoryAndName);
}
~SamplingStateScope()
{
SamplingStateScope<BucketNumber>::set(m_previousState);
}
// FIXME: Make load/store to traceSamplingState[] thread-safe and atomic.
static inline const char* current()
{
return reinterpret_cast<const char*>(*gl::traceSamplingState[BucketNumber]);
}
static inline void set(const char* categoryAndName)
{
*gl::traceSamplingState[BucketNumber] = reinterpret_cast<long>(const_cast<char*>(categoryAndName));
}
private:
const char* m_previousState;
};
} // namespace TraceEvent
} // namespace gl