Rebase against 5b4f8a385b46a8a8a8b09b8ca6578aa7b7995a1e.

This commit is contained in:
Sebastian Lackner
2017-04-02 05:09:40 +02:00
parent 4232441093
commit 55ab42ece0
12 changed files with 194 additions and 270 deletions

View File

@@ -54,7 +54,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3766,6 +3766,11 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
@@ -3758,6 +3758,11 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
TRACE("device %p, texture %p, sub_resource_idx %u.\n", device, texture, sub_resource_idx);
@@ -2380,7 +2380,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1029,6 +1029,9 @@ static void wined3d_device_delete_opengl_contexts_cs(void *object)
@@ -1037,6 +1037,9 @@ static void wined3d_device_delete_opengl_contexts_cs(void *object)
static void wined3d_device_delete_opengl_contexts(struct wined3d_device *device)
{
wined3d_cs_destroy_object(device->cs, wined3d_device_delete_opengl_contexts_cs, device);
@@ -2390,7 +2390,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
static void wined3d_device_create_primary_opengl_context_cs(void *object)
@@ -1064,6 +1067,9 @@ static void wined3d_device_create_primary_opengl_context_cs(void *object)
@@ -1072,6 +1075,9 @@ static void wined3d_device_create_primary_opengl_context_cs(void *object)
static HRESULT wined3d_device_create_primary_opengl_context(struct wined3d_device *device)
{
wined3d_cs_init_object(device->cs, wined3d_device_create_primary_opengl_context_cs, device);
@@ -2400,7 +2400,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (!device->swapchains[0]->num_contexts)
return E_FAIL;
@@ -1208,6 +1214,10 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@@ -1216,6 +1222,10 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
if (!device->d3d_initialized)
return WINED3DERR_INVALIDCALL;
@@ -2411,7 +2411,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (device->logo_texture)
wined3d_texture_decref(device->logo_texture);
if (device->cursor_texture)
@@ -1217,6 +1227,9 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@@ -1225,6 +1235,9 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
@@ -2421,7 +2421,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
wined3d_device_delete_opengl_contexts(device);
if (device->fb.depth_stencil)
@@ -1306,7 +1319,11 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
@@ -1314,7 +1327,11 @@ UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device
/* We can not acquire the context unless there is a swapchain. */
if (device->swapchains && gl_info->supported[NVX_GPU_MEMORY_INFO] &&
@@ -2433,7 +2433,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
{
GLint vram_free_kb;
UINT64 vram_free;
@@ -2374,7 +2391,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
@@ -2382,7 +2399,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device,
}
else
{
@@ -2445,7 +2445,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
return WINED3D_OK;
@@ -2423,7 +2444,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
@@ -2431,7 +2452,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
}
else
{
@@ -2457,7 +2457,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
return WINED3D_OK;
@@ -2468,7 +2493,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
@@ -2476,7 +2501,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
memset(&device->recording->changed.vs_consts_f[start_idx], 1,
count * sizeof(*device->recording->changed.vs_consts_f));
else
@@ -2469,7 +2469,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return WINED3D_OK;
}
@@ -2589,7 +2618,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
@@ -2597,7 +2626,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device,
}
else
{
@@ -2481,7 +2481,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
return WINED3D_OK;
@@ -2638,7 +2671,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
@@ -2646,7 +2679,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
}
else
{
@@ -2493,7 +2493,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
return WINED3D_OK;
@@ -2684,7 +2721,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
@@ -2692,7 +2729,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device,
memset(&device->recording->changed.ps_consts_f[start_idx], 1,
count * sizeof(*device->recording->changed.ps_consts_f));
else
@@ -2505,7 +2505,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
return WINED3D_OK;
}
@@ -3502,8 +3543,10 @@ HRESULT CDECL wined3d_device_begin_scene(struct wined3d_device *device)
@@ -3510,8 +3551,10 @@ HRESULT CDECL wined3d_device_begin_scene(struct wined3d_device *device)
HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
{
@@ -2516,7 +2516,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
TRACE("device %p.\n", device);
if (!device->inScene)
@@ -3512,6 +3555,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
@@ -3520,6 +3563,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
return WINED3DERR_INVALIDCALL;
}
@@ -2524,7 +2524,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
context = context_acquire(device, NULL, 0);
/* 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();
@@ -3519,6 +3563,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
@@ -3527,6 +3571,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
* fails. */
context_release(context);
@@ -2532,7 +2532,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
device->inScene = FALSE;
return WINED3D_OK;
}
@@ -3666,11 +3711,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
@@ -3674,11 +3719,17 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device
start_idx, index_count, start_instance, instance_count, TRUE);
}
@@ -2550,7 +2550,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
struct wined3d_context *context;
struct wined3d_map_desc src;
HRESULT hr = WINED3D_OK;
@@ -3694,6 +3745,13 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
@@ -3702,6 +3753,13 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
}
context = context_acquire(device, NULL, 0);
@@ -2564,7 +2564,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);
@@ -3701,15 +3759,22 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
@@ -3709,15 +3767,22 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
for (i = 0; i < level_count; ++i)
{
@@ -2587,7 +2587,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (FAILED(hr = wined3d_resource_unmap(&src_texture->resource, src_level + i)))
goto done;
}
@@ -3717,16 +3782,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
@@ -3725,16 +3790,89 @@ static HRESULT wined3d_device_update_texture_3d(struct wined3d_device *device,
done:
context_release(context);
return hr;
@@ -2677,7 +2677,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);
@@ -3763,6 +3901,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
@@ -3771,6 +3909,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
return WINED3DERR_INVALIDCALL;
}
@@ -2685,7 +2685,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));
@@ -3785,9 +3924,21 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
@@ -3793,9 +3932,21 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
context_release(context);
/* Update every surface level of the texture. */
@@ -2707,7 +2707,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;
@@ -3820,6 +3971,38 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
@@ -3828,6 +3979,38 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
FIXME("Unsupported texture type %#x.\n", type);
return WINED3DERR_INVALIDCALL;
}
@@ -2746,7 +2746,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)
@@ -4152,6 +4335,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
@@ -4160,6 +4343,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
return WINED3DERR_INVALIDCALL;
}
@@ -2754,7 +2754,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count)
{
WARN("Destination sub-resource %u is mapped.\n", dst_sub_resource_idx);
@@ -4162,6 +4346,18 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
@@ -4170,6 +4354,18 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
{
WARN("Source sub-resource %u is mapped.\n", src_sub_resource_idx);
return WINED3DERR_INVALIDCALL;
@@ -2773,7 +2773,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
}
if (!src_box)
@@ -4318,10 +4514,15 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
@@ -4326,10 +4522,15 @@ HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *devi
return WINED3DERR_INVALIDCALL;
}
@@ -2789,7 +2789,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,
@@ -4891,7 +5092,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
@@ -4899,7 +5100,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
{
if (reset_state)
hr = wined3d_device_create_primary_opengl_context(device);
@@ -2801,7 +2801,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
@@ -5206,3 +5411,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
@@ -5214,3 +5419,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
else
return CallWindowProcA(proc, window, message, wparam, lparam);
}
@@ -3005,7 +3005,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return hr;
}
@@ -2334,8 +2352,12 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
@@ -2255,8 +2273,12 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
{
struct wined3d_resource *resource = &s->container->resource;
struct wined3d_device *device = resource->device;
@@ -3018,7 +3018,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
const struct blit_shader *blitter;
HRESULT hr;
@@ -2346,6 +2368,7 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
@@ -2267,6 +2289,7 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
return WINED3DERR_INVALIDCALL;
}
@@ -3026,7 +3026,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
view_desc.format_id = resource->format->id;
view_desc.flags = 0;
view_desc.u.texture.level_idx = s->texture_level;
@@ -2361,6 +2384,19 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
@@ -2282,6 +2305,19 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st
hr = blitter->color_fill(device, view, rect, color);
wined3d_rendertarget_view_decref(view);
@@ -3046,7 +3046,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
return hr;
}
@@ -2675,7 +2711,11 @@ static BOOL surface_load_texture(struct wined3d_surface *surface,
@@ -2608,7 +2644,11 @@ static BOOL surface_load_texture(struct wined3d_surface *surface,
/* Don't use PBOs for converted surfaces. During PBO conversion we look at
* WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is
* getting called. */
@@ -3141,7 +3141,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
@@ -337,7 +337,11 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
@@ -338,7 +338,11 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
if (locations & WINED3D_LOCATION_BUFFER)
{
data->addr = NULL;
@@ -3153,7 +3153,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
return;
}
if (locations & WINED3D_LOCATION_USER_MEMORY)
@@ -438,6 +442,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
@@ -439,6 +443,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,
@@ -3161,7 +3161,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;
@@ -450,6 +455,19 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture
@@ -451,6 +456,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;
@@ -3181,7 +3181,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
}
static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
@@ -469,7 +487,11 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
@@ -470,7 +488,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)
@@ -3193,7 +3193,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
}
if (context)
@@ -626,28 +648,46 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
@@ -627,28 +649,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;
@@ -3240,7 +3240,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
}
if (context)
context_release(context);
@@ -1391,6 +1431,9 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
@@ -1392,6 +1432,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);
@@ -3250,7 +3250,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
create_dib = TRUE;
}
@@ -1451,18 +1494,30 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
@@ -1452,18 +1495,30 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
wined3d_texture_invalidate_location(texture, 0, ~valid_location);
if (create_dib)
@@ -3281,7 +3281,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
if (sub_resource->buffer_object)
return;
@@ -1474,6 +1529,16 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur
@@ -1475,6 +1530,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);
@@ -3298,7 +3298,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
}
static void wined3d_texture_force_reload(struct wined3d_texture *texture)
@@ -1599,7 +1664,11 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
@@ -1600,7 +1665,11 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
return TRUE;
case WINED3D_LOCATION_BUFFER:
@@ -3310,7 +3310,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
return TRUE;
case WINED3D_LOCATION_TEXTURE_RGB:
@@ -1654,7 +1723,9 @@ static struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(str
@@ -1655,7 +1724,9 @@ static struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(str
HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
UINT layer, const struct wined3d_box *dirty_region)
{
@@ -3320,7 +3320,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
unsigned int sub_resource_idx;
TRACE("texture %p, layer %u, dirty_region %s.\n", texture, layer, debug_box(dirty_region));
@@ -1666,6 +1737,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
@@ -1667,6 +1738,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
}
sub_resource_idx = layer * texture->level_count;
@@ -3328,7 +3328,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
if (dirty_region)
WARN("Ignoring dirty_region %s.\n", debug_box(dirty_region));
@@ -1679,6 +1751,9 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
@@ -1680,6 +1752,9 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
wined3d_texture_invalidate_location(texture, sub_resource_idx, ~texture->resource.map_binding);
context_release(context);
@@ -3338,7 +3338,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
return WINED3D_OK;
}
@@ -1912,7 +1987,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
@@ -1913,7 +1988,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
}
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
{
@@ -3350,7 +3350,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);
@@ -1957,7 +2036,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
@@ -1958,7 +2037,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))
{
@@ -3362,7 +3362,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);
@@ -2251,8 +2334,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
@@ -2252,8 +2335,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_DISCARDED);
}
@@ -3376,7 +3376,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
if (resource->type == WINED3D_RTYPE_TEXTURE_2D)
{
@@ -2856,6 +2944,9 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
@@ -2857,6 +2945,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);
@@ -3386,7 +3386,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
if (!surface->dc)
{
wined3d_texture_cleanup_sync(texture);
@@ -3036,7 +3127,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
@@ -3037,7 +3128,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
}
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
{
@@ -3398,7 +3398,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);
@@ -3082,7 +3177,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
@@ -3083,7 +3178,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))
{
@@ -3410,7 +3410,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);
@@ -3303,8 +3402,18 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
@@ -3304,8 +3403,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 && src_texture->sub_resources[src_sub_resource_idx].map_count))
{
@@ -3429,7 +3429,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
}
if ((dst_format_flags & WINED3DFMT_FLAG_BLOCKS) && (flags & WINED3D_BLT_COLOR_FILL))
@@ -3653,7 +3762,14 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
@@ -3654,7 +3763,14 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
return WINED3DERR_INVALIDCALL;
if (!surface->dc)
@@ -3444,7 +3444,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
if (!surface->dc)
return WINED3DERR_INVALIDCALL;
@@ -3697,7 +3813,14 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
@@ -3698,7 +3814,14 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
}
if (!(texture->resource.usage & WINED3DUSAGE_OWNDC) && !(device->wined3d->flags & WINED3D_NO3D))
@@ -3483,7 +3483,7 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
wined3d_cs_init_object(resource->device->cs, wined3d_shader_resource_view_cs_init, view);
return WINED3D_OK;
@@ -786,6 +793,10 @@ static void wined3d_unordered_access_view_cs_init(void *object)
@@ -791,6 +798,10 @@ static void wined3d_unordered_access_view_cs_init(void *object)
desc, texture, view->format);
}
}
@@ -3494,7 +3494,7 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
}
static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_access_view *view,
@@ -805,6 +816,9 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces
@@ -810,6 +821,9 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces
wined3d_resource_incref(view->resource = resource);
@@ -3630,7 +3630,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
} sub_resources[1];
};
@@ -3205,6 +3239,7 @@ enum wined3d_push_constants
@@ -3208,6 +3242,7 @@ enum wined3d_push_constants
WINED3D_PUSH_CONSTANTS_PS_B,
};
@@ -3638,7 +3638,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_cs_ops
{
void *(*require_space)(struct wined3d_cs *cs, size_t size);
@@ -3212,6 +3247,33 @@ struct wined3d_cs_ops
@@ -3215,6 +3250,33 @@ struct wined3d_cs_ops
void (*push_constants)(struct wined3d_cs *cs, enum wined3d_push_constants p,
unsigned int start_idx, unsigned int count, const void *constants);
};
@@ -3672,7 +3672,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_cs
{
@@ -3222,8 +3284,31 @@ struct wined3d_cs
@@ -3225,8 +3287,31 @@ struct wined3d_cs
size_t data_size, start, end;
void *data;
@@ -3704,7 +3704,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;
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_destroy_object(struct wined3d_cs *cs,
@@ -3234,15 +3319,30 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
@@ -3237,15 +3322,30 @@ void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, struct wined3d_reso
const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
@@ -3735,7 +3735,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx,
const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN;
@@ -3290,10 +3390,20 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined
@@ -3293,10 +3393,20 @@ 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;
@@ -3756,7 +3756,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_cs_init_object(struct wined3d_cs *cs,
void (*callback)(void *object), void *object) DECLSPEC_HIDDEN;
HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx,
@@ -3301,12 +3411,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
@@ -3304,12 +3414,14 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource,
HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx) DECLSPEC_HIDDEN;