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
1ce3269a
Commit
1ce3269a
authored
Aug 20, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Replace surface_update_draw_binding() with wined3d_resource_update_draw_binding().
parent
255894c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
resource.c
dlls/wined3d/resource.c
+10
-0
surface.c
dlls/wined3d/surface.c
+2
-12
swapchain.c
dlls/wined3d/swapchain.c
+2
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/resource.c
View file @
1ce3269a
...
...
@@ -323,3 +323,13 @@ BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource)
* offscreen, otherwise onscreen */
return
swapchain
->
render_to_fbo
;
}
void
wined3d_resource_update_draw_binding
(
struct
wined3d_resource
*
resource
)
{
if
(
!
wined3d_resource_is_offscreen
(
resource
)
||
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
)
resource
->
draw_binding
=
WINED3D_LOCATION_DRAWABLE
;
else
if
(
resource
->
multisample_type
)
resource
->
draw_binding
=
WINED3D_LOCATION_RB_MULTISAMPLE
;
else
resource
->
draw_binding
=
WINED3D_LOCATION_TEXTURE_RGB
;
}
dlls/wined3d/surface.c
View file @
1ce3269a
...
...
@@ -112,16 +112,6 @@ void wined3d_surface_destroy(struct wined3d_surface *surface)
HeapFree
(
GetProcessHeap
(),
0
,
surface
);
}
void
surface_update_draw_binding
(
struct
wined3d_surface
*
surface
)
{
if
(
!
wined3d_resource_is_offscreen
(
&
surface
->
resource
)
||
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
)
surface
->
resource
.
draw_binding
=
WINED3D_LOCATION_DRAWABLE
;
else
if
(
surface
->
resource
.
multisample_type
)
surface
->
resource
.
draw_binding
=
WINED3D_LOCATION_RB_MULTISAMPLE
;
else
surface
->
resource
.
draw_binding
=
WINED3D_LOCATION_TEXTURE_RGB
;
}
void
surface_get_drawable_size
(
const
struct
wined3d_surface
*
surface
,
const
struct
wined3d_context
*
context
,
unsigned
int
*
width
,
unsigned
int
*
height
)
{
...
...
@@ -157,7 +147,7 @@ void surface_set_swapchain(struct wined3d_surface *surface, struct wined3d_swapc
TRACE
(
"surface %p, swapchain %p.
\n
"
,
surface
,
swapchain
);
surface
->
swapchain
=
swapchain
;
surface_update_draw_binding
(
surfa
ce
);
wined3d_resource_update_draw_binding
(
&
surface
->
resour
ce
);
}
struct
blt_info
...
...
@@ -5974,7 +5964,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text
}
surface
->
container
=
container
;
surface_update_draw_binding
(
surfa
ce
);
wined3d_resource_update_draw_binding
(
&
surface
->
resour
ce
);
surface_validate_location
(
surface
,
WINED3D_LOCATION_SYSMEM
);
list_init
(
&
surface
->
renderbuffers
);
list_init
(
&
surface
->
overlays
);
...
...
dlls/wined3d/swapchain.c
View file @
1ce3269a
...
...
@@ -1144,10 +1144,10 @@ void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain)
{
UINT
i
;
surface_update_draw_binding
(
swapchain
->
front_buffer
);
wined3d_resource_update_draw_binding
(
&
swapchain
->
front_buffer
->
resource
);
for
(
i
=
0
;
i
<
swapchain
->
desc
.
backbuffer_count
;
++
i
)
{
surface_update_draw_binding
(
swapchain
->
back_buffers
[
i
]
);
wined3d_resource_update_draw_binding
(
&
swapchain
->
back_buffers
[
i
]
->
resource
);
}
}
dlls/wined3d/wined3d_private.h
View file @
1ce3269a
...
...
@@ -2065,6 +2065,7 @@ GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
GLenum
wined3d_resource_gl_legacy_map_flags
(
DWORD
d3d_flags
)
DECLSPEC_HIDDEN
;
BOOL
wined3d_resource_is_offscreen
(
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
DWORD
wined3d_resource_sanitize_map_flags
(
const
struct
wined3d_resource
*
resource
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
void
wined3d_resource_update_draw_binding
(
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
/* Tests show that the start address of resources is 32 byte aligned */
#define RESOURCE_ALIGNMENT 16
...
...
@@ -2305,7 +2306,6 @@ void surface_set_compatible_renderbuffer(struct wined3d_surface *surface,
void
surface_set_swapchain
(
struct
wined3d_surface
*
surface
,
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
void
surface_set_texture_target
(
struct
wined3d_surface
*
surface
,
GLenum
target
,
GLint
level
)
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
;
HRESULT
surface_upload_from_surface
(
struct
wined3d_surface
*
dst_surface
,
const
POINT
*
dst_point
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
)
DECLSPEC_HIDDEN
;
void
surface_validate_location
(
struct
wined3d_surface
*
surface
,
DWORD
location
)
DECLSPEC_HIDDEN
;
...
...
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