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
b8a57423
Commit
b8a57423
authored
May 09, 2008
by
Alexander Dorofeyev
Committed by
Alexandre Julliard
May 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Set alpha to index even when there is no palette.
Fixes a failure in p8_primary_test when running with opengl ddraw renderer.
parent
ebf1f4e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
surface.c
dlls/wined3d/surface.c
+15
-11
No files found.
dlls/wined3d/surface.c
View file @
b8a57423
...
...
@@ -2088,17 +2088,21 @@ static void d3dfmt_p8_init_palette(IWineD3DSurfaceImpl *This, BYTE table[256][4]
/* In DirectDraw the palette is a property of the surface, there are no such things as device palettes. */
if
(
dxVersion
<=
7
)
{
ERR
(
"This code should never get entered for DirectDraw!, expect problems
\n
"
);
return
;
}
/* Direct3D >= 8 palette usage style: P8 textures use device palettes, palette entry format is A8R8G8B8,
alpha is stored in peFlags and may be used by the app if D3DPTEXTURECAPS_ALPHAPALETTE device
capability flag is present (wine does advertise this capability) */
for
(
i
=
0
;
i
<
256
;
i
++
)
{
table
[
i
][
0
]
=
device
->
palettes
[
device
->
currentPalette
][
i
].
peRed
;
table
[
i
][
1
]
=
device
->
palettes
[
device
->
currentPalette
][
i
].
peGreen
;
table
[
i
][
2
]
=
device
->
palettes
[
device
->
currentPalette
][
i
].
peBlue
;
table
[
i
][
3
]
=
device
->
palettes
[
device
->
currentPalette
][
i
].
peFlags
;
if
(
index_in_alpha
)
{
/* Guarantees that memory representation remains correct after sysmem<->texture transfers even if
there's no palette at this time. */
for
(
i
=
0
;
i
<
256
;
i
++
)
table
[
i
][
3
]
=
i
;
}
}
else
{
/* Direct3D >= 8 palette usage style: P8 textures use device palettes, palette entry format is A8R8G8B8,
alpha is stored in peFlags and may be used by the app if D3DPTEXTURECAPS_ALPHAPALETTE device
capability flag is present (wine does advertise this capability) */
for
(
i
=
0
;
i
<
256
;
i
++
)
{
table
[
i
][
0
]
=
device
->
palettes
[
device
->
currentPalette
][
i
].
peRed
;
table
[
i
][
1
]
=
device
->
palettes
[
device
->
currentPalette
][
i
].
peGreen
;
table
[
i
][
2
]
=
device
->
palettes
[
device
->
currentPalette
][
i
].
peBlue
;
table
[
i
][
3
]
=
device
->
palettes
[
device
->
currentPalette
][
i
].
peFlags
;
}
}
}
else
{
TRACE
(
"Using surface palette %p
\n
"
,
pal
);
...
...
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