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 cde46665fa8503e90c9a2fab1898cdb4d22f667b.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From ba3b68f58c3e4a9b1cd20ebf8aea087e1adb0bf0 Mon Sep 17 00:00:00 2001
|
||||
From ede3d178fc2a2ddde4b50913afca7920472c83c5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Tue, 2 Apr 2013 17:25:19 +0200
|
||||
Subject: wined3d: Pass the state to draw_primitive
|
||||
@@ -8,14 +8,14 @@ Subject: wined3d: Pass the state to draw_primitive
|
||||
dlls/wined3d/context.c | 6 +++---
|
||||
dlls/wined3d/cs.c | 2 +-
|
||||
dlls/wined3d/directx.c | 2 +-
|
||||
dlls/wined3d/drawprim.c | 25 ++++++++++++-------------
|
||||
dlls/wined3d/drawprim.c | 27 +++++++++++++--------------
|
||||
dlls/wined3d/state.c | 4 ++--
|
||||
dlls/wined3d/utils.c | 2 +-
|
||||
dlls/wined3d/wined3d_private.h | 8 +++++---
|
||||
8 files changed, 28 insertions(+), 27 deletions(-)
|
||||
8 files changed, 29 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 00aae2a..5b39e40 100644
|
||||
index 50dbb2d..206e969 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -423,7 +423,7 @@ static inline void fixup_d3dcolor(DWORD *dst_color)
|
||||
@@ -27,7 +27,7 @@ index 00aae2a..5b39e40 100644
|
||||
* If we want that stuff to work on big endian machines too we have to consider more things
|
||||
*
|
||||
* 0xff000000: Alpha mask
|
||||
@@ -1185,11 +1185,11 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
|
||||
@@ -1184,11 +1184,11 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
|
||||
|
||||
dynamic_buffer_ok = gl_info->supported[APPLE_FLUSH_BUFFER_RANGE] || gl_info->supported[ARB_MAP_BUFFER_RANGE];
|
||||
|
||||
@@ -42,10 +42,10 @@ index 00aae2a..5b39e40 100644
|
||||
*/
|
||||
if (!gl_info->supported[ARB_VERTEX_BUFFER_OBJECT])
|
||||
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
|
||||
index a5d6478..d63dc6f 100644
|
||||
index 9be96dc..097e0e9 100644
|
||||
--- a/dlls/wined3d/context.c
|
||||
+++ b/dlls/wined3d/context.c
|
||||
@@ -2898,7 +2898,7 @@ static void context_update_stream_info(struct wined3d_context *context, const st
|
||||
@@ -2955,7 +2955,7 @@ static void context_update_stream_info(struct wined3d_context *context, const st
|
||||
{
|
||||
if (state->vertex_declaration->half_float_conv_needed && !stream_info->all_vbo)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ index a5d6478..d63dc6f 100644
|
||||
context->use_immediate_mode_draw = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -3038,9 +3038,9 @@ static void context_bind_shader_resources(struct wined3d_context *context, const
|
||||
@@ -3095,9 +3095,9 @@ static void context_bind_shader_resources(struct wined3d_context *context, const
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -67,10 +67,10 @@ index a5d6478..d63dc6f 100644
|
||||
const struct wined3d_fb_state *fb = &state->fb;
|
||||
unsigned int i, j;
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 520fcbf..3a0067e 100644
|
||||
index 8f1a016..84007cc 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -482,7 +482,7 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
@@ -492,7 +492,7 @@ static UINT wined3d_cs_exec_draw(struct wined3d_cs *cs, const void *data)
|
||||
{
|
||||
const struct wined3d_cs_draw *op = data;
|
||||
|
||||
@@ -80,10 +80,10 @@ index 520fcbf..3a0067e 100644
|
||||
|
||||
return sizeof(*op);
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index 3667840..b45aea5 100644
|
||||
index f238fc0..abc4aee 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -5341,7 +5341,7 @@ static void WINE_GLAPI invalid_texcoord_func(GLenum unit, const void *data)
|
||||
@@ -5329,7 +5329,7 @@ static void WINE_GLAPI invalid_texcoord_func(GLenum unit, const void *data)
|
||||
}
|
||||
|
||||
/* Helper functions for providing vertex data to opengl. The arrays are initialized based on
|
||||
@@ -93,7 +93,7 @@ index 3667840..b45aea5 100644
|
||||
static void WINE_GLAPI position_d3dcolor(const void *data)
|
||||
{
|
||||
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
index 00ada90..d6319ba 100644
|
||||
index b10bc45..529bcd6 100644
|
||||
--- a/dlls/wined3d/drawprim.c
|
||||
+++ b/dlls/wined3d/drawprim.c
|
||||
@@ -36,7 +36,7 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
|
||||
@@ -105,7 +105,7 @@ index 00ada90..d6319ba 100644
|
||||
const void *idx_data, UINT start_idx, INT base_vertex_index, UINT start_instance, UINT instance_count)
|
||||
{
|
||||
if (idx_size)
|
||||
@@ -85,7 +85,7 @@ static void drawStridedFast(const struct wined3d_gl_info *gl_info, GLenum primit
|
||||
@@ -95,7 +95,7 @@ static void drawStridedFast(const struct wined3d_gl_info *gl_info, GLenum primit
|
||||
*/
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -114,7 +114,7 @@ index 00ada90..d6319ba 100644
|
||||
const struct wined3d_stream_info *si, UINT NumVertexes, GLenum glPrimType,
|
||||
const void *idxData, UINT idxSize, UINT startIdx)
|
||||
{
|
||||
@@ -93,7 +93,6 @@ static void drawStridedSlow(const struct wined3d_device *device, struct wined3d_
|
||||
@@ -103,7 +103,6 @@ static void drawStridedSlow(const struct wined3d_device *device, struct wined3d_
|
||||
const WORD *pIdxBufS = NULL;
|
||||
const DWORD *pIdxBufL = NULL;
|
||||
UINT vx_index;
|
||||
@@ -122,7 +122,7 @@ index 00ada90..d6319ba 100644
|
||||
LONG SkipnStrides = startIdx;
|
||||
BOOL pixelShader = use_ps(state);
|
||||
BOOL specular_fog = FALSE;
|
||||
@@ -443,7 +442,7 @@ static inline void send_attribute(const struct wined3d_gl_info *gl_info,
|
||||
@@ -453,7 +452,7 @@ static inline void send_attribute(const struct wined3d_gl_info *gl_info,
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -131,7 +131,7 @@ index 00ada90..d6319ba 100644
|
||||
const struct wined3d_stream_info *si, UINT numberOfVertices, GLenum glPrimitiveType,
|
||||
const void *idxData, UINT idxSize, UINT startIdx)
|
||||
{
|
||||
@@ -500,7 +499,7 @@ static void drawStridedSlowVs(struct wined3d_context *context, const struct wine
|
||||
@@ -510,7 +509,7 @@ static void drawStridedSlowVs(struct wined3d_context *context, const struct wine
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@@ -140,7 +140,7 @@ index 00ada90..d6319ba 100644
|
||||
const struct wined3d_stream_info *si, UINT numberOfVertices, GLenum glPrimitiveType,
|
||||
const void *idxData, UINT idxSize, UINT startIdx, UINT base_vertex_index, UINT instance_count)
|
||||
{
|
||||
@@ -585,10 +584,10 @@ static void remove_vbos(struct wined3d_context *context,
|
||||
@@ -595,10 +594,10 @@ static void remove_vbos(struct wined3d_context *context,
|
||||
}
|
||||
|
||||
/* Routine common to the draw primitive and draw indexed primitive routines */
|
||||
@@ -154,7 +154,7 @@ index 00ada90..d6319ba 100644
|
||||
const struct wined3d_stream_info *stream_info;
|
||||
struct wined3d_event_query *ib_query = NULL;
|
||||
struct wined3d_stream_info si_emulated;
|
||||
@@ -654,7 +653,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@@ -664,7 +663,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ index 00ada90..d6319ba 100644
|
||||
{
|
||||
context_release(context);
|
||||
WARN("Unable to apply draw state, skipping draw.\n");
|
||||
@@ -746,24 +745,24 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
@@ -756,28 +755,28 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
|
||||
else
|
||||
WARN_(d3d_perf)("Using immediate mode with vertex shaders for half float emulation.\n");
|
||||
|
||||
@@ -173,9 +173,14 @@ index 00ada90..d6319ba 100644
|
||||
}
|
||||
else
|
||||
{
|
||||
- drawStridedSlow(device, context, stream_info, index_count,
|
||||
+ draw_strided_slow(state, context, stream_info, index_count,
|
||||
if (context->d3d_info->ffp_generic_attributes)
|
||||
- drawStridedSlowVs(context, state, stream_info, index_count,
|
||||
+ draw_strided_slow_vs(context, state, stream_info, index_count,
|
||||
state->gl_primitive_type, idx_data, idx_size, start_idx);
|
||||
else
|
||||
- drawStridedSlow(device, context, stream_info, index_count,
|
||||
+ draw_strided_slow(state, context, stream_info, index_count,
|
||||
state->gl_primitive_type, idx_data, idx_size, start_idx);
|
||||
}
|
||||
}
|
||||
else if (!gl_info->supported[ARB_INSTANCED_ARRAYS] && instance_count)
|
||||
@@ -193,10 +198,10 @@ index 00ada90..d6319ba 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index af26308..4b73613 100644
|
||||
index e2fcc5d..be26f8f 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -1164,7 +1164,7 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
|
||||
@@ -1126,7 +1126,7 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
|
||||
|
||||
case WINED3D_FOG_NONE:
|
||||
/* Both are none? According to msdn the alpha channel of the specular
|
||||
@@ -205,7 +210,7 @@ index af26308..4b73613 100644
|
||||
* Same happens with Vertexfog on transformed vertices
|
||||
*/
|
||||
new_source = FOGSOURCE_COORD;
|
||||
@@ -4408,7 +4408,7 @@ static void load_vertex_data(struct wined3d_context *context,
|
||||
@@ -4190,7 +4190,7 @@ static void load_vertex_data(struct wined3d_context *context,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -215,10 +220,10 @@ index af26308..4b73613 100644
|
||||
*/
|
||||
WARN("unsupported blending in openGl\n");
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 248fac8..a981575 100644
|
||||
index 3465299..dfa9ee4 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -3242,7 +3242,7 @@ void set_texture_matrix(const struct wined3d_gl_info *gl_info, const struct wine
|
||||
@@ -3647,7 +3647,7 @@ static void compute_texture_matrix(const struct wined3d_gl_info *gl_info, const
|
||||
* check for pixel shaders, and the shader has to undo the default gl divide.
|
||||
*
|
||||
* A more serious problem occurs if the app passes 4 coordinates in, and the
|
||||
@@ -228,10 +233,10 @@ index 248fac8..a981575 100644
|
||||
default:
|
||||
mat._14 = mat._24 = mat._34 = 0.0f; mat._44 = 1.0f;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index f2fb5a6..09893ea 100644
|
||||
index f9bb9d0..a8af32e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -994,8 +994,9 @@ struct wined3d_stream_info
|
||||
@@ -1010,8 +1010,9 @@ struct wined3d_stream_info
|
||||
WORD use_map; /* MAX_ATTRIBS, 16 */
|
||||
};
|
||||
|
||||
@@ -243,7 +248,7 @@ index f2fb5a6..09893ea 100644
|
||||
DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN;
|
||||
|
||||
#define eps 1e-8f
|
||||
@@ -1390,7 +1391,8 @@ void context_alloc_occlusion_query(struct wined3d_context *context,
|
||||
@@ -1417,7 +1418,8 @@ void context_alloc_occlusion_query(struct wined3d_context *context,
|
||||
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_device *device,
|
||||
UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN;
|
||||
@@ -254,5 +259,5 @@ index f2fb5a6..09893ea 100644
|
||||
struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN;
|
||||
void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info,
|
||||
--
|
||||
2.3.2
|
||||
2.4.2
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
float scale;
|
||||
|
||||
union
|
||||
@@ -4188,9 +4220,15 @@
|
||||
@@ -4190,9 +4222,15 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -424,7 +424,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
WARN("unsupported blending in openGl\n");
|
||||
}
|
||||
}
|
||||
@@ -4542,7 +4580,11 @@
|
||||
@@ -4546,7 +4584,11 @@
|
||||
|
||||
static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@@ -436,7 +436,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct wined3d_viewport vp = state->viewport;
|
||||
|
||||
@@ -4720,7 +4762,11 @@
|
||||
@@ -4724,7 +4766,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -448,7 +448,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
UINT height;
|
||||
UINT width;
|
||||
|
||||
@@ -4784,7 +4830,11 @@
|
||||
@@ -4788,7 +4834,11 @@
|
||||
|
||||
void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
@@ -1685,7 +1685,7 @@ diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -17171,7 +17171,11 @@
|
||||
@@ -17301,7 +17301,11 @@
|
||||
fill_surface(surface_managed, 0x0000ff00, D3DLOCK_NO_DIRTY_UPDATE);
|
||||
add_dirty_rect_test_draw(device);
|
||||
color = getPixelColor(device, 320, 240);
|
||||
@@ -1758,7 +1758,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
|
||||
@@ -1011,9 +1041,14 @@
|
||||
@@ -1012,9 +1042,14 @@
|
||||
WORD use_map; /* MAX_ATTRIBS, 16 */
|
||||
};
|
||||
|
||||
@@ -1773,7 +1773,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN;
|
||||
|
||||
#define eps 1e-8f
|
||||
@@ -1101,8 +1136,10 @@
|
||||
@@ -1102,8 +1137,10 @@
|
||||
struct list entry;
|
||||
GLuint id;
|
||||
struct wined3d_context *context;
|
||||
@@ -1784,7 +1784,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
union wined3d_gl_query_object
|
||||
@@ -1138,6 +1175,7 @@
|
||||
@@ -1139,6 +1176,7 @@
|
||||
struct list entry;
|
||||
GLuint id;
|
||||
struct wined3d_context *context;
|
||||
@@ -1792,7 +1792,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
UINT64 timestamp;
|
||||
};
|
||||
|
||||
@@ -1173,6 +1211,12 @@
|
||||
@@ -1174,6 +1212,12 @@
|
||||
for (i = 0; i < min(dst->rt_size, src->rt_size); i++)
|
||||
dst->render_targets[i] = src->render_targets[i];
|
||||
}
|
||||
@@ -1805,7 +1805,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
struct wined3d_context
|
||||
{
|
||||
@@ -1188,7 +1232,9 @@
|
||||
@@ -1189,7 +1233,9 @@
|
||||
DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */
|
||||
DWORD numDirtyEntries;
|
||||
DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */
|
||||
@@ -1815,7 +1815,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
struct wined3d_swapchain *swapchain;
|
||||
struct wined3d_surface *current_rt;
|
||||
@@ -1288,8 +1334,17 @@
|
||||
@@ -1289,8 +1335,17 @@
|
||||
GLfloat fog_coord_value;
|
||||
GLfloat color[4], fogstart, fogend, fogcolor[4];
|
||||
GLuint dummy_arbfp_prog;
|
||||
@@ -1833,7 +1833,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
|
||||
@@ -1423,8 +1478,12 @@
|
||||
@@ -1425,8 +1480,12 @@
|
||||
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_device *device,
|
||||
UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN;
|
||||
@@ -1846,7 +1846,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target,
|
||||
struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN;
|
||||
void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info,
|
||||
@@ -1976,7 +2035,11 @@
|
||||
@@ -1979,7 +2038,11 @@
|
||||
struct wined3d_state
|
||||
{
|
||||
DWORD flags;
|
||||
@@ -1858,7 +1858,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
struct wined3d_vertex_declaration *vertex_declaration;
|
||||
struct wined3d_stream_output stream_output[MAX_STREAM_OUT];
|
||||
@@ -2021,6 +2084,7 @@
|
||||
@@ -2024,6 +2087,7 @@
|
||||
DWORD render_states[WINEHIGHEST_RENDER_STATE + 1];
|
||||
};
|
||||
|
||||
@@ -1866,7 +1866,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_gl_bo
|
||||
{
|
||||
GLuint name;
|
||||
@@ -2029,6 +2093,7 @@
|
||||
@@ -2032,6 +2096,7 @@
|
||||
UINT size;
|
||||
};
|
||||
|
||||
@@ -1874,7 +1874,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
|
||||
@@ -2084,11 +2149,23 @@
|
||||
@@ -2087,11 +2152,23 @@
|
||||
struct wined3d_rendertarget_view *back_buffer_view;
|
||||
struct wined3d_swapchain **swapchains;
|
||||
UINT swapchain_count;
|
||||
@@ -1898,7 +1898,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
/* For rendering to a texture using glCopyTexImage */
|
||||
GLuint depth_blt_texture;
|
||||
@@ -2099,6 +2176,9 @@
|
||||
@@ -2102,6 +2179,9 @@
|
||||
UINT xScreenSpace;
|
||||
UINT yScreenSpace;
|
||||
UINT cursorWidth, cursorHeight;
|
||||
@@ -1908,7 +1908,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
HCURSOR hardwareCursor;
|
||||
|
||||
/* The Wine logo texture */
|
||||
@@ -2130,6 +2210,7 @@
|
||||
@@ -2133,6 +2213,7 @@
|
||||
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
|
||||
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;
|
||||
@@ -1916,7 +1916,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN;
|
||||
void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture,
|
||||
@@ -2141,6 +2222,11 @@
|
||||
@@ -2144,6 +2225,11 @@
|
||||
void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
void device_delete_opengl_contexts_cs(struct wined3d_device *device,
|
||||
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
@@ -1928,7 +1928,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)
|
||||
{
|
||||
@@ -2157,9 +2243,11 @@
|
||||
@@ -2160,9 +2246,11 @@
|
||||
ULONG (*resource_incref)(struct wined3d_resource *resource);
|
||||
ULONG (*resource_decref)(struct wined3d_resource *resource);
|
||||
void (*resource_unload)(struct wined3d_resource *resource);
|
||||
@@ -1940,7 +1940,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
struct wined3d_resource
|
||||
@@ -2184,6 +2272,7 @@
|
||||
@@ -2187,6 +2275,7 @@
|
||||
UINT depth;
|
||||
UINT size;
|
||||
DWORD priority;
|
||||
@@ -1948,7 +1948,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void *heap_memory, *map_heap_memory, *user_memory, *bitmap_data;
|
||||
UINT custom_row_pitch, custom_slice_pitch;
|
||||
struct wined3d_gl_bo *buffer, *map_buffer;
|
||||
@@ -2191,6 +2280,11 @@
|
||||
@@ -2194,6 +2283,11 @@
|
||||
DWORD locations;
|
||||
LONG access_fence;
|
||||
BOOL unmap_dirtify;
|
||||
@@ -1960,7 +1960,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
void *parent;
|
||||
const struct wined3d_parent_ops *parent_ops;
|
||||
@@ -2215,6 +2309,7 @@
|
||||
@@ -2218,6 +2312,7 @@
|
||||
void *parent, const struct wined3d_parent_ops *parent_ops,
|
||||
const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN;
|
||||
void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
@@ -1968,7 +1968,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void wined3d_resource_changed(struct wined3d_resource *resource,
|
||||
@@ -2261,6 +2356,15 @@
|
||||
@@ -2264,6 +2359,15 @@
|
||||
{
|
||||
while(InterlockedCompareExchange(&resource->access_fence, 0, 0));
|
||||
}
|
||||
@@ -1984,7 +1984,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
/* Tests show that the start address of resources is 32 byte aligned */
|
||||
#define RESOURCE_ALIGNMENT 16
|
||||
@@ -2345,7 +2449,9 @@
|
||||
@@ -2348,7 +2452,9 @@
|
||||
|
||||
void wined3d_texture_apply_sampler_desc(struct wined3d_texture *texture,
|
||||
const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
@@ -1994,7 +1994,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture,
|
||||
@@ -2379,9 +2485,16 @@
|
||||
@@ -2382,9 +2488,16 @@
|
||||
struct wined3d_resource resource;
|
||||
struct wined3d_texture *container;
|
||||
|
||||
@@ -2011,7 +2011,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource)
|
||||
@@ -2389,6 +2502,7 @@
|
||||
@@ -2392,6 +2505,7 @@
|
||||
return CONTAINING_RECORD(resource, struct wined3d_volume, resource);
|
||||
}
|
||||
|
||||
@@ -2019,7 +2019,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc,
|
||||
unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN;
|
||||
void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN;
|
||||
@@ -2401,6 +2515,23 @@
|
||||
@@ -2404,6 +2518,23 @@
|
||||
struct wined3d_surface_dib
|
||||
{
|
||||
HBITMAP DIBsection;
|
||||
@@ -2043,7 +2043,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
UINT bitmap_size;
|
||||
};
|
||||
|
||||
@@ -2426,7 +2557,11 @@
|
||||
@@ -2429,7 +2560,11 @@
|
||||
struct wined3d_surface_ops
|
||||
{
|
||||
HRESULT (*surface_private_setup)(struct wined3d_surface *surface);
|
||||
@@ -2055,7 +2055,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
struct wined3d_surface
|
||||
@@ -2434,12 +2569,25 @@
|
||||
@@ -2437,12 +2572,25 @@
|
||||
struct wined3d_resource resource;
|
||||
const struct wined3d_surface_ops *surface_ops;
|
||||
struct wined3d_texture *container;
|
||||
@@ -2081,7 +2081,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
GLuint rb_multisample;
|
||||
GLuint rb_resolved;
|
||||
GLenum texture_target;
|
||||
@@ -2483,10 +2631,19 @@
|
||||
@@ -2486,10 +2634,19 @@
|
||||
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;
|
||||
@@ -2101,7 +2101,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 surface_prepare_rb(struct wined3d_surface *surface,
|
||||
const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN;
|
||||
@@ -2498,6 +2655,7 @@
|
||||
@@ -2501,6 +2658,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;
|
||||
@@ -2109,7 +2109,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;
|
||||
@@ -2516,6 +2674,21 @@
|
||||
@@ -2519,6 +2677,21 @@
|
||||
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;
|
||||
void surface_flip(struct wined3d_surface *front, struct wined3d_surface *back) DECLSPEC_HIDDEN;
|
||||
@@ -2131,7 +2131,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
/* Surface flags: */
|
||||
#define SFLAG_DIBSECTION 0x00000001 /* Has a DIB section attached for GetDC. */
|
||||
@@ -2563,8 +2736,10 @@
|
||||
@@ -2566,8 +2739,10 @@
|
||||
BOOL half_float_conv_needed;
|
||||
};
|
||||
|
||||
@@ -2142,7 +2142,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];
|
||||
@@ -2632,6 +2807,7 @@
|
||||
@@ -2635,6 +2810,7 @@
|
||||
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN;
|
||||
|
||||
void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN;
|
||||
@@ -2150,7 +2150,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;
|
||||
@@ -2682,6 +2858,32 @@
|
||||
@@ -2685,6 +2861,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;
|
||||
@@ -2183,7 +2183,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;
|
||||
@@ -2731,6 +2933,7 @@
|
||||
@@ -2734,6 +2936,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;
|
||||
@@ -2191,7 +2191,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,
|
||||
@@ -2790,6 +2993,7 @@
|
||||
@@ -2793,6 +2996,7 @@
|
||||
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_getdc(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void wined3d_cs_emit_releasedc(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
@@ -2199,7 +2199,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
|
||||
@@ -2804,8 +3008,12 @@
|
||||
@@ -2807,8 +3011,12 @@
|
||||
struct wined3d_query_ops
|
||||
{
|
||||
HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags);
|
||||
@@ -2212,7 +2212,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
struct wined3d_query
|
||||
@@ -2819,12 +3027,16 @@
|
||||
@@ -2822,12 +3030,16 @@
|
||||
enum wined3d_query_type type;
|
||||
DWORD data_size;
|
||||
void *extendedData;
|
||||
@@ -2229,7 +2229,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 */
|
||||
@@ -2851,7 +3063,9 @@
|
||||
@@ -2854,7 +3066,9 @@
|
||||
GLenum buffer_object_usage;
|
||||
GLenum buffer_type_hint;
|
||||
DWORD flags;
|
||||
@@ -2239,7 +2239,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
void *map_ptr;
|
||||
|
||||
struct wined3d_map_range *maps;
|
||||
@@ -2876,11 +3090,15 @@
|
||||
@@ -2879,11 +3093,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;
|
||||
@@ -2255,7 +2255,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
struct wined3d_rendertarget_view
|
||||
{
|
||||
@@ -2919,8 +3137,10 @@
|
||||
@@ -2922,8 +3140,10 @@
|
||||
return surface_from_resource(resource);
|
||||
}
|
||||
|
||||
@@ -2266,7 +2266,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
struct wined3d_shader_resource_view
|
||||
{
|
||||
LONG refcount;
|
||||
@@ -2933,8 +3153,12 @@
|
||||
@@ -2936,8 +3156,12 @@
|
||||
struct wined3d_swapchain_ops
|
||||
{
|
||||
void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect,
|
||||
@@ -2279,7 +2279,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
};
|
||||
|
||||
struct wined3d_swapchain
|
||||
@@ -2974,8 +3198,10 @@
|
||||
@@ -2977,8 +3201,10 @@
|
||||
HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
@@ -2290,7 +2290,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
|
||||
/*****************************************************************************
|
||||
* Utility function prototypes
|
||||
@@ -3179,7 +3405,9 @@
|
||||
@@ -3182,7 +3408,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;
|
||||
@@ -3048,7 +3048,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
draw_strided_slow_vs(context, state, stream_info, index_count,
|
||||
state->gl_primitive_type, idx_data, idx_size, start_idx);
|
||||
}
|
||||
@@ -773,6 +857,26 @@
|
||||
@@ -777,6 +861,30 @@
|
||||
else
|
||||
{
|
||||
draw_strided_fast(gl_info, state->gl_primitive_type, index_count, idx_size, idx_data,
|
||||
@@ -3058,8 +3058,12 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ drawStridedSlow(device, context, stream_info, index_count,
|
||||
+ if (context->d3d_info->ffp_generic_attributes)
|
||||
+ drawStridedSlowVs(context, state, stream_info, index_count,
|
||||
+ state->gl_primitive_type, idx_data, idx_size, start_idx);
|
||||
+ else
|
||||
+ drawStridedSlow(device, context, stream_info, index_count,
|
||||
+ state->gl_primitive_type, idx_data, idx_size, start_idx);
|
||||
+ }
|
||||
+ }
|
||||
+ else if (!gl_info->supported[ARB_INSTANCED_ARRAYS] && instance_count)
|
||||
@@ -9607,7 +9611,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -5327,9 +5327,15 @@
|
||||
@@ -5328,9 +5328,15 @@
|
||||
DebugBreak();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user