Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
424e9c3e
Commit
424e9c3e
authored
Feb 05, 2008
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Feb 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Allow read back of P8 surfaces. This fixes some of the redrawing issues in Red Alert.
parent
f84589ea
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
surface.c
dlls/wined3d/surface.c
+15
-6
No files found.
dlls/wined3d/surface.c
View file @
424e9c3e
...
...
@@ -55,7 +55,8 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) {
return
;
}
if
(
This
->
Flags
&
SFLAG_CONVERTED
)
{
/* Only support read back of converted P8 surfaces */
if
(
This
->
Flags
&
SFLAG_CONVERTED
&&
(
This
->
resource
.
format
!=
WINED3DFMT_P8
))
{
FIXME
(
"Read back converted textures unsupported, format=%s
\n
"
,
debug_d3dformat
(
This
->
resource
.
format
));
return
;
}
...
...
@@ -86,9 +87,17 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) {
LEAVE_GL
();
}
else
{
void
*
mem
;
GLenum
format
=
This
->
glDescription
.
glFormat
;
GLenum
type
=
This
->
glDescription
.
glType
;
int
src_pitch
=
0
;
int
dst_pitch
=
0
;
/* In case of P8 the index is stored in the alpha component if the primary render target uses P8 */
if
(
This
->
resource
.
format
==
WINED3DFMT_P8
)
{
format
=
GL_ALPHA
;
type
=
GL_UNSIGNED_BYTE
;
}
if
(
This
->
Flags
&
SFLAG_NONPOW2
)
{
unsigned
char
alignment
=
This
->
resource
.
wineD3DDevice
->
surface_alignment
;
src_pitch
=
This
->
bytesPerPixel
*
This
->
pow2Width
;
...
...
@@ -100,21 +109,21 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) {
}
TRACE
(
"(%p) : Calling glGetTexImage level %d, format %#x, type %#x, data %p
\n
"
,
This
,
This
->
glDescription
.
level
,
This
->
glDescription
.
glFormat
,
This
->
glDescription
.
glT
ype
,
mem
);
format
,
t
ype
,
mem
);
if
(
This
->
Flags
&
SFLAG_PBO
)
{
GL_EXTCALL
(
glBindBufferARB
(
GL_PIXEL_PACK_BUFFER_ARB
,
This
->
pbo
));
checkGLcall
(
"glBindBufferARB"
);
glGetTexImage
(
This
->
glDescription
.
target
,
This
->
glDescription
.
level
,
This
->
glDescription
.
glF
ormat
,
This
->
glDescription
.
glT
ype
,
NULL
);
glGetTexImage
(
This
->
glDescription
.
target
,
This
->
glDescription
.
level
,
f
ormat
,
t
ype
,
NULL
);
checkGLcall
(
"glGetTexImage()"
);
GL_EXTCALL
(
glBindBufferARB
(
GL_PIXEL_PACK_BUFFER_ARB
,
0
));
checkGLcall
(
"glBindBufferARB"
);
}
else
{
glGetTexImage
(
This
->
glDescription
.
target
,
This
->
glDescription
.
level
,
This
->
glDescription
.
glF
ormat
,
This
->
glDescription
.
glT
ype
,
mem
);
glGetTexImage
(
This
->
glDescription
.
target
,
This
->
glDescription
.
level
,
f
ormat
,
t
ype
,
mem
);
checkGLcall
(
"glGetTexImage()"
);
}
LEAVE_GL
();
...
...
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