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
4a9d8fed
Commit
4a9d8fed
authored
Jun 03, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_context_gl strcuture to find_draw_buffers_mask().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8b6b124e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
context.c
dlls/wined3d/context.c
+6
-7
No files found.
dlls/wined3d/context.c
View file @
4a9d8fed
...
@@ -3141,18 +3141,17 @@ BOOL wined3d_context_gl_apply_clear_state(struct wined3d_context_gl *context_gl,
...
@@ -3141,18 +3141,17 @@ BOOL wined3d_context_gl_apply_clear_state(struct wined3d_context_gl *context_gl,
return
TRUE
;
return
TRUE
;
}
}
static
u
nsigned
int
find_draw_buffers_mask
(
const
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
)
static
u
int32_t
find_draw_buffers_mask
(
const
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_state
*
state
)
{
{
const
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl_const
(
context
);
struct
wined3d_rendertarget_view
*
const
*
rts
=
state
->
fb
->
render_targets
;
struct
wined3d_rendertarget_view
*
const
*
rts
=
state
->
fb
->
render_targets
;
struct
wined3d_shader
*
ps
=
state
->
shader
[
WINED3D_SHADER_TYPE_PIXEL
];
struct
wined3d_shader
*
ps
=
state
->
shader
[
WINED3D_SHADER_TYPE_PIXEL
];
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
=
context
_gl
->
c
.
gl_info
;
unsigned
int
rt_mask
,
mask
;
unsigned
int
rt_mask
,
mask
;
unsigned
int
i
;
unsigned
int
i
;
if
(
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
)
if
(
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
)
return
wined3d_context_gl_generate_rt_mask_no_fbo
(
context_gl
,
rts
[
0
]
->
resource
);
return
wined3d_context_gl_generate_rt_mask_no_fbo
(
context_gl
,
rts
[
0
]
->
resource
);
else
if
(
!
context
->
render_offscreen
)
else
if
(
!
context
_gl
->
c
.
render_offscreen
)
return
context_generate_rt_mask_from_resource
(
rts
[
0
]
->
resource
);
return
context_generate_rt_mask_from_resource
(
rts
[
0
]
->
resource
);
rt_mask
=
ps
?
ps
->
reg_maps
.
rt_mask
:
1
;
rt_mask
=
ps
?
ps
->
reg_maps
.
rt_mask
:
1
;
...
@@ -3173,7 +3172,7 @@ static unsigned int find_draw_buffers_mask(const struct wined3d_context *context
...
@@ -3173,7 +3172,7 @@ static unsigned int find_draw_buffers_mask(const struct wined3d_context *context
void
context_state_fb
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
void
context_state_fb
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
u
nsigned
int
rt_mask
=
find_draw_buffers_mask
(
context
,
state
);
u
int32_t
rt_mask
=
find_draw_buffers_mask
(
context_gl
,
state
);
const
struct
wined3d_fb_state
*
fb
=
state
->
fb
;
const
struct
wined3d_fb_state
*
fb
=
state
->
fb
;
DWORD
color_location
=
0
;
DWORD
color_location
=
0
;
DWORD
*
cur_mask
;
DWORD
*
cur_mask
;
...
@@ -3473,12 +3472,12 @@ static void wined3d_context_gl_update_tex_unit_map(struct wined3d_context_gl *co
...
@@ -3473,12 +3472,12 @@ static void wined3d_context_gl_update_tex_unit_map(struct wined3d_context_gl *co
void
context_state_drawbuf
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
void
context_state_drawbuf
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
DWORD
rt_mask
,
*
cur_mask
;
uint32_t
rt_mask
,
*
cur_mask
;
if
(
isStateDirty
(
context
,
STATE_FRAMEBUFFER
))
return
;
if
(
isStateDirty
(
context
,
STATE_FRAMEBUFFER
))
return
;
cur_mask
=
context_gl
->
current_fbo
?
&
context_gl
->
current_fbo
->
rt_mask
:
&
context_gl
->
draw_buffers_mask
;
cur_mask
=
context_gl
->
current_fbo
?
&
context_gl
->
current_fbo
->
rt_mask
:
&
context_gl
->
draw_buffers_mask
;
rt_mask
=
find_draw_buffers_mask
(
context
,
state
);
rt_mask
=
find_draw_buffers_mask
(
context
_gl
,
state
);
if
(
rt_mask
!=
*
cur_mask
)
if
(
rt_mask
!=
*
cur_mask
)
{
{
context_apply_draw_buffers
(
context
,
rt_mask
);
context_apply_draw_buffers
(
context
,
rt_mask
);
...
...
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