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
94cd8c27
Commit
94cd8c27
authored
Nov 28, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 30, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove the X channel fixup in render target unlocking.
parent
db24d3af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
50 deletions
+9
-50
surface.c
dlls/wined3d/surface.c
+9
-50
No files found.
dlls/wined3d/surface.c
View file @
94cd8c27
...
...
@@ -1002,64 +1002,23 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This) {
case
WINED3DFMT_R5G6B5
:
case
WINED3DFMT_A1R5G5B5
:
case
WINED3DFMT_R8G8B8
:
type
=
This
->
glDescription
.
glType
;
fmt
=
This
->
glDescription
.
glFormat
;
mem
=
This
->
resource
.
allocatedMemory
;
bpp
=
This
->
bytesPerPixel
;
break
;
case
WINED3DFMT_X4R4G4B4
:
{
int
size
;
unsigned
short
*
data
;
data
=
(
unsigned
short
*
)
This
->
resource
.
allocatedMemory
;
size
=
(
This
->
lockedRect
.
bottom
-
This
->
lockedRect
.
top
)
*
(
This
->
lockedRect
.
right
-
This
->
lockedRect
.
left
);
while
(
size
>
0
)
{
*
data
|=
0xF000
;
data
++
;
size
--
;
}
type
=
This
->
glDescription
.
glType
;
fmt
=
This
->
glDescription
.
glFormat
;
mem
=
This
->
resource
.
allocatedMemory
;
bpp
=
This
->
bytesPerPixel
;
}
break
;
case
WINED3DFMT_X1R5G5B5
:
{
int
size
;
unsigned
short
*
data
;
data
=
(
unsigned
short
*
)
This
->
resource
.
allocatedMemory
;
size
=
(
This
->
lockedRect
.
bottom
-
This
->
lockedRect
.
top
)
*
(
This
->
lockedRect
.
right
-
This
->
lockedRect
.
left
);
while
(
size
>
0
)
{
*
data
|=
0x8000
;
data
++
;
size
--
;
}
type
=
This
->
glDescription
.
glType
;
fmt
=
This
->
glDescription
.
glFormat
;
mem
=
This
->
resource
.
allocatedMemory
;
bpp
=
This
->
bytesPerPixel
;
}
break
;
break
;
/* In the past times we used to set the X channel of X8R8G8B8 and the above formats to
* 1.0 because it happened to fix the intro movie in Pirates. However, this seems wrong.
* If the game uses an X8R8G8B8 back buffer the GL alpha channel should not make any differences,
* and the bug must be somewhere else. If we really have to set the alpha channel to 1.0 in
* this case do it by clearing it after the draw instead of fixing it up in the CPU. Blending
* is disabled via CTXUSAGE_BLIT context setup, so in the glDrawPixels call it does not
* have any effects
*/
case
WINED3DFMT_X8R8G8B8
:
{
/* make sure the X byte is set to alpha on, since it
could be any random value. This fixes the intro movie in Pirates! */
int
size
;
unsigned
int
*
data
;
data
=
(
unsigned
int
*
)
This
->
resource
.
allocatedMemory
;
size
=
(
This
->
lockedRect
.
bottom
-
This
->
lockedRect
.
top
)
*
(
This
->
lockedRect
.
right
-
This
->
lockedRect
.
left
);
while
(
size
>
0
)
{
*
data
|=
0xFF000000
;
data
++
;
size
--
;
}
}
/* Fall through */
case
WINED3DFMT_A8R8G8B8
:
{
glPixelStorei
(
GL_PACK_SWAP_BYTES
,
TRUE
);
...
...
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