You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Added patch to implement semi-stub for d3d11_device_CheckFormatSupport.
This commit is contained in:
@@ -4004,7 +4004,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_device_get_transform(device, WINED3D_TS_VIEW, &view_mat);
|
||||
wined3d_device_get_transform(device, WINED3D_TS_PROJECTION, &proj_mat);
|
||||
wined3d_device_get_transform(device, WINED3D_TS_WORLD_MATRIX(0), &world_mat);
|
||||
@@ -3439,8 +3645,10 @@ HRESULT CDECL wined3d_device_begin_scene(struct wined3d_device *device)
|
||||
@@ -3515,8 +3721,10 @@ HRESULT CDECL wined3d_device_begin_scene(struct wined3d_device *device)
|
||||
|
||||
HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
{
|
||||
@@ -4015,7 +4015,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
TRACE("device %p.\n", device);
|
||||
|
||||
if (!device->inScene)
|
||||
@@ -3449,6 +3657,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3525,6 +3733,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -4023,7 +4023,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
context = context_acquire(device, NULL);
|
||||
/* We only have to do this if we need to read the, swapbuffers performs a flush for us */
|
||||
context->gl_info->gl_ops.gl.p_glFlush();
|
||||
@@ -3456,6 +3665,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3532,6 +3741,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
* fails. */
|
||||
context_release(context);
|
||||
|
||||
@@ -4031,7 +4031,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
device->inScene = FALSE;
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -3463,6 +3673,10 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
@@ -3539,6 +3749,10 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
||||
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count,
|
||||
const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
|
||||
{
|
||||
@@ -4042,7 +4042,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
TRACE("device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
|
||||
device, rect_count, rects, flags, debug_color(color), depth, stencil);
|
||||
|
||||
@@ -3474,7 +3688,11 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3550,7 +3764,11 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
|
||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||
{
|
||||
@@ -4054,7 +4054,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (!ds)
|
||||
{
|
||||
WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
|
||||
@@ -3483,8 +3701,13 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
@@ -3559,8 +3777,13 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
|
||||
}
|
||||
else if (flags & WINED3DCLEAR_TARGET)
|
||||
{
|
||||
@@ -4068,7 +4068,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
WARN("Silently ignoring depth and target clear with mismatching sizes\n");
|
||||
return WINED3D_OK;
|
||||
@@ -3530,7 +3753,9 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
|
||||
@@ -3606,7 +3829,9 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
|
||||
enum wined3d_primitive_type primitive_type)
|
||||
{
|
||||
GLenum gl_primitive_type, prev;
|
||||
@@ -4078,7 +4078,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
TRACE("device %p, primitive_type %s\n", device, debug_d3dprimitivetype(primitive_type));
|
||||
|
||||
gl_primitive_type = gl_primitive_type_from_d3d(primitive_type);
|
||||
@@ -3538,8 +3763,13 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
|
||||
@@ -3614,8 +3839,13 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
|
||||
device->update_state->gl_primitive_type = gl_primitive_type;
|
||||
if (device->recording)
|
||||
device->recording->changed.primitive_type = TRUE;
|
||||
@@ -4092,7 +4092,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
void CDECL wined3d_device_get_primitive_type(const struct wined3d_device *device,
|
||||
@@ -3599,10 +3829,16 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
@@ -3675,10 +3905,16 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
|
||||
start_idx, index_count, start_instance, instance_count, TRUE);
|
||||
}
|
||||
|
||||
@@ -4109,7 +4109,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
struct wined3d_const_bo_address data;
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_map_desc src;
|
||||
@@ -3627,6 +3863,14 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
@@ -3703,6 +3939,14 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
}
|
||||
|
||||
context = context_acquire(device, NULL);
|
||||
@@ -4124,7 +4124,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
/* Only a prepare, since we're uploading entire volumes. */
|
||||
wined3d_texture_prepare_texture(dst_texture, context, FALSE);
|
||||
@@ -3634,6 +3878,7 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
@@ -3710,6 +3954,7 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
|
||||
for (i = 0; i < level_count; ++i)
|
||||
{
|
||||
@@ -4132,7 +4132,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (FAILED(hr = wined3d_resource_map(&src_texture->resource,
|
||||
src_level + i, &src, NULL, WINED3D_MAP_READONLY)))
|
||||
goto done;
|
||||
@@ -3650,16 +3895,94 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
@@ -3726,16 +3971,94 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
|
||||
done:
|
||||
context_release(context);
|
||||
return hr;
|
||||
@@ -4227,7 +4227,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture);
|
||||
|
||||
@@ -3696,6 +4019,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3772,6 +4095,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -4235,7 +4235,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
level_count = min(wined3d_texture_get_level_count(src_texture),
|
||||
wined3d_texture_get_level_count(dst_texture));
|
||||
|
||||
@@ -3718,9 +4042,21 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3794,9 +4118,21 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
context_release(context);
|
||||
|
||||
/* Update every surface level of the texture. */
|
||||
@@ -4257,7 +4257,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
unsigned int src_levels = src_texture->level_count;
|
||||
unsigned int dst_levels = dst_texture->level_count;
|
||||
@@ -3753,6 +4089,38 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
@@ -3829,6 +4165,38 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
|
||||
FIXME("Unsupported texture type %#x.\n", type);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -4296,7 +4296,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
|
||||
@@ -3800,8 +4168,13 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
@@ -3876,8 +4244,13 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
||||
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|
||||
|| state->render_states[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
@@ -4310,7 +4310,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
|
||||
{
|
||||
@@ -3990,6 +4363,9 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4066,6 +4439,9 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
struct wined3d_texture *dst_texture, *src_texture;
|
||||
RECT dst_rect, src_rect;
|
||||
HRESULT hr;
|
||||
@@ -4320,7 +4320,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, dst_resource %p, dst_sub_resource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
|
||||
"src_resource %p, src_sub_resource_idx %u, src_box %s.\n",
|
||||
@@ -4077,6 +4453,16 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4153,6 +4529,16 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
|
||||
if (src_box)
|
||||
{
|
||||
@@ -4337,7 +4337,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
SetRect(&src_rect, src_box->left, src_box->top, src_box->right, src_box->bottom);
|
||||
}
|
||||
else
|
||||
@@ -4090,6 +4476,25 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
@@ -4166,6 +4552,25 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
SetRect(&dst_rect, dst_x, dst_y, dst_x + (src_rect.right - src_rect.left),
|
||||
dst_y + (src_rect.bottom - src_rect.top));
|
||||
|
||||
@@ -4363,7 +4363,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (FAILED(hr = wined3d_texture_blt(dst_texture, dst_sub_resource_idx, &dst_rect,
|
||||
src_texture, src_sub_resource_idx, &src_rect, 0, NULL, WINED3D_TEXF_POINT)))
|
||||
WARN("Failed to blit, hr %#x.\n", hr);
|
||||
@@ -4102,6 +4507,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4178,6 +4583,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
unsigned int depth_pitch)
|
||||
{
|
||||
struct wined3d_texture_sub_resource *sub_resource;
|
||||
@@ -4371,7 +4371,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
struct wined3d_const_bo_address addr;
|
||||
unsigned int width, height, level;
|
||||
@@ -4110,6 +4516,9 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4186,6 +4592,9 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
struct wined3d_surface *surface;
|
||||
POINT dst_point;
|
||||
RECT src_rect;
|
||||
@@ -4381,7 +4381,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u.\n",
|
||||
device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch);
|
||||
@@ -4143,6 +4552,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4219,6 +4628,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
|
||||
return;
|
||||
}
|
||||
@@ -4389,7 +4389,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
surface = sub_resource->u.surface;
|
||||
|
||||
level = sub_resource_idx % texture->level_count;
|
||||
@@ -4153,6 +4563,17 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4229,6 +4639,17 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
src_rect.top = 0;
|
||||
if (box)
|
||||
{
|
||||
@@ -4407,7 +4407,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (box->left >= box->right || box->right > width
|
||||
|| box->top >= box->bottom || box->bottom > height
|
||||
|| box->front >= box->back)
|
||||
@@ -4160,6 +4581,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4236,6 +4657,7 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
WARN("Invalid box %s specified.\n", debug_box(box));
|
||||
return;
|
||||
}
|
||||
@@ -4415,7 +4415,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
src_rect.right = box->right - box->left;
|
||||
src_rect.bottom = box->bottom - box->top;
|
||||
@@ -4194,6 +4616,11 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
@@ -4270,6 +4692,11 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
|
||||
wined3d_texture_validate_location(texture, sub_resource_idx, WINED3D_LOCATION_TEXTURE_RGB);
|
||||
wined3d_texture_invalidate_location(texture, sub_resource_idx, ~WINED3D_LOCATION_TEXTURE_RGB);
|
||||
@@ -4427,7 +4427,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
|
||||
@@ -4202,8 +4629,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4278,8 +4705,13 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
{
|
||||
const struct blit_shader *blitter;
|
||||
struct wined3d_resource *resource;
|
||||
@@ -4441,7 +4441,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, view %p, rect %s, flags %#x, color %s, depth %.8e, stencil %u.\n",
|
||||
device, view, wine_dbgstr_rect(rect), flags, debug_color(color), depth, stencil);
|
||||
@@ -4242,10 +4674,15 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
@@ -4318,10 +4750,15 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -4457,7 +4457,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device,
|
||||
@@ -4259,20 +4696,31 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
@@ -4335,20 +4772,31 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -4489,7 +4489,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n",
|
||||
device, view_idx, view, set_viewport);
|
||||
@@ -4309,13 +4757,21 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4385,13 +4833,21 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
}
|
||||
|
||||
|
||||
@@ -4511,7 +4511,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view);
|
||||
/* Release after the assignment, to prevent device_resource_released()
|
||||
* from seeing the surface as still in use. */
|
||||
@@ -4327,18 +4783,29 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
@@ -4403,18 +4859,29 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device
|
||||
|
||||
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
|
||||
{
|
||||
@@ -4541,7 +4541,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_rendertarget_view_incref(view);
|
||||
wined3d_cs_emit_set_depth_stencil_view(device->cs, view);
|
||||
if (prev)
|
||||
@@ -4572,19 +5039,26 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
@@ -4648,19 +5115,26 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4568,7 +4568,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
LIST_FOR_EACH_ENTRY(shader, &device->shaders, struct wined3d_shader, shader_list_entry)
|
||||
{
|
||||
device->shader_backend->shader_destroy(shader);
|
||||
@@ -4613,12 +5087,30 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
@@ -4689,12 +5163,30 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
swapchain->context = NULL;
|
||||
@@ -4599,7 +4599,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
HRESULT hr;
|
||||
|
||||
if (FAILED(hr = device->shader_backend->shader_alloc_private(device,
|
||||
@@ -4635,6 +5127,7 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -4711,6 +5203,7 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -4607,7 +4607,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
/* Recreate the primary swapchain's context */
|
||||
swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(*swapchain->context));
|
||||
if (!swapchain->context)
|
||||
@@ -4647,10 +5140,15 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -4723,10 +5216,15 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
|
||||
target = swapchain->back_buffers ? swapchain->back_buffers[0] : swapchain->front_buffer;
|
||||
if (!(context = context_create(swapchain, target, swapchain->ds_format)))
|
||||
@@ -4623,7 +4623,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
HeapFree(GetProcessHeap(), 0, swapchain->context);
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -4660,6 +5158,12 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
@@ -4736,6 +5234,12 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru
|
||||
create_dummy_textures(device, context);
|
||||
create_default_samplers(device);
|
||||
context_release(context);
|
||||
@@ -4636,7 +4636,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -4678,6 +5182,14 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4754,6 +5258,14 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
|
||||
device, swapchain_desc, mode, callback, reset_state);
|
||||
|
||||
@@ -4651,7 +4651,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
if (!(swapchain = wined3d_device_get_swapchain(device, 0)))
|
||||
{
|
||||
ERR("Failed to get the first implicit swapchain.\n");
|
||||
@@ -4696,10 +5208,16 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4772,10 +5284,16 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
wined3d_texture_decref(device->cursor_texture);
|
||||
device->cursor_texture = NULL;
|
||||
}
|
||||
@@ -4668,7 +4668,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
{
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4708,10 +5226,22 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4784,10 +5302,22 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
}
|
||||
wined3d_device_set_depth_stencil_view(device, NULL);
|
||||
|
||||
@@ -4691,7 +4691,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
if (reset_state)
|
||||
@@ -4876,27 +5406,48 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4952,27 +5482,48 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
if (device->d3d_initialized)
|
||||
delete_opengl_contexts(device, swapchain);
|
||||
|
||||
@@ -4740,7 +4740,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect);
|
||||
}
|
||||
|
||||
@@ -4904,7 +5455,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
@@ -4980,7 +5531,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
|
||||
{
|
||||
if (reset_state)
|
||||
hr = create_primary_opengl_context(device, swapchain);
|
||||
@@ -4752,7 +4752,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
}
|
||||
|
||||
/* All done. There is no need to reload resources or shaders, this will happen automatically on the
|
||||
@@ -4986,11 +5541,19 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
@@ -5062,11 +5617,19 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
|
||||
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
{
|
||||
@@ -4772,7 +4772,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
|
||||
|
||||
switch (type)
|
||||
@@ -5126,8 +5689,17 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
@@ -5202,8 +5765,17 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
|
||||
|
||||
device->blitter = adapter->blitter;
|
||||
|
||||
@@ -4790,7 +4790,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
device->update_state = &device->state;
|
||||
|
||||
if (!(device->cs = wined3d_cs_create(device)))
|
||||
@@ -5221,3 +5793,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -5297,3 +5869,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user