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
c1cca63e
Commit
c1cca63e
authored
May 13, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Always store the palette index in the alpha component.
parent
eb4d5c7a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
39 deletions
+1
-39
surface.c
dlls/wined3d/surface.c
+0
-0
utils.c
dlls/wined3d/utils.c
+1
-34
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-5
No files found.
dlls/wined3d/surface.c
View file @
c1cca63e
This diff is collapsed.
Click to expand it.
dlls/wined3d/utils.c
View file @
c1cca63e
...
...
@@ -3064,6 +3064,7 @@ DWORD wined3d_format_convert_from_float(const struct wined3d_surface *surface, c
{
WINED3DFMT_R8G8B8X8_UNORM
,
255
.
0
f
,
255
.
0
f
,
255
.
0
f
,
255
.
0
f
,
0
,
8
,
16
,
24
},
{
WINED3DFMT_B10G10R10A2_UNORM
,
1023
.
0
f
,
1023
.
0
f
,
1023
.
0
f
,
3
.
0
f
,
20
,
10
,
0
,
30
},
{
WINED3DFMT_R10G10B10A2_UNORM
,
1023
.
0
f
,
1023
.
0
f
,
1023
.
0
f
,
3
.
0
f
,
0
,
10
,
20
,
30
},
{
WINED3DFMT_P8_UINT
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
255
.
0
f
,
0
,
0
,
0
,
0
},
};
const
struct
wined3d_format
*
format
=
surface
->
resource
.
format
;
unsigned
int
i
;
...
...
@@ -3087,40 +3088,6 @@ DWORD wined3d_format_convert_from_float(const struct wined3d_surface *surface, c
return
ret
;
}
if
(
format
->
id
==
WINED3DFMT_P8_UINT
)
{
const
RGBQUAD
*
e
;
BYTE
r
,
g
,
b
,
a
;
if
(
!
surface
->
palette
)
{
WARN
(
"Surface doesn't have a palette, returning 0.
\n
"
);
return
0
;
}
r
=
(
BYTE
)((
color
->
r
*
255
.
0
f
)
+
0
.
5
f
);
g
=
(
BYTE
)((
color
->
g
*
255
.
0
f
)
+
0
.
5
f
);
b
=
(
BYTE
)((
color
->
b
*
255
.
0
f
)
+
0
.
5
f
);
a
=
(
BYTE
)((
color
->
a
*
255
.
0
f
)
+
0
.
5
f
);
e
=
&
surface
->
palette
->
colors
[
a
];
if
(
e
->
rgbRed
==
r
&&
e
->
rgbGreen
==
g
&&
e
->
rgbBlue
==
b
)
return
a
;
WARN
(
"Alpha didn't match index, searching full palette.
\n
"
);
for
(
i
=
0
;
i
<
256
;
++
i
)
{
e
=
&
surface
->
palette
->
colors
[
i
];
if
(
e
->
rgbRed
==
r
&&
e
->
rgbGreen
==
g
&&
e
->
rgbBlue
==
b
)
return
i
;
}
FIXME
(
"Unable to convert color to palette index.
\n
"
);
return
0
;
}
FIXME
(
"Conversion for format %s not implemented.
\n
"
,
debug_d3dformat
(
format
->
id
));
return
0
;
...
...
dlls/wined3d/wined3d_private.h
View file @
c1cca63e
...
...
@@ -2636,11 +2636,6 @@ struct wined3d_swapchain
HWND
backup_wnd
;
};
static
inline
BOOL
swapchain_is_p8
(
const
struct
wined3d_swapchain
*
swapchain
)
{
return
swapchain
->
desc
.
backbuffer_format
==
WINED3DFMT_P8_UINT
;
}
void
x11_copy_to_screen
(
const
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
rect
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
swapchain_get_context
(
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
...
...
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