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 b3fe96a0a9748c71a24fe0393fd964f0fb2f4ff4.
This commit is contained in:
@@ -6081,7 +6081,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
|
||||
texture->resource.format = format;
|
||||
texture->resource.multisample_type = multisample_type;
|
||||
@@ -779,6 +815,7 @@
|
||||
@@ -791,6 +827,7 @@
|
||||
static void texture2d_sub_resource_load(struct wined3d_resource *sub_resource,
|
||||
struct wined3d_context *context, BOOL srgb)
|
||||
{
|
||||
@@ -6089,7 +6089,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
surface_load(surface_from_resource(sub_resource), context, srgb);
|
||||
}
|
||||
|
||||
@@ -793,6 +830,19 @@
|
||||
@@ -805,6 +842,19 @@
|
||||
wined3d_resource_load_location(&surface->resource, context, surface->resource.map_binding);
|
||||
context_release(context);
|
||||
wined3d_resource_invalidate_location(&surface->resource, ~surface->resource.map_binding);
|
||||
@@ -6109,7 +6109,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
|
||||
@@ -804,12 +854,25 @@
|
||||
@@ -816,12 +866,25 @@
|
||||
|
||||
static void texture2d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
{
|
||||
@@ -6135,7 +6135,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
static void texture2d_sub_resource_upload_data(struct wined3d_resource *sub_resource,
|
||||
@@ -888,6 +951,7 @@
|
||||
@@ -900,6 +963,7 @@
|
||||
|
||||
if (gl_info->supported[APPLE_CLIENT_STORAGE])
|
||||
{
|
||||
@@ -6143,7 +6143,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (surface->flags & (SFLAG_NONPOW2)
|
||||
|| texture->flags & WINED3D_TEXTURE_CONVERTED)
|
||||
{
|
||||
@@ -896,12 +960,26 @@
|
||||
@@ -908,12 +972,26 @@
|
||||
* WINED3D_TEXTURE_CONVERTED: The conversion destination memory is freed after loading the surface
|
||||
* heap_memory == NULL: Not defined in the extension. Seems to disable client storage effectively
|
||||
*/
|
||||
@@ -6170,7 +6170,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
surface->flags |= SFLAG_CLIENT;
|
||||
mem = surface->resource.heap_memory;
|
||||
|
||||
@@ -971,6 +1049,7 @@
|
||||
@@ -983,6 +1061,7 @@
|
||||
wined3d_texture_unload_gl_texture(texture);
|
||||
}
|
||||
|
||||
@@ -6178,7 +6178,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
static void wined3d_texture_load_location_invalidated(struct wined3d_resource *resource, DWORD location)
|
||||
{
|
||||
ERR("Should not be called on textures.\n");
|
||||
@@ -990,6 +1069,13 @@
|
||||
@@ -1002,6 +1081,13 @@
|
||||
wined3d_texture_unload,
|
||||
wined3d_texture_load_location_invalidated,
|
||||
wined3d_texture_load_location,
|
||||
@@ -6192,7 +6192,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
};
|
||||
|
||||
static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
|
||||
@@ -1006,7 +1092,9 @@
|
||||
@@ -1018,7 +1104,9 @@
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@@ -6202,7 +6202,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1016,6 +1104,7 @@
|
||||
@@ -1028,6 +1116,7 @@
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@@ -6210,7 +6210,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -1024,6 +1113,14 @@
|
||||
@@ -1036,6 +1125,14 @@
|
||||
{
|
||||
WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning D3DERR_INVALIDCALL.\n");
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
@@ -6225,7 +6225,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1044,7 +1141,9 @@
|
||||
@@ -1056,7 +1153,9 @@
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a NPOT cube texture (edge length %u) without GL support.\n", desc->width);
|
||||
@@ -6235,7 +6235,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1054,7 +1153,9 @@
|
||||
@@ -1066,7 +1165,9 @@
|
||||
surface_flags, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x\n", hr);
|
||||
@@ -6245,7 +6245,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1117,7 +1218,9 @@
|
||||
@@ -1129,7 +1230,9 @@
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@@ -6255,7 +6255,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1148,7 +1251,9 @@
|
||||
@@ -1160,7 +1263,9 @@
|
||||
else
|
||||
{
|
||||
WARN("Attempted to create a mipmapped NPOT texture without unconditional NPOT support.\n");
|
||||
@@ -6265,7 +6265,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1161,6 +1266,7 @@
|
||||
@@ -1173,6 +1278,7 @@
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning WINED3DERR_INVALIDCALL.\n");
|
||||
@@ -6273,7 +6273,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -1169,6 +1275,14 @@
|
||||
@@ -1181,6 +1287,14 @@
|
||||
{
|
||||
WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning WINED3DERR_INVALIDCALL.\n");
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
@@ -6288,7 +6288,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1177,7 +1291,9 @@
|
||||
@@ -1189,7 +1303,9 @@
|
||||
surface_flags, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@@ -6298,7 +6298,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1263,12 +1379,25 @@
|
||||
@@ -1275,12 +1391,25 @@
|
||||
|
||||
static void texture3d_sub_resource_invalidate_location(struct wined3d_resource *sub_resource, DWORD location)
|
||||
{
|
||||
@@ -6324,7 +6324,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
}
|
||||
|
||||
static void texture3d_sub_resource_upload_data(struct wined3d_resource *sub_resource,
|
||||
@@ -1278,7 +1407,11 @@
|
||||
@@ -1290,7 +1419,11 @@
|
||||
struct wined3d_const_bo_address addr;
|
||||
unsigned int row_pitch, slice_pitch;
|
||||
|
||||
@@ -6336,7 +6336,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
if (row_pitch != data->row_pitch || slice_pitch != data->slice_pitch)
|
||||
FIXME("Ignoring row/slice pitch (%u/%u).\n", data->row_pitch, data->slice_pitch);
|
||||
|
||||
@@ -1303,7 +1436,11 @@
|
||||
@@ -1315,7 +1448,11 @@
|
||||
void *mem = NULL;
|
||||
|
||||
if (gl_info->supported[APPLE_CLIENT_STORAGE] && !format->convert
|
||||
@@ -6348,7 +6348,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
{
|
||||
TRACE("Enabling GL_UNPACK_CLIENT_STORAGE_APPLE for volume %p\n", volume);
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
|
||||
@@ -1350,6 +1487,7 @@
|
||||
@@ -1362,6 +1499,7 @@
|
||||
if (WINED3DFMT_UNKNOWN >= desc->format)
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture);
|
||||
@@ -6356,7 +6356,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -1358,6 +1496,14 @@
|
||||
@@ -1370,6 +1508,14 @@
|
||||
{
|
||||
WARN("(%p) : Texture cannot be created - no volume texture support.\n", texture);
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
@@ -6371,7 +6371,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -1367,6 +1513,7 @@
|
||||
@@ -1379,6 +1525,7 @@
|
||||
if (!gl_info->supported[SGIS_GENERATE_MIPMAP])
|
||||
{
|
||||
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
|
||||
@@ -6379,7 +6379,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
@@ -1375,6 +1522,14 @@
|
||||
@@ -1387,6 +1534,14 @@
|
||||
{
|
||||
WARN("WINED3DUSAGE_AUTOGENMIPMAP is set, and level count != 1, returning D3DERR_INVALIDCALL.\n");
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
@@ -6394,7 +6394,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1402,7 +1557,9 @@
|
||||
@@ -1414,7 +1569,9 @@
|
||||
{
|
||||
WARN("Attempted to create a NPOT volume texture (%u, %u, %u) without GL support.\n",
|
||||
desc->width, desc->height, desc->depth);
|
||||
@@ -6404,7 +6404,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
}
|
||||
@@ -1412,7 +1569,9 @@
|
||||
@@ -1424,7 +1581,9 @@
|
||||
0, device, parent, parent_ops, &texture_resource_ops)))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@@ -6414,7 +6414,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
return hr;
|
||||
}
|
||||
|
||||
@@ -1489,6 +1648,9 @@
|
||||
@@ -1501,6 +1660,9 @@
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize texture, returning %#x.\n", hr);
|
||||
@@ -9791,7 +9791,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
};
|
||||
|
||||
static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device *device,
|
||||
@@ -1201,7 +1409,9 @@
|
||||
@@ -1207,7 +1415,9 @@
|
||||
return hr;
|
||||
}
|
||||
buffer->buffer_type_hint = bind_hint;
|
||||
@@ -9801,7 +9801,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
|
||||
TRACE("size %#x, usage %#x, format %s, memory @ %p, iface @ %p.\n", buffer->resource.size, buffer->resource.usage,
|
||||
debug_d3dformat(buffer->resource.format->id), buffer->resource.heap_memory, buffer);
|
||||
@@ -1217,6 +1427,7 @@
|
||||
@@ -1223,6 +1433,7 @@
|
||||
|
||||
dynamic_buffer_ok = gl_info->supported[APPLE_FLUSH_BUFFER_RANGE] || gl_info->supported[ARB_MAP_BUFFER_RANGE];
|
||||
|
||||
@@ -9809,7 +9809,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
/* Observations show that draw_strided_slow is faster on dynamic VBs than converting +
|
||||
* drawStridedFast (half-life 2 and others).
|
||||
*
|
||||
@@ -1224,6 +1435,15 @@
|
||||
@@ -1230,6 +1441,15 @@
|
||||
* show that draw_strided_slow is faster than converting + uploading + drawStridedFast.
|
||||
* Therefore do not create a VBO for WINED3DUSAGE_DYNAMIC buffers.
|
||||
*/
|
||||
@@ -9825,7 +9825,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
if (!gl_info->supported[ARB_VERTEX_BUFFER_OBJECT])
|
||||
{
|
||||
TRACE("Not creating a vbo because GL_ARB_vertex_buffer is not supported\n");
|
||||
@@ -1269,9 +1489,11 @@
|
||||
@@ -1275,9 +1495,11 @@
|
||||
}
|
||||
buffer->maps_size = 1;
|
||||
|
||||
@@ -9837,7 +9837,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -1377,6 +1599,7 @@
|
||||
@@ -1384,6 +1606,7 @@
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@@ -9845,7 +9845,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
|
||||
void buffer_swap_mem(struct wined3d_buffer *buffer, BYTE *mem)
|
||||
{
|
||||
@@ -1384,3 +1607,4 @@
|
||||
@@ -1391,3 +1614,4 @@
|
||||
buffer->resource.heap_memory = mem;
|
||||
buffer->flags |= WINED3D_BUFFER_DISCARD;
|
||||
}
|
||||
|
Reference in New Issue
Block a user