wined3d: Replace surface_update_draw_binding() with wined3d_resource_update_draw_binding().
This commit is contained in:
parent
255894c1f1
commit
1ce3269ac1
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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(surface);
|
||||
wined3d_resource_update_draw_binding(&surface->resource);
|
||||
}
|
||||
|
||||
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(surface);
|
||||
wined3d_resource_update_draw_binding(&surface->resource);
|
||||
surface_validate_location(surface, WINED3D_LOCATION_SYSMEM);
|
||||
list_init(&surface->renderbuffers);
|
||||
list_init(&surface->overlays);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue