Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e57b20c2
Commit
e57b20c2
authored
Aug 23, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Keep track of a surface's "draw location".
parent
f73593c5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
3 deletions
+30
-3
context.c
dlls/wined3d/context.c
+1
-0
device.c
dlls/wined3d/device.c
+1
-0
drawprim.c
dlls/wined3d/drawprim.c
+3
-3
surface.c
dlls/wined3d/surface.c
+9
-0
swapchain.c
dlls/wined3d/swapchain.c
+13
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-0
No files found.
dlls/wined3d/context.c
View file @
e57b20c2
...
...
@@ -1930,6 +1930,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context,
/* The currently active context is the necessary context to access the swapchain's onscreen buffers */
surface_load_location
(
context
->
current_rt
,
SFLAG_INTEXTURE
,
NULL
);
swapchain
->
render_to_fbo
=
TRUE
;
swapchain_update_draw_bindings
(
swapchain
);
context_set_render_offscreen
(
context
,
TRUE
);
}
...
...
dlls/wined3d/device.c
View file @
e57b20c2
...
...
@@ -5880,6 +5880,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
stateblock_init_default_state
(
device
->
stateBlock
);
swapchain_update_render_to_fbo
(
swapchain
);
swapchain_update_draw_bindings
(
swapchain
);
hr
=
create_primary_opengl_context
(
device
,
swapchain
);
wined3d_swapchain_decref
(
swapchain
);
...
...
dlls/wined3d/drawprim.c
View file @
e57b20c2
...
...
@@ -591,8 +591,8 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
struct
wined3d_surface
*
target
=
device
->
fb
.
render_targets
[
i
];
if
(
target
)
{
surface_load_location
(
target
,
SFLAG_INDRAWABLE
,
NULL
);
surface_modify_location
(
target
,
SFLAG_INDRAWABLE
,
TRUE
);
surface_load_location
(
target
,
target
->
draw_binding
,
NULL
);
surface_modify_location
(
target
,
target
->
draw_binding
,
TRUE
);
}
}
}
...
...
@@ -638,7 +638,7 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
if
(
state
->
render_states
[
WINED3DRS_ZWRITEENABLE
])
{
surface_modify_ds_location
(
ds
,
location
,
ds
->
ds_current_size
.
cx
,
ds
->
ds_current_size
.
cy
);
surface_modify_location
(
ds
,
SFLAG_INDRAWABLE
,
TRUE
);
surface_modify_location
(
ds
,
ds
->
draw_binding
,
TRUE
);
}
}
}
...
...
dlls/wined3d/surface.c
View file @
e57b20c2
...
...
@@ -100,6 +100,14 @@ static void surface_cleanup(struct wined3d_surface *surface)
resource_cleanup
(
&
surface
->
resource
);
}
void
surface_update_draw_binding
(
struct
wined3d_surface
*
surface
)
{
if
(
!
surface_is_offscreen
(
surface
)
||
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
)
surface
->
draw_binding
=
SFLAG_INDRAWABLE
;
else
surface
->
draw_binding
=
SFLAG_INTEXTURE
;
}
void
surface_set_container
(
struct
wined3d_surface
*
surface
,
enum
wined3d_container_type
type
,
void
*
container
)
{
TRACE
(
"surface %p, container %p.
\n
"
,
surface
,
container
);
...
...
@@ -131,6 +139,7 @@ void surface_set_container(struct wined3d_surface *surface, enum wined3d_contain
surface
->
container
.
type
=
type
;
surface
->
container
.
u
.
base
=
container
;
surface_update_draw_binding
(
surface
);
}
struct
blt_info
...
...
dlls/wined3d/swapchain.c
View file @
e57b20c2
...
...
@@ -518,6 +518,7 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
surface_load_location
(
swapchain
->
back_buffers
[
0
],
SFLAG_INTEXTURE
,
NULL
);
surface_modify_location
(
swapchain
->
back_buffers
[
0
],
SFLAG_INDRAWABLE
,
FALSE
);
swapchain
->
render_to_fbo
=
TRUE
;
swapchain_update_draw_bindings
(
swapchain
);
}
if
(
swapchain
->
render_to_fbo
)
...
...
@@ -1245,3 +1246,15 @@ HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain)
return
swapchain
->
backup_dc
;
}
void
swapchain_update_draw_bindings
(
struct
wined3d_swapchain
*
swapchain
)
{
UINT
i
;
surface_update_draw_binding
(
swapchain
->
front_buffer
);
for
(
i
=
0
;
i
<
swapchain
->
presentParms
.
BackBufferCount
;
++
i
)
{
surface_update_draw_binding
(
swapchain
->
back_buffers
[
i
]);
}
}
dlls/wined3d/wined3d_private.h
View file @
e57b20c2
...
...
@@ -1996,6 +1996,7 @@ struct wined3d_surface
struct
wined3d_subresource_container
container
;
struct
wined3d_palette
*
palette
;
/* D3D7 style palette handling */
PALETTEENTRY
*
palette9
;
/* D3D8/9 style palette handling */
DWORD
draw_binding
;
DWORD
flags
;
...
...
@@ -2080,6 +2081,7 @@ void surface_set_container(struct wined3d_surface *surface,
void
surface_set_texture_name
(
struct
wined3d_surface
*
surface
,
GLuint
name
,
BOOL
srgb_name
)
DECLSPEC_HIDDEN
;
void
surface_set_texture_target
(
struct
wined3d_surface
*
surface
,
GLenum
target
)
DECLSPEC_HIDDEN
;
void
surface_translate_drawable_coords
(
const
struct
wined3d_surface
*
surface
,
HWND
window
,
RECT
*
rect
)
DECLSPEC_HIDDEN
;
void
surface_update_draw_binding
(
struct
wined3d_surface
*
surface
)
DECLSPEC_HIDDEN
;
void
surface_upload_data
(
const
struct
wined3d_surface
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
const
struct
wined3d_format
*
format
,
const
RECT
*
src_rect
,
UINT
src_w
,
const
POINT
*
dst_point
,
BOOL
srgb
,
const
struct
wined3d_bo_address
*
data
)
DECLSPEC_HIDDEN
;
...
...
@@ -2442,6 +2444,7 @@ void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *r
struct
wined3d_context
*
swapchain_get_context
(
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
void
swapchain_destroy_contexts
(
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
HDC
swapchain_get_backup_dc
(
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
void
swapchain_update_draw_bindings
(
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
void
swapchain_update_render_to_fbo
(
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
#define DEFAULT_REFRESH_RATE 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