Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
angle
Commits
2ac3e738
Commit
2ac3e738
authored
Aug 10, 2011
by
gman@chromium.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bugs in DXT support
Review URL:
http://codereview.appspot.com/4857045
git-svn-id:
https://angleproject.googlecode.com/svn/trunk@722
736b8ea6-26fd-11df-bfd4-992fa37f6226
parent
50c526d2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
version.h
src/common/version.h
+1
-1
Texture.cpp
src/libGLESv2/Texture.cpp
+5
-5
No files found.
src/common/version.h
View file @
2ac3e738
#define MAJOR_VERSION 0
#define MAJOR_VERSION 0
#define MINOR_VERSION 0
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 72
1
#define BUILD_REVISION 72
2
#define STRINGIFY(x) #x
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
#define MACRO_STRINGIFY(x) STRINGIFY(x)
...
...
src/libGLESv2/Texture.cpp
View file @
2ac3e738
...
@@ -71,11 +71,11 @@ D3DFORMAT Texture::Image::getD3DFormat() const
...
@@ -71,11 +71,11 @@ D3DFORMAT Texture::Image::getD3DFormat() const
{
{
return
D3DFMT_DXT1
;
return
D3DFMT_DXT1
;
}
}
else
if
(
type
==
GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE
)
else
if
(
format
==
GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE
)
{
{
return
D3DFMT_DXT3
;
return
D3DFMT_DXT3
;
}
}
else
if
(
type
==
GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE
)
else
if
(
format
==
GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE
)
{
{
return
D3DFMT_DXT5
;
return
D3DFMT_DXT5
;
}
}
...
@@ -877,10 +877,10 @@ static void FlipCopyDXT5BlockFull(const unsigned int* source, unsigned int* dest
...
@@ -877,10 +877,10 @@ static void FlipCopyDXT5BlockFull(const unsigned int* source, unsigned int* dest
destBytes
[
1
]
=
sourceBytes
[
1
];
destBytes
[
1
]
=
sourceBytes
[
1
];
destBytes
[
2
]
=
line_3_2
&
0xff
;
destBytes
[
2
]
=
line_3_2
&
0xff
;
destBytes
[
3
]
=
(
line_3_2
&
0xff00
)
>>
8
;
destBytes
[
3
]
=
(
line_3_2
&
0xff00
)
>>
8
;
destBytes
[
4
]
=
(
line_3_2
&
0xff0000
)
>>
8
;
destBytes
[
4
]
=
(
line_3_2
&
0xff0000
)
>>
16
;
destBytes
[
5
]
=
line_1_0
&
0xff
;
destBytes
[
5
]
=
line_1_0
&
0xff
;
destBytes
[
6
]
=
(
line_1_0
&
0xff00
)
>>
8
;
destBytes
[
6
]
=
(
line_1_0
&
0xff00
)
>>
8
;
destBytes
[
7
]
=
(
line_1_0
&
0xff0000
)
>>
8
;
destBytes
[
7
]
=
(
line_1_0
&
0xff0000
)
>>
16
;
// And flip the DXT1 block using the above function.
// And flip the DXT1 block using the above function.
FlipCopyDXT1BlockFull
(
source
+
2
,
dest
+
2
);
FlipCopyDXT1BlockFull
(
source
+
2
,
dest
+
2
);
...
@@ -1036,7 +1036,7 @@ void Texture::loadDXT5ImageData(GLint xoffset, GLint yoffset, GLsizei width, GLs
...
@@ -1036,7 +1036,7 @@ void Texture::loadDXT5ImageData(GLint xoffset, GLint yoffset, GLsizei width, GLs
break
;
break
;
default
:
default
:
ASSERT
(
height
%
4
==
0
);
ASSERT
(
height
%
4
==
0
);
for
(
int
y
=
0
;
y
<
height
;
++
y
)
for
(
int
y
=
0
;
y
<
height
/
4
;
++
y
)
{
{
const
unsigned
int
*
source
=
reinterpret_cast
<
const
unsigned
int
*>
(
static_cast
<
const
unsigned
char
*>
(
input
)
+
y
*
inputPitch
);
const
unsigned
int
*
source
=
reinterpret_cast
<
const
unsigned
int
*>
(
static_cast
<
const
unsigned
char
*>
(
input
)
+
y
*
inputPitch
);
unsigned
int
*
dest
=
reinterpret_cast
<
unsigned
int
*>
(
static_cast
<
unsigned
char
*>
(
output
)
+
(
y
+
yoffset
)
*
outputPitch
+
xoffset
*
16
);
unsigned
int
*
dest
=
reinterpret_cast
<
unsigned
int
*>
(
static_cast
<
unsigned
char
*>
(
output
)
+
(
y
+
yoffset
)
*
outputPitch
+
xoffset
*
16
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment