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
6b794cbd
Commit
6b794cbd
authored
Jul 02, 2010
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jul 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Only perform sRGB write correction on formats that advertise it.
parent
d3a5242c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
context.c
dlls/wined3d/context.c
+5
-0
shader.c
dlls/wined3d/shader.c
+9
-4
utils.c
dlls/wined3d/utils.c
+3
-1
No files found.
dlls/wined3d/context.c
View file @
6b794cbd
...
...
@@ -2192,6 +2192,11 @@ static void context_setup_target(IWineD3DDeviceImpl *device,
{
Context_MarkStateDirty
(
context
,
STATE_RENDER
(
WINED3DRS_ALPHABLENDENABLE
),
StateTable
);
}
/* Update sRGB writing when switching between formats that do/do not support sRGB writing */
if
((
old
->
Flags
&
WINED3DFMT_FLAG_SRGB_WRITE
)
!=
(
new
->
Flags
&
WINED3DFMT_FLAG_SRGB_WRITE
))
{
Context_MarkStateDirty
(
context
,
STATE_RENDER
(
WINED3DRS_SRGBWRITEENABLE
),
StateTable
);
}
}
/* When switching away from an offscreen render target, and we're not
...
...
dlls/wined3d/shader.c
View file @
6b794cbd
...
...
@@ -2008,10 +2008,16 @@ void find_ps_compile_args(IWineD3DPixelShaderImpl *shader,
IWineD3DStateBlockImpl
*
stateblock
,
struct
ps_compile_args
*
args
)
{
IWineD3DBaseTextureImpl
*
texture
;
IWineD3DDeviceImpl
*
device
=
stateblock
->
device
;
UINT
i
;
memset
(
args
,
0
,
sizeof
(
*
args
));
/* FIXME: Make sure all bits are set. */
args
->
srgb_correction
=
stateblock
->
renderState
[
WINED3DRS_SRGBWRITEENABLE
]
?
1
:
0
;
if
(
stateblock
->
renderState
[
WINED3DRS_SRGBWRITEENABLE
])
{
IWineD3DSurfaceImpl
*
rt
=
device
->
render_targets
[
0
];
if
(
rt
->
resource
.
format_desc
->
Flags
&
WINED3DFMT_FLAG_SRGB_WRITE
)
args
->
srgb_correction
=
1
;
}
args
->
np2_fixup
=
0
;
for
(
i
=
0
;
i
<
MAX_FRAGMENT_SAMPLERS
;
++
i
)
...
...
@@ -2036,7 +2042,7 @@ void find_ps_compile_args(IWineD3DPixelShaderImpl *shader,
}
if
(
shader
->
baseShader
.
reg_maps
.
shader_version
.
major
>=
3
)
{
if
(
((
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
)
->
strided_streams
.
position_transformed
)
if
(
device
->
strided_streams
.
position_transformed
)
{
args
->
vp_mode
=
pretransformed
;
}
...
...
@@ -2058,8 +2064,7 @@ void find_ps_compile_args(IWineD3DPixelShaderImpl *shader,
switch
(
stateblock
->
renderState
[
WINED3DRS_FOGTABLEMODE
])
{
case
WINED3DFOG_NONE
:
if
(((
IWineD3DDeviceImpl
*
)
shader
->
baseShader
.
device
)
->
strided_streams
.
position_transformed
||
use_vs
(
stateblock
))
if
(
device
->
strided_streams
.
position_transformed
||
use_vs
(
stateblock
))
{
args
->
fog
=
FOG_LINEAR
;
break
;
...
...
dlls/wined3d/utils.c
View file @
6b794cbd
...
...
@@ -2698,6 +2698,7 @@ void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_setting
DWORD
ttff
;
DWORD
cop
,
aop
,
carg0
,
carg1
,
carg2
,
aarg0
,
aarg1
,
aarg2
;
IWineD3DDeviceImpl
*
device
=
stateblock
->
device
;
IWineD3DSurfaceImpl
*
rt
=
device
->
render_targets
[
0
];
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
for
(
i
=
0
;
i
<
gl_info
->
limits
.
texture_stages
;
++
i
)
...
...
@@ -2886,7 +2887,8 @@ void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_setting
break
;
}
}
if
(
stateblock
->
renderState
[
WINED3DRS_SRGBWRITEENABLE
])
{
if
(
stateblock
->
renderState
[
WINED3DRS_SRGBWRITEENABLE
]
&&
rt
->
resource
.
format_desc
->
Flags
&
WINED3DFMT_FLAG_SRGB_WRITE
)
{
settings
->
sRGB_write
=
1
;
}
else
{
settings
->
sRGB_write
=
0
;
...
...
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