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
718c6149
Commit
718c6149
authored
Jul 02, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jul 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a struct wined3d_fb_state * to context_apply_clear_state.
parent
053071e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
context.c
dlls/wined3d/context.c
+6
-5
device.c
dlls/wined3d/device.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+7
-7
No files found.
dlls/wined3d/context.c
View file @
718c6149
...
...
@@ -2083,19 +2083,20 @@ static BOOL context_validate_rt_config(UINT rt_count,
/* Context activation is done by the caller. */
BOOL
context_apply_clear_state
(
struct
wined3d_context
*
context
,
struct
wined3d_device
*
device
,
UINT
rt_count
,
struct
wined3d_surface
**
rts
,
struct
wined3d_surface
*
depth_stencil
)
UINT
rt_count
,
const
struct
wined3d_fb_state
*
fb
)
{
const
struct
StateEntry
*
state_table
=
device
->
StateTable
;
DWORD
rt_mask
=
0
;
UINT
i
;
struct
wined3d_surface
**
rts
=
fb
->
render_targets
;
if
(
!
context_validate_rt_config
(
rt_count
,
rts
,
depth_stencil
))
if
(
!
context_validate_rt_config
(
rt_count
,
rts
,
fb
->
depth_stencil
))
return
FALSE
;
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
)
{
context_validate_onscreen_formats
(
device
,
context
,
depth_stencil
);
context_validate_onscreen_formats
(
device
,
context
,
fb
->
depth_stencil
);
ENTER_GL
();
...
...
@@ -2112,7 +2113,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d
context
->
blit_targets
[
i
]
=
NULL
;
++
i
;
}
context_apply_fbo_state
(
context
,
GL_FRAMEBUFFER
,
context
->
blit_targets
,
depth_stencil
,
SFLAG_INTEXTURE
);
context_apply_fbo_state
(
context
,
GL_FRAMEBUFFER
,
context
->
blit_targets
,
fb
->
depth_stencil
,
SFLAG_INTEXTURE
);
glReadBuffer
(
GL_NONE
);
checkGLcall
(
"glReadBuffer"
);
}
...
...
@@ -2124,7 +2125,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d
LEAVE_GL
();
/* TODO: This is not necessary if the
rts are the device's current targets
*/
/* TODO: This is not necessary if the
framebuffer is the device's current framebuffer
*/
context_invalidate_state
(
context
,
STATE_FRAMEBUFFER
,
device
->
StateTable
);
}
else
...
...
dlls/wined3d/device.c
View file @
718c6149
...
...
@@ -685,7 +685,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
return
WINED3D_OK
;
}
if
(
!
context_apply_clear_state
(
context
,
device
,
rt_count
,
fb
->
render_targets
,
fb
->
depth_stencil
))
if
(
!
context_apply_clear_state
(
context
,
device
,
rt_count
,
fb
))
{
context_release
(
context
);
WARN
(
"Failed to apply clear state, skipping clear.
\n
"
);
...
...
dlls/wined3d/wined3d_private.h
View file @
718c6149
...
...
@@ -1130,6 +1130,12 @@ struct wined3d_context
GLuint
dummy_arbfp_prog
;
};
struct
wined3d_fb_state
{
struct
wined3d_surface
**
render_targets
;
struct
wined3d_surface
*
depth_stencil
;
};
typedef
void
(
*
APPLYSTATEFUNC
)(
DWORD
state
,
struct
wined3d_stateblock
*
stateblock
,
struct
wined3d_context
*
ctx
);
struct
StateEntry
...
...
@@ -1223,7 +1229,7 @@ void context_alloc_occlusion_query(struct wined3d_context *context,
struct
wined3d_occlusion_query
*
query
)
DECLSPEC_HIDDEN
;
void
context_apply_blit_state
(
struct
wined3d_context
*
context
,
struct
wined3d_device
*
device
)
DECLSPEC_HIDDEN
;
BOOL
context_apply_clear_state
(
struct
wined3d_context
*
context
,
struct
wined3d_device
*
device
,
UINT
rt_count
,
struct
wined3d_surface
**
rts
,
struct
wined3d_surface
*
depth_stencil
)
DECLSPEC_HIDDEN
;
UINT
rt_count
,
const
struct
wined3d_fb_state
*
fb
)
DECLSPEC_HIDDEN
;
BOOL
context_apply_draw_state
(
struct
wined3d_context
*
context
,
struct
wined3d_device
*
device
)
DECLSPEC_HIDDEN
;
void
context_apply_fbo_state_blit
(
struct
wined3d_context
*
context
,
GLenum
target
,
struct
wined3d_surface
*
render_target
,
struct
wined3d_surface
*
depth_stencil
,
DWORD
location
)
DECLSPEC_HIDDEN
;
...
...
@@ -1613,12 +1619,6 @@ void wined3d_unregister_window(HWND window) DECLSPEC_HIDDEN;
/* Multithreaded flag. Removed from the public header to signal that IWineD3D::CreateDevice ignores it */
#define WINED3DCREATE_MULTITHREADED 0x00000004
struct
wined3d_fb_state
{
struct
wined3d_surface
**
render_targets
;
struct
wined3d_surface
*
depth_stencil
;
};
struct
wined3d_device
{
LONG
ref
;
...
...
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