From Mathias Froehlich, "Update to the configure check for msvc 7.1.
MemoryBarrier() is used in the implementation, so it should be checked. This in effect disables the faster atomic ops on msvc 7.1 and older, even if only the MemoryBarrier() call is missing. But it ensures for the fist cut that it will build everywhere. If somebody cares for msvc 7.1 enough and has one for testing installed, he might provide the apropriate defines to guard that MemoryBarrier() call. I tested that msvc8 32/64bit still passes the configure tests and compiles. "
This commit is contained in:
@@ -77,6 +77,7 @@ int main(int, const char**)
|
||||
long* volatile ptr = &data;
|
||||
|
||||
InterlockedIncrement(&value);
|
||||
MemoryBarrier();
|
||||
InterlockedDecrement(&value);
|
||||
|
||||
if (0 != InterlockedCompareExchange(&value, 1, 0))
|
||||
|
||||
@@ -553,7 +553,10 @@ void Image::allocateImage(int s,int t,int r,
|
||||
_pixelFormat = format;
|
||||
_dataType = type;
|
||||
_packing = packing;
|
||||
_internalTextureFormat = format;
|
||||
|
||||
// preserve internalTextureFormat if already set, otherwise
|
||||
// use the pixelFormat as the source for the format.
|
||||
if (_internalTextureFormat==0) _internalTextureFormat = format;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -565,7 +568,10 @@ void Image::allocateImage(int s,int t,int r,
|
||||
_pixelFormat = 0;
|
||||
_dataType = 0;
|
||||
_packing = 0;
|
||||
_internalTextureFormat = 0;
|
||||
|
||||
// commenting out reset of _internalTextureFormat as we are changing
|
||||
// policy so that allocateImage honours previous settings of _internalTextureFormat.
|
||||
//_internalTextureFormat = 0;
|
||||
}
|
||||
|
||||
dirty();
|
||||
|
||||
Reference in New Issue
Block a user