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
4fbaab20
Commit
4fbaab20
authored
Apr 23, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 23, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Shadow format flags in wined3d_rendertarget_view.
parent
a457b5e0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
8 deletions
+10
-8
shader.c
dlls/wined3d/shader.c
+2
-2
state.c
dlls/wined3d/state.c
+4
-4
utils.c
dlls/wined3d/utils.c
+2
-2
view.c
dlls/wined3d/view.c
+1
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/shader.c
View file @
4fbaab20
...
...
@@ -2344,8 +2344,8 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3
memset
(
args
,
0
,
sizeof
(
*
args
));
/* FIXME: Make sure all bits are set. */
if
(
!
gl_info
->
supported
[
ARB_FRAMEBUFFER_SRGB
]
&&
state
->
render_states
[
WINED3D_RS_SRGBWRITEENABLE
])
{
const
struct
wined3d_format
*
rt_format
=
state
->
fb
->
render_targets
[
0
]
->
format
;
if
(
rt_f
ormat
->
flags
&
WINED3DFMT_FLAG_SRGB_WRITE
)
unsigned
int
rt_fmt_flags
=
state
->
fb
->
render_targets
[
0
]
->
format_flags
;
if
(
rt_f
mt_
flags
&
WINED3DFMT_FLAG_SRGB_WRITE
)
{
static
unsigned
int
warned
=
0
;
...
...
dlls/wined3d/state.c
View file @
4fbaab20
...
...
@@ -368,6 +368,7 @@ static GLenum gl_blend_factor(enum wined3d_blend factor, const struct wined3d_fo
static
void
state_blend
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
const
struct
wined3d_format
*
rt_format
=
state
->
fb
->
render_targets
[
0
]
->
format
;
unsigned
int
rt_fmt_flags
=
state
->
fb
->
render_targets
[
0
]
->
format_flags
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
GLenum
srcBlend
,
dstBlend
;
enum
wined3d_blend
d3d_blend
;
...
...
@@ -381,7 +382,7 @@ static void state_blend(struct wined3d_context *context, const struct wined3d_st
/* Disable blending in all cases even without pixelshaders.
* With blending on we could face a big performance penalty.
* The d3d9 visual test confirms the behavior. */
if
(
context
->
render_offscreen
&&
!
(
rt_f
ormat
->
flags
&
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
))
if
(
context
->
render_offscreen
&&
!
(
rt_f
mt_
flags
&
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
))
{
gl_info
->
gl_ops
.
gl
.
p_glDisable
(
GL_BLEND
);
checkGLcall
(
"glDisable GL_BLEND"
);
...
...
@@ -4899,13 +4900,12 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
void
state_srgbwrite
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
const
struct
wined3d_format
*
rt_format
=
state
->
fb
->
render_targets
[
0
]
->
format
;
unsigned
int
rt_fmt_flags
=
state
->
fb
->
render_targets
[
0
]
->
format_flags
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
TRACE
(
"context %p, state %p, state_id %#x.
\n
"
,
context
,
state
,
state_id
);
if
(
state
->
render_states
[
WINED3D_RS_SRGBWRITEENABLE
]
&&
rt_format
->
flags
&
WINED3DFMT_FLAG_SRGB_WRITE
)
if
(
state
->
render_states
[
WINED3D_RS_SRGBWRITEENABLE
]
&&
rt_fmt_flags
&
WINED3DFMT_FLAG_SRGB_WRITE
)
gl_info
->
gl_ops
.
gl
.
p_glEnable
(
GL_FRAMEBUFFER_SRGB
);
else
gl_info
->
gl_ops
.
gl
.
p_glDisable
(
GL_FRAMEBUFFER_SRGB
);
...
...
dlls/wined3d/utils.c
View file @
4fbaab20
...
...
@@ -3686,7 +3686,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
unsigned
int
i
;
DWORD
ttff
;
DWORD
cop
,
aop
,
carg0
,
carg1
,
carg2
,
aarg0
,
aarg1
,
aarg2
;
const
struct
wined3d_format
*
rt_format
=
state
->
fb
->
render_targets
[
0
]
->
format
;
unsigned
int
rt_fmt_flags
=
state
->
fb
->
render_targets
[
0
]
->
format_flags
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
const
struct
wined3d_d3d_info
*
d3d_info
=
context
->
d3d_info
;
...
...
@@ -3902,7 +3902,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
}
if
(
!
gl_info
->
supported
[
ARB_FRAMEBUFFER_SRGB
]
&&
state
->
render_states
[
WINED3D_RS_SRGBWRITEENABLE
]
&&
rt_f
ormat
->
flags
&
WINED3DFMT_FLAG_SRGB_WRITE
)
&&
rt_f
mt_
flags
&
WINED3DFMT_FLAG_SRGB_WRITE
)
{
settings
->
sRGB_write
=
1
;
}
else
{
...
...
dlls/wined3d/view.c
View file @
4fbaab20
...
...
@@ -101,6 +101,7 @@ static void wined3d_rendertarget_view_init(struct wined3d_rendertarget_view *vie
view
->
parent_ops
=
parent_ops
;
view
->
format
=
wined3d_get_format
(
gl_info
,
desc
->
format_id
);
view
->
format_flags
=
view
->
format
->
flags
;
if
(
resource
->
type
==
WINED3D_RTYPE_BUFFER
)
{
view
->
sub_resource_idx
=
0
;
...
...
dlls/wined3d/wined3d_private.h
View file @
4fbaab20
...
...
@@ -2692,6 +2692,7 @@ struct wined3d_rendertarget_view
const
struct
wined3d_parent_ops
*
parent_ops
;
const
struct
wined3d_format
*
format
;
unsigned
int
format_flags
;
unsigned
int
sub_resource_idx
;
unsigned
int
buffer_offset
;
...
...
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