Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cf1c641c
Commit
cf1c641c
authored
Aug 02, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix switching color keying on / off.
parent
e4efcea2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
surface.c
dlls/wined3d/surface.c
+11
-6
No files found.
dlls/wined3d/surface.c
View file @
cf1c641c
...
...
@@ -2539,6 +2539,7 @@ static BOOL surface_convert_color_to_float(const struct wined3d_surface *surface
HRESULT
surface_load
(
struct
wined3d_surface
*
surface
,
BOOL
srgb
)
{
DWORD
flag
=
srgb
?
SFLAG_INSRGBTEX
:
SFLAG_INTEXTURE
;
BOOL
ck_changed
;
TRACE
(
"surface %p, srgb %#x.
\n
"
,
surface
,
srgb
);
...
...
@@ -2548,14 +2549,11 @@ HRESULT surface_load(struct wined3d_surface *surface, BOOL srgb)
return
WINED3DERR_INVALIDCALL
;
}
if
(
!
(
surface
->
flags
&
flag
))
{
TRACE
(
"Reloading because surface is dirty
\n
"
);
}
ck_changed
=
!
(
surface
->
flags
&
SFLAG_GLCKEY
)
!=
!
(
surface
->
CKeyFlags
&
WINEDDSD_CKSRCBLT
);
/* Reload if either the texture and sysmem have different ideas about the
* color key, or the actual key values changed. */
else
if
(
!
(
surface
->
flags
&
SFLAG_GLCKEY
)
!=
!
(
surface
->
CKeyFlags
&
WINEDDSD_CKSRCBLT
)
||
((
surface
->
CKeyFlags
&
WINEDDSD_CKSRCBLT
)
if
(
ck_changed
||
((
surface
->
CKeyFlags
&
WINEDDSD_CKSRCBLT
)
&&
(
surface
->
glCKey
.
dwColorSpaceLowValue
!=
surface
->
SrcBltCKey
.
dwColorSpaceLowValue
||
surface
->
glCKey
.
dwColorSpaceHighValue
!=
surface
->
SrcBltCKey
.
dwColorSpaceHighValue
)))
{
...
...
@@ -2568,6 +2566,13 @@ HRESULT surface_load(struct wined3d_surface *surface, BOOL srgb)
* this kills performance though :( */
/* TODO: This is not necessarily needed with hw palettized texture support. */
surface_modify_location
(
surface
,
SFLAG_INSYSMEM
,
TRUE
);
/* Switching color keying on / off may change the internal format. */
if
(
ck_changed
)
surface_force_reload
(
surface
);
}
else
if
(
!
(
surface
->
flags
&
flag
))
{
TRACE
(
"Reloading because surface is dirty.
\n
"
);
}
else
{
...
...
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