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
0fdce942
Commit
0fdce942
authored
May 16, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
May 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_context_gl structure to context_find_fbo_entry().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d9368933
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
context.c
dlls/wined3d/context.c
+13
-14
No files found.
dlls/wined3d/context.c
View file @
0fdce942
...
...
@@ -574,13 +574,12 @@ static void wined3d_context_gl_destroy_fbo_entry(struct wined3d_context_gl *cont
}
/* Context activation is done by the caller. */
static
struct
fbo_entry
*
context_find_fbo_entry
(
struct
wined3d_context
*
context
,
GLenum
target
,
static
struct
fbo_entry
*
wined3d_context_gl_find_fbo_entry
(
struct
wined3d_context_gl
*
context_gl
,
GLenum
target
,
const
struct
wined3d_rendertarget_info
*
render_targets
,
const
struct
wined3d_rendertarget_info
*
depth_stencil
,
DWORD
color_location
,
DWORD
ds_location
)
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
static
const
struct
wined3d_rendertarget_info
ds_null
=
{{
0
}};
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
=
context
_gl
->
c
.
gl_info
;
struct
wined3d_texture
*
rt_texture
,
*
ds_texture
;
struct
wined3d_fbo_entry_key
fbo_key
;
unsigned
int
i
,
ds_level
,
rt_level
;
...
...
@@ -614,11 +613,11 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context,
else
if
(
depth_stencil
->
resource
->
type
==
WINED3D_RTYPE_TEXTURE_2D
)
{
wined3d_texture_gl_set_compatible_renderbuffer
(
wined3d_texture_gl
(
ds_texture
),
context
,
ds_level
,
&
render_targets
[
0
]);
&
context_gl
->
c
,
ds_level
,
&
render_targets
[
0
]);
}
}
context_generate_fbo_key
(
context
,
&
fbo_key
,
render_targets
,
depth_stencil
,
color_location
,
ds_location
);
context_generate_fbo_key
(
&
context_gl
->
c
,
&
fbo_key
,
render_targets
,
depth_stencil
,
color_location
,
ds_location
);
if
(
TRACE_ON
(
d3d
))
{
...
...
@@ -676,29 +675,29 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context,
}
}
LIST_FOR_EACH_ENTRY
(
entry
,
&
context
->
fbo_list
,
struct
fbo_entry
,
entry
)
LIST_FOR_EACH_ENTRY
(
entry
,
&
context
_gl
->
c
.
fbo_list
,
struct
fbo_entry
,
entry
)
{
if
(
memcmp
(
&
fbo_key
,
&
entry
->
key
,
sizeof
(
fbo_key
)))
continue
;
list_remove
(
&
entry
->
entry
);
list_add_head
(
&
context
->
fbo_list
,
&
entry
->
entry
);
list_add_head
(
&
context
_gl
->
c
.
fbo_list
,
&
entry
->
entry
);
return
entry
;
}
if
(
context
->
fbo_entry_count
<
WINED3D_MAX_FBO_ENTRIES
)
if
(
context
_gl
->
c
.
fbo_entry_count
<
WINED3D_MAX_FBO_ENTRIES
)
{
entry
=
context_create_fbo_entry
(
context
,
render_targets
,
depth_stencil
,
color_location
,
ds_location
);
list_add_head
(
&
context
->
fbo_list
,
&
entry
->
entry
);
++
context
->
fbo_entry_count
;
entry
=
context_create_fbo_entry
(
&
context_gl
->
c
,
render_targets
,
depth_stencil
,
color_location
,
ds_location
);
list_add_head
(
&
context
_gl
->
c
.
fbo_list
,
&
entry
->
entry
);
++
context
_gl
->
c
.
fbo_entry_count
;
}
else
{
entry
=
LIST_ENTRY
(
list_tail
(
&
context
->
fbo_list
),
struct
fbo_entry
,
entry
);
entry
=
LIST_ENTRY
(
list_tail
(
&
context
_gl
->
c
.
fbo_list
),
struct
fbo_entry
,
entry
);
wined3d_context_gl_reuse_fbo_entry
(
context_gl
,
target
,
render_targets
,
depth_stencil
,
color_location
,
ds_location
,
entry
);
list_remove
(
&
entry
->
entry
);
list_add_head
(
&
context
->
fbo_list
,
&
entry
->
entry
);
list_add_head
(
&
context
_gl
->
c
.
fbo_list
,
&
entry
->
entry
);
}
return
entry
;
...
...
@@ -783,7 +782,7 @@ static void context_apply_fbo_state(struct wined3d_context *context, GLenum targ
}
else
{
context
->
current_fbo
=
context_find_fbo_entry
(
context
,
target
,
context
->
current_fbo
=
wined3d_context_gl_find_fbo_entry
(
context_gl
,
target
,
render_targets
,
depth_stencil
,
color_location
,
ds_location
);
context_apply_fbo_entry
(
context
,
target
,
context
->
current_fbo
);
}
...
...
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