Merge fixes from main.

This commit is contained in:
castano 2008-02-11 07:34:35 +00:00
parent 9409bf2fc8
commit dc76bef99d
6 changed files with 18 additions and 15 deletions

8
tags/2.0/configure vendored
View File

@ -36,9 +36,9 @@ done
if [ "$help" = "true" ]
then
echo "---------------------------------------"
echo "nv "`cat VERSION`" configuration script"
echo "---------------------------------------"
echo "-----------------------------------------------"
echo "nvidia-texture-tools "`cat VERSION`" configuration script"
echo "-----------------------------------------------"
echo
echo "--help Show this message."
echo "--debug Configure debug build."
@ -49,7 +49,7 @@ then
exit 0
fi
echo "-- Configuring nv "`cat VERSION`
echo "-- Configuring nvidia-texture-tools "`cat VERSION`
mkdir -p ./build
cd ./build

View File

@ -687,7 +687,7 @@ uint DirectDrawSurface::mipmapCount() const
{
nvDebugCheck(isValid());
if (header.flags & DDSD_MIPMAPCOUNT) return header.mipmapcount;
else return 0;
else return 1;
}
@ -991,8 +991,13 @@ uint DirectDrawSurface::faceSize() const
uint DirectDrawSurface::offset(const uint face, const uint mipmap)
{
uint size = 128; //sizeof(DDSHeader);
uint size = 128; // sizeof(DDSHeader);
if (header.hasDX10Header())
{
size += 20; // sizeof(DDSHeader10);
}
if (face != 0)
{
size += face * faceSize();

View File

@ -28,6 +28,12 @@
#include "maths.h"
#ifdef __GNUC__
# define SQUISH_ALIGN_16 __attribute__ ((__aligned__ (16)))
#else
# define SQUISH_ALIGN_16 __declspec(align(16))
#endif
#if SQUISH_USE_ALTIVEC
#include "simd_ve.h"
#endif

View File

@ -35,12 +35,6 @@
#define SQUISH_SSE_SPLAT( a ) \
( ( a ) | ( ( a ) << 2 ) | ( ( a ) << 4 ) | ( ( a ) << 6 ) )
#ifdef __GNUC__
# define SQUISH_ALIGN_16 __attribute__ ((__aligned__ (16)))
#else
# define SQUISH_ALIGN_16 __declspec(align(16))
#endif
namespace squish {
#define VEC4_CONST( X ) Vec4( _mm_set1_ps( X ) )

View File

@ -29,8 +29,6 @@
#include <altivec.h>
#undef bool
#define SQUISH_ALIGN_16 __attribute__ ((__aligned__ (16)))
namespace squish {
#define VEC4_CONST( X ) Vec4( ( vector float )( X ) )

View File

@ -324,7 +324,7 @@ int main(int argc, char *argv[])
for (uint f = 0; f < faceCount; f++)
{
for (uint m = 0; m <= mipmapCount; m++)
for (uint m = 0; m < mipmapCount; m++)
{
dds.mipmap(&mipmap, f, m);