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
0143fa73
Commit
0143fa73
authored
May 18, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
May 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the requested sRGB mode in texture3d_preload().
parent
6d6402af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
texture.c
dlls/wined3d/texture.c
+17
-16
No files found.
dlls/wined3d/texture.c
View file @
0143fa73
...
...
@@ -664,6 +664,21 @@ static HRESULT texture2d_bind(struct wined3d_texture *texture,
return
hr
;
}
static
BOOL
texture_srgb_mode
(
struct
wined3d_texture
*
texture
,
enum
WINED3DSRGB
srgb
)
{
switch
(
srgb
)
{
case
SRGB_RGB
:
return
FALSE
;
case
SRGB_SRGB
:
return
TRUE
;
default:
return
texture
->
flags
&
WINED3D_TEXTURE_IS_SRGB
;
}
}
/* Do not call while under the GL lock. */
static
void
texture2d_preload
(
struct
wined3d_texture
*
texture
,
enum
WINED3DSRGB
srgb
)
{
...
...
@@ -677,21 +692,7 @@ static void texture2d_preload(struct wined3d_texture *texture, enum WINED3DSRGB
TRACE
(
"texture %p, srgb %#x.
\n
"
,
texture
,
srgb
);
switch
(
srgb
)
{
case
SRGB_RGB
:
srgb_mode
=
FALSE
;
break
;
case
SRGB_SRGB
:
srgb_mode
=
TRUE
;
break
;
default:
srgb_mode
=
texture
->
flags
&
WINED3D_TEXTURE_IS_SRGB
;
break
;
}
srgb_mode
=
texture_srgb_mode
(
texture
,
srgb
);
gl_tex
=
wined3d_texture_get_gl_texture
(
texture
,
gl_info
,
srgb_mode
);
if
(
!
device
->
isInDraw
)
...
...
@@ -1095,7 +1096,7 @@ static void texture3d_preload(struct wined3d_texture *texture, enum WINED3DSRGB
else
if
(
texture
->
bind_count
>
0
)
{
BOOL
texture_srgb
=
texture
->
flags
&
WINED3D_TEXTURE_IS_SRGB
;
BOOL
sampler_srgb
=
device
->
stateBlock
->
state
.
sampler_states
[
texture
->
sampler
][
WINED3DSAMP_SRGBTEXTURE
]
;
BOOL
sampler_srgb
=
texture_srgb_mode
(
texture
,
srgb
)
;
srgb_was_toggled
=
!
texture_srgb
!=
!
sampler_srgb
;
if
(
srgb_was_toggled
)
...
...
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