Rebase against 36187987ed92f1e6662cfd739e0f67d7ff58a9f3.

This commit is contained in:
Sebastian Lackner
2016-02-04 09:09:45 +01:00
parent ec3240b174
commit 7f4d6429ad
6 changed files with 65 additions and 56 deletions

View File

@@ -1,4 +1,4 @@
From 8ac3b701d1b19249fff35e7db8bc4e12212c0886 Mon Sep 17 00:00:00 2001
From bc6576d6ab3915b43d6b70206138622ead42110e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 20:25:01 +0100
Subject: wined3d: Make surface_load_location return nothing.
@@ -9,10 +9,10 @@ Subject: wined3d: Make surface_load_location return nothing.
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 0f16f79..6490235 100644
index 4e593e4..8b8ac0d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4239,7 +4239,7 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
@@ -4118,7 +4118,7 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
}
/* Context activation is done by the caller. Context may be NULL in ddraw-only mode. */
@@ -21,7 +21,7 @@ index 0f16f79..6490235 100644
{
HRESULT hr;
@@ -4251,26 +4251,26 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4130,26 +4130,26 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
&& surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
{
surface_load_ds_location(surface, context, location);
@@ -52,7 +52,7 @@ index 0f16f79..6490235 100644
}
if (WARN_ON(d3d_surface))
@@ -4284,7 +4284,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4163,7 +4163,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
if (!surface->locations)
{
ERR("Surface %p does not have any up to date location.\n", surface);
@@ -61,7 +61,7 @@ index 0f16f79..6490235 100644
}
switch (location)
@@ -4298,7 +4298,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4177,7 +4177,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
case WINED3D_LOCATION_DRAWABLE:
if (FAILED(hr = surface_load_drawable(surface, context)))
@@ -70,7 +70,7 @@ index 0f16f79..6490235 100644
break;
case WINED3D_LOCATION_RB_RESOLVED:
@@ -4310,7 +4310,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4189,7 +4189,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
case WINED3D_LOCATION_TEXTURE_SRGB:
if (FAILED(hr = surface_load_texture(surface, context,
location == WINED3D_LOCATION_TEXTURE_SRGB)))
@@ -79,7 +79,7 @@ index 0f16f79..6490235 100644
break;
default:
@@ -4323,7 +4323,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
@@ -4202,7 +4202,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
if (location != WINED3D_LOCATION_SYSMEM && (surface->locations & WINED3D_LOCATION_SYSMEM))
surface_evict_sysmem(surface);
@@ -89,18 +89,18 @@ index 0f16f79..6490235 100644
static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; }
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 593456e..c120937 100644
index 02c09af..1c0c689 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2463,7 +2463,7 @@ void surface_load_ds_location(struct wined3d_surface *surface,
@@ -2549,7 +2549,7 @@ void surface_load_ds_location(struct wined3d_surface *surface,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
struct wined3d_context *context) DECLSPEC_HIDDEN;
-HRESULT surface_load_location(struct wined3d_surface *surface,
+void surface_load_location(struct wined3d_surface *surface,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context,
HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_desc *map_desc,
const struct wined3d_box *box, DWORD flags) DECLSPEC_HIDDEN;
--
2.6.2
2.7.0

View File

@@ -1,4 +1,4 @@
From 23073dd21edfc9da7aea0cc40689f813da6e93f5 Mon Sep 17 00:00:00 2001
From 5c7c9517db811764d7c14ec2fb10ee4ded9ea4da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 20:33:17 +0100
Subject: wined3d: Replace surface_load_location with resource_load_location.
@@ -63,7 +63,7 @@ index 9ba6ef7..0afeff9 100644
}
else
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index a799143..604a79c 100644
index 078befb..1721c6e 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -735,7 +735,7 @@ static void surface_unmap(struct wined3d_surface *surface)
@@ -151,7 +151,7 @@ index a799143..604a79c 100644
surface_evict_sysmem(surface);
}
@@ -2666,7 +2648,7 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2666,7 +2648,7 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
if (surface->resource.device->d3d_initialized)
context = context_acquire(surface->resource.device, NULL);
@@ -389,18 +389,18 @@ index 49bc782..dd3a600 100644
if (context)
context_release(context);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a62459c..afc8c4e 100644
index 0ef35dd..c9985c0 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2519,8 +2519,6 @@ void surface_load_ds_location(struct wined3d_surface *surface,
@@ -2551,8 +2551,6 @@ void surface_load_ds_location(struct wined3d_surface *surface,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
struct wined3d_context *context) DECLSPEC_HIDDEN;
-void surface_load_location(struct wined3d_surface *surface,
- struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_desc *map_desc,
const struct wined3d_box *box, DWORD flags) DECLSPEC_HIDDEN;
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context,
DWORD location) DECLSPEC_HIDDEN;
--
2.7.0

View File

@@ -1,4 +1,4 @@
From e331bfd377b81bc93649d5a7f744929f6b6009bc Mon Sep 17 00:00:00 2001
From 1dcec444b4b710b583a251e585bb46b00c7ee420 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Thu, 19 Sep 2013 18:00:23 +0200
Subject: wined3d: Use resource_map for surface_map.
@@ -23,7 +23,7 @@ index 9b5445d..ba0e1c9 100644
if (device->d3d_initialized)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index fbebca5..0eb56d5 100644
index 296f448..6201928 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2365,28 +2365,18 @@ do { \
@@ -59,8 +59,8 @@ index fbebca5..0eb56d5 100644
+ return hr;
}
HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2394,18 +2384,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_desc *map_desc,
@@ -2394,18 +2384,6 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
{
const struct wined3d_format *format = surface->resource.format;
unsigned int fmt_flags = surface->container->resource.format_flags;
@@ -79,7 +79,7 @@ index fbebca5..0eb56d5 100644
if ((fmt_flags & WINED3DFMT_FLAG_BLOCKS) && box
&& !surface_check_block_align(surface, box))
@@ -2417,11 +2395,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2417,11 +2395,6 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
return WINED3DERR_INVALIDCALL;
}
@@ -91,7 +91,7 @@ index fbebca5..0eb56d5 100644
/* Performance optimization: Count how often a surface is mapped, if it is
* mapped regularly do not throw away the system memory copy. This avoids
* the need to download the surface from OpenGL all the time. The surface
@@ -2437,72 +2410,22 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
@@ -2437,72 +2410,22 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_
}
}

View File

@@ -5878,7 +5878,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
+#endif /* STAGING_CSMT */
}
HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_desc *map_desc,
@@ -2426,6 +2941,21 @@
{
const struct wined3d_format *format = surface->resource.format;
@@ -9493,10 +9493,10 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
+HRESULT surface_load_location(struct wined3d_surface *surface,
+ struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
+#endif /* STAGING_CSMT */
HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_desc *map_desc,
const struct wined3d_box *box, DWORD flags) DECLSPEC_HIDDEN;
void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context,
DWORD location) DECLSPEC_HIDDEN;
@@ -2642,6 +2805,7 @@
@@ -2644,6 +2807,7 @@
const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) 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;
@@ -9504,7 +9504,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
GLenum target, unsigned int level, unsigned int layer, DWORD flags,
struct wined3d_surface **surface) DECLSPEC_HIDDEN;
@@ -2656,6 +2820,17 @@
@@ -2658,6 +2822,17 @@
void wined3d_surface_cleanup_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_surface_getdc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_surface_releasedc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
@@ -9522,7 +9522,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context,
const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
@@ -2676,8 +2851,10 @@
@@ -2678,8 +2853,10 @@
GLuint name;
};
@@ -9533,7 +9533,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_vertex_declaration_element
{
const struct wined3d_format *format;
@@ -2706,8 +2883,10 @@
@@ -2708,8 +2885,10 @@
BOOL half_float_conv_needed;
};
@@ -9544,7 +9544,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_saved_states
{
DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1];
@@ -2775,6 +2954,7 @@
@@ -2777,6 +2956,7 @@
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
@@ -9552,7 +9552,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl_info,
const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN;
void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN;
@@ -2825,6 +3005,32 @@
@@ -2827,6 +3007,32 @@
void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN;
void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs, struct wined3d_context *context,
struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN;
@@ -9585,7 +9585,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
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;
@@ -2874,6 +3080,7 @@
@@ -2876,6 +3082,7 @@
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;
@@ -9593,7 +9593,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const float *constants,
UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN;
void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register,
@@ -2936,6 +3143,7 @@
@@ -2938,6 +3145,7 @@
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int depth_pitch) DECLSPEC_HIDDEN;
@@ -9601,7 +9601,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* Direct3D terminology with little modifications. We do not have an issued state
* because only the driver knows about it, but we have a created state because d3d
@@ -2950,8 +3158,12 @@
@@ -2952,8 +3160,12 @@
struct wined3d_query_ops
{
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
@@ -9614,7 +9614,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_query
@@ -2965,12 +3177,16 @@
@@ -2967,12 +3179,16 @@
enum wined3d_query_type type;
DWORD data_size;
void *extendedData;
@@ -9631,7 +9631,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
@@ -2997,7 +3213,9 @@
@@ -2999,7 +3215,9 @@
GLenum buffer_object_usage;
GLenum buffer_type_hint;
DWORD flags;
@@ -9641,7 +9641,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *map_ptr;
struct wined3d_map_range *maps;
@@ -3022,11 +3240,15 @@
@@ -3024,11 +3242,15 @@
BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *context) DECLSPEC_HIDDEN;
void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context,
const struct wined3d_state *state) DECLSPEC_HIDDEN;
@@ -9657,7 +9657,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
const struct wined3d_box *box, const void *data) DECLSPEC_HIDDEN;
@@ -3064,8 +3286,10 @@
@@ -3066,8 +3288,10 @@
return surface_from_resource(resource);
}
@@ -9668,7 +9668,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
struct wined3d_shader_resource_view
{
LONG refcount;
@@ -3078,8 +3302,12 @@
@@ -3080,8 +3304,12 @@
struct wined3d_swapchain_ops
{
void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect,
@@ -9681,7 +9681,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
};
struct wined3d_swapchain
@@ -3118,8 +3346,10 @@
@@ -3120,8 +3348,10 @@
void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
@@ -9692,7 +9692,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
/*****************************************************************************
* Utility function prototypes
@@ -3322,7 +3552,9 @@
@@ -3324,7 +3554,9 @@
void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer,
const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) DECLSPEC_HIDDEN;
BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage) DECLSPEC_HIDDEN;