You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-12-15 08:03:15 -08:00
Rebase against f7e9604c3eb9082d3a1b0172ec7e3b21234fe7b7.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 35337f1570ec9899633d2bd65bed78c3a086ebbe Mon Sep 17 00:00:00 2001
|
||||
From 5d8735b2ffacc388879177422898deffd32ef841 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Mon, 29 Apr 2013 18:49:53 +0200
|
||||
Subject: wined3d: Send blits through the command stream.
|
||||
@@ -122,19 +122,19 @@ index de9fc9b..9fc92cf 100644
|
||||
{
|
||||
struct wined3d_cs_block *block;
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index bbbfe27..b13bc48 100644
|
||||
index 9fafb6b..dfe5c73 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -4850,7 +4850,7 @@ const struct blit_shader cpu_blit = {
|
||||
@@ -4857,7 +4857,7 @@ const struct blit_shader cpu_blit = {
|
||||
cpu_blit_blit_surface,
|
||||
};
|
||||
|
||||
-HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
-HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
+void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
|
||||
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
|
||||
{
|
||||
@@ -4868,103 +4868,6 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -4875,103 +4875,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
| WINEDDBLT_DONOTWAIT
|
||||
| WINEDDBLT_ALPHATEST;
|
||||
|
||||
@@ -238,7 +238,7 @@ index bbbfe27..b13bc48 100644
|
||||
if (!device->d3d_initialized)
|
||||
{
|
||||
WARN("D3D not initialized, using fallback.\n");
|
||||
@@ -5028,22 +4931,16 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5035,22 +4938,16 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
TRACE("Depth fill.\n");
|
||||
|
||||
if (!surface_convert_depth_to_float(dst_surface, fx->u5.dwFillDepth, &depth))
|
||||
@@ -264,7 +264,7 @@ index bbbfe27..b13bc48 100644
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -5075,7 +4972,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5082,7 +4979,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
goto fallback;
|
||||
|
||||
if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color)))
|
||||
@@ -273,7 +273,7 @@ index bbbfe27..b13bc48 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5118,7 +5015,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5125,7 +5022,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
dst_surface->container->resource.draw_binding);
|
||||
context_release(context);
|
||||
}
|
||||
@@ -282,7 +282,7 @@ index bbbfe27..b13bc48 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5142,7 +5039,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5149,7 +5046,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
|
||||
dst_swapchain->desc.swap_effect = swap_effect;
|
||||
|
||||
@@ -291,7 +291,7 @@ index bbbfe27..b13bc48 100644
|
||||
}
|
||||
|
||||
if (fbo_blit_supported(&device->adapter->gl_info, blit_op,
|
||||
@@ -5161,7 +5058,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5168,7 +5065,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding);
|
||||
wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->container->resource.draw_binding);
|
||||
|
||||
@@ -300,7 +300,7 @@ index bbbfe27..b13bc48 100644
|
||||
}
|
||||
|
||||
blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op,
|
||||
@@ -5171,18 +5068,151 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
|
||||
@@ -5178,18 +5075,151 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
{
|
||||
blitter->blit_surface(device, blit_op, filter, src_surface,
|
||||
src_rect, dst_surface, dst_rect, color_key);
|
||||
@@ -327,7 +327,7 @@ index bbbfe27..b13bc48 100644
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
+HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
+ struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
|
||||
+ const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
|
||||
+{
|
||||
@@ -457,10 +457,10 @@ index bbbfe27..b13bc48 100644
|
||||
|
||||
static const struct wined3d_resource_ops surface_resource_ops =
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index b5b1c81..43de51a 100644
|
||||
index 6b95f46..b93988c 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2548,6 +2548,9 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
@@ -2557,6 +2557,9 @@ void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
|
||||
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
|
||||
BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
|
||||
@@ -470,7 +470,7 @@ index b5b1c81..43de51a 100644
|
||||
|
||||
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;
|
||||
@@ -2694,6 +2697,7 @@ struct wined3d_cs
|
||||
@@ -2703,6 +2706,7 @@ struct wined3d_cs
|
||||
struct wined3d_device *device;
|
||||
struct wined3d_state state;
|
||||
HANDLE thread;
|
||||
@@ -478,7 +478,7 @@ index b5b1c81..43de51a 100644
|
||||
DWORD tls_idx;
|
||||
struct wined3d_surface *onscreen_depth_stencil;
|
||||
|
||||
@@ -2772,6 +2776,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
|
||||
@@ -2781,6 +2785,10 @@ void wined3d_cs_emit_set_primitive_type(struct wined3d_cs *cs,
|
||||
GLenum primitive_type) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, UINT idx, BOOL enable) DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -7286,7 +7286,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
+#if defined(STAGING_CSMT)
|
||||
void surface_blt_ugly(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
+#else /* STAGING_CSMT */
|
||||
+HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
+HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect,
|
||||
+#endif /* STAGING_CSMT */
|
||||
struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags,
|
||||
const WINEDDBLTFX *fx, enum wined3d_texture_filter_type filter)
|
||||
@@ -9484,7 +9484,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
GLuint rb_multisample;
|
||||
GLuint rb_resolved;
|
||||
GLenum texture_target;
|
||||
@@ -2575,11 +2727,22 @@
|
||||
@@ -2578,11 +2730,22 @@
|
||||
GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context,
|
||||
unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN;
|
||||
@@ -9507,7 +9507,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
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;
|
||||
@@ -2591,6 +2754,7 @@
|
||||
@@ -2594,6 +2757,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;
|
||||
@@ -9515,7 +9515,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;
|
||||
@@ -2605,6 +2769,17 @@
|
||||
@@ -2608,6 +2772,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;
|
||||
@@ -9533,7 +9533,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;
|
||||
@@ -2625,8 +2800,10 @@
|
||||
@@ -2628,8 +2803,10 @@
|
||||
GLuint name;
|
||||
};
|
||||
|
||||
@@ -9544,7 +9544,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;
|
||||
@@ -2655,8 +2832,10 @@
|
||||
@@ -2658,8 +2835,10 @@
|
||||
BOOL half_float_conv_needed;
|
||||
};
|
||||
|
||||
@@ -9555,7 +9555,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];
|
||||
@@ -2724,6 +2903,7 @@
|
||||
@@ -2727,6 +2906,7 @@
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@@ -9563,7 +9563,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;
|
||||
@@ -2774,6 +2954,32 @@
|
||||
@@ -2777,6 +2957,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;
|
||||
@@ -9596,7 +9596,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;
|
||||
@@ -2823,6 +3029,7 @@
|
||||
@@ -2826,6 +3032,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;
|
||||
@@ -9604,7 +9604,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,
|
||||
@@ -2886,6 +3093,7 @@
|
||||
@@ -2889,6 +3096,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;
|
||||
@@ -9612,7 +9612,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
|
||||
@@ -2900,8 +3108,12 @@
|
||||
@@ -2903,8 +3111,12 @@
|
||||
struct wined3d_query_ops
|
||||
{
|
||||
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
|
||||
@@ -9625,7 +9625,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
struct wined3d_query
|
||||
@@ -2915,12 +3127,16 @@
|
||||
@@ -2918,12 +3130,16 @@
|
||||
enum wined3d_query_type type;
|
||||
DWORD data_size;
|
||||
void *extendedData;
|
||||
@@ -9642,7 +9642,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 */
|
||||
@@ -2947,7 +3163,9 @@
|
||||
@@ -2950,7 +3166,9 @@
|
||||
GLenum buffer_object_usage;
|
||||
GLenum buffer_type_hint;
|
||||
DWORD flags;
|
||||
@@ -9652,7 +9652,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void *map_ptr;
|
||||
|
||||
struct wined3d_map_range *maps;
|
||||
@@ -2972,11 +3190,15 @@
|
||||
@@ -2975,11 +3193,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;
|
||||
@@ -9668,7 +9668,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;
|
||||
|
||||
@@ -3014,8 +3236,10 @@
|
||||
@@ -3017,8 +3239,10 @@
|
||||
return surface_from_resource(resource);
|
||||
}
|
||||
|
||||
@@ -9679,7 +9679,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_shader_resource_view
|
||||
{
|
||||
LONG refcount;
|
||||
@@ -3028,8 +3252,12 @@
|
||||
@@ -3031,8 +3255,12 @@
|
||||
struct wined3d_swapchain_ops
|
||||
{
|
||||
void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect,
|
||||
@@ -9692,7 +9692,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
struct wined3d_swapchain
|
||||
@@ -3068,8 +3296,10 @@
|
||||
@@ -3071,8 +3299,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;
|
||||
@@ -9703,7 +9703,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
/*****************************************************************************
|
||||
* Utility function prototypes
|
||||
@@ -3272,7 +3502,9 @@
|
||||
@@ -3275,7 +3505,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;
|
||||
|
||||
Reference in New Issue
Block a user