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
Rebase against cced5dfbde8b685022dd74e666f8ad4ea8473453.
This commit is contained in:
@@ -9,7 +9,7 @@ Based on patches by:
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -1274,6 +1274,9 @@ HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
|
||||
@@ -1265,6 +1265,9 @@ HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
|
||||
const struct wined3d_box *box, const void *data)
|
||||
{
|
||||
UINT offset, size;
|
||||
@@ -19,7 +19,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
HRESULT hr;
|
||||
BYTE *ptr;
|
||||
|
||||
@@ -1288,7 +1291,14 @@ HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
|
||||
@@ -1279,7 +1282,14 @@ HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
|
||||
size = buffer->resource.size;
|
||||
}
|
||||
|
||||
@@ -1263,7 +1263,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -333,7 +333,11 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
|
||||
@@ -292,7 +292,11 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
|
||||
if (locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
data->addr = NULL;
|
||||
@@ -1275,7 +1275,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return;
|
||||
}
|
||||
if (locations & WINED3D_LOCATION_USER_MEMORY)
|
||||
@@ -434,6 +438,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
|
||||
@@ -393,6 +397,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture,
|
||||
@@ -1283,7 +1283,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info)
|
||||
{
|
||||
GLuint *buffer_object = &texture->sub_resources[sub_resource_idx].buffer_object;
|
||||
@@ -446,6 +451,19 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture
|
||||
@@ -405,6 +410,19 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture
|
||||
|
||||
wined3d_texture_invalidate_location(texture, sub_resource_idx, WINED3D_LOCATION_BUFFER);
|
||||
*buffer_object = 0;
|
||||
@@ -1303,7 +1303,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
|
||||
@@ -465,7 +483,11 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
|
||||
@@ -424,7 +442,11 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
|
||||
&& !wined3d_texture_load_location(texture, i, context, map_binding))
|
||||
ERR("Failed to load location %s.\n", wined3d_debug_location(map_binding));
|
||||
if (texture->resource.map_binding == WINED3D_LOCATION_BUFFER)
|
||||
@@ -1315,7 +1315,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
if (context)
|
||||
@@ -622,28 +644,46 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
@@ -581,28 +603,46 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
unsigned int sub_count = texture->level_count * texture->layer_count;
|
||||
struct wined3d_device *device = texture->resource.device;
|
||||
struct wined3d_context *context = NULL;
|
||||
@@ -1362,7 +1362,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
if (context)
|
||||
context_release(context);
|
||||
@@ -1387,6 +1427,9 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
@@ -1338,6 +1378,9 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
if (surface->dc)
|
||||
{
|
||||
wined3d_cs_destroy_object(device->cs, texture2d_destroy_dc, surface);
|
||||
@@ -1372,7 +1372,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
create_dib = TRUE;
|
||||
}
|
||||
|
||||
@@ -1447,18 +1490,30 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
@@ -1398,18 +1441,30 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
wined3d_texture_invalidate_location(texture, 0, ~valid_location);
|
||||
|
||||
if (create_dib)
|
||||
@@ -1403,7 +1403,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (sub_resource->buffer_object)
|
||||
return;
|
||||
|
||||
@@ -1470,6 +1525,16 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur
|
||||
@@ -1421,6 +1476,16 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur
|
||||
|
||||
TRACE("Created buffer object %u for texture %p, sub-resource %u.\n",
|
||||
sub_resource->buffer_object, texture, sub_resource_idx);
|
||||
@@ -1420,7 +1420,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
static void wined3d_texture_force_reload(struct wined3d_texture *texture)
|
||||
@@ -1595,7 +1660,11 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
@@ -1546,7 +1611,11 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
return TRUE;
|
||||
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
@@ -1432,7 +1432,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return TRUE;
|
||||
|
||||
case WINED3D_LOCATION_TEXTURE_RGB:
|
||||
@@ -1896,7 +1965,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -1847,7 +1916,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
}
|
||||
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
@@ -1444,7 +1444,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
wined3d_texture_bind_and_dirtify(texture, context, location == WINED3D_LOCATION_TEXTURE_SRGB);
|
||||
wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch);
|
||||
texture1d_upload_data(texture, sub_resource_idx, context, NULL, &data, row_pitch, slice_pitch);
|
||||
@@ -1941,7 +2014,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -1892,7 +1965,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
{
|
||||
@@ -1456,7 +1456,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
@@ -2235,8 +2312,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
@@ -2186,8 +2263,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_DISCARDED);
|
||||
}
|
||||
|
||||
@@ -1470,7 +1470,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
if (resource->type == WINED3D_RTYPE_TEXTURE_2D)
|
||||
{
|
||||
@@ -2840,6 +2922,9 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
@@ -2782,6 +2864,9 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
|
||||
if ((desc->usage & WINED3DUSAGE_OWNDC) || (device->wined3d->flags & WINED3D_NO3D))
|
||||
{
|
||||
wined3d_cs_init_object(device->cs, texture2d_create_dc, surface);
|
||||
@@ -1480,7 +1480,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (!surface->dc)
|
||||
{
|
||||
wined3d_texture_cleanup_sync(texture);
|
||||
@@ -3020,7 +3105,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -2962,7 +3047,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
}
|
||||
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
@@ -1492,7 +1492,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
wined3d_texture_bind_and_dirtify(texture, context,
|
||||
location == WINED3D_LOCATION_TEXTURE_SRGB);
|
||||
wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch);
|
||||
@@ -3066,7 +3155,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
@@ -3008,7 +3097,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
{
|
||||
@@ -1504,7 +1504,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
@@ -3284,8 +3377,18 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
|
||||
@@ -3226,8 +3319,18 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
|
||||
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count
|
||||
|| src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
{
|
||||
@@ -1523,7 +1523,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
if ((src_format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
@@ -3627,7 +3730,14 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
@@ -3569,7 +3672,14 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
if (!surface->dc)
|
||||
@@ -1538,7 +1538,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (!surface->dc)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
@@ -3671,7 +3781,14 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
@@ -3613,7 +3723,14 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
|
||||
}
|
||||
|
||||
if (!(texture->resource.usage & WINED3DUSAGE_OWNDC) && !(device->wined3d->flags & WINED3D_NO3D))
|
||||
@@ -1616,7 +1616,7 @@ diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2639,6 +2639,16 @@ struct wined3d_state
|
||||
@@ -2645,6 +2645,16 @@ struct wined3d_state
|
||||
struct wined3d_rasterizer_state *rasterizer_state;
|
||||
};
|
||||
|
||||
@@ -1633,7 +1633,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
#define WINED3D_UNMAPPED_STAGE ~0u
|
||||
|
||||
/* Multithreaded flag. Removed from the public header to signal that
|
||||
@@ -2750,6 +2760,12 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
@@ -2756,6 +2766,12 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
@@ -1646,7 +1646,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -2936,7 +2952,11 @@ struct wined3d_texture
|
||||
@@ -2942,7 +2958,11 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
@@ -1658,7 +1658,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
} sub_resources[1];
|
||||
};
|
||||
|
||||
@@ -3247,8 +3267,15 @@ struct wined3d_cs_queue
|
||||
@@ -3249,8 +3269,15 @@ struct wined3d_cs_queue
|
||||
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
@@ -1674,7 +1674,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void (*push_constants)(struct wined3d_cs *cs, enum wined3d_push_constants p,
|
||||
unsigned int start_idx, unsigned int count, const void *constants);
|
||||
};
|
||||
@@ -3263,13 +3290,23 @@ struct wined3d_cs
|
||||
@@ -3265,13 +3292,23 @@ struct wined3d_cs
|
||||
HANDLE thread;
|
||||
DWORD thread_id;
|
||||
|
||||
@@ -1698,7 +1698,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
@@ -3291,6 +3328,9 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
@@ -3293,6 +3330,9 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
|
||||
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, int base_vertex_idx,
|
||||
unsigned int start_idx, unsigned int index_count, unsigned int start_instance,
|
||||
unsigned int instance_count, BOOL indexed) DECLSPEC_HIDDEN;
|
||||
@@ -1708,7 +1708,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_cs_emit_flush(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain,
|
||||
@@ -3343,6 +3383,9 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
@@ -3345,6 +3385,9 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
|
||||
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs,
|
||||
struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN;
|
||||
|
||||
Reference in New Issue
Block a user