[PATCH 2/5] wined3d: Rename the device "strided_streams" field to "stream_info".
Henri Verbeet
hverbeet at codeweavers.com
Mon Apr 22 08:18:43 CDT 2013
The "strided" in there is mostly historic, it hasn't really been accurate for
a while now.
---
dlls/wined3d/arb_program_shader.c | 2 +-
dlls/wined3d/buffer.c | 2 +-
dlls/wined3d/context.c | 2 +-
dlls/wined3d/device.c | 2 +-
dlls/wined3d/drawprim.c | 4 ++--
dlls/wined3d/glsl_shader.c | 2 +-
dlls/wined3d/shader.c | 12 +++---------
dlls/wined3d/state.c | 22 +++++++++++-----------
dlls/wined3d/wined3d_private.h | 2 +-
9 files changed, 22 insertions(+), 28 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 6683829..c3500c0 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -4388,7 +4388,7 @@ static struct arb_vs_compiled_shader *find_arb_vshader(struct wined3d_shader *sh
{
struct wined3d_device *device = shader->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
- DWORD use_map = device->strided_streams.use_map;
+ DWORD use_map = device->stream_info.use_map;
UINT i;
DWORD new_size;
struct arb_vs_compiled_shader *new_array;
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 9110bbd..adfae98 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -310,7 +310,7 @@ static BOOL buffer_find_decl(struct wined3d_buffer *This)
{
struct wined3d_device *device = This->resource.device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
- const struct wined3d_stream_info *si = &device->strided_streams;
+ const struct wined3d_stream_info *si = &device->stream_info;
const struct wined3d_state *state = &device->stateBlock->state;
UINT stride_this_run = 0;
BOOL ret = FALSE;
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 739a038..4ee5bd4 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2371,7 +2371,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
device_update_stream_info(device, context->gl_info);
if (state->index_buffer)
{
- if (device->strided_streams.all_vbo)
+ if (device->stream_info.all_vbo)
wined3d_buffer_preload(state->index_buffer);
else
buffer_get_sysmem(state->index_buffer, context->gl_info);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 17c122d..4e18be8 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -318,7 +318,7 @@ static void device_stream_info_from_declaration(struct wined3d_device *device, s
/* Context activation is done by the caller. */
void device_update_stream_info(struct wined3d_device *device, const struct wined3d_gl_info *gl_info)
{
- struct wined3d_stream_info *stream_info = &device->strided_streams;
+ struct wined3d_stream_info *stream_info = &device->stream_info;
const struct wined3d_state *state = &device->stateBlock->state;
DWORD prev_all_vbo = stream_info->all_vbo;
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 2e158dd..24d367c 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -672,7 +672,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
FIXME("Point sprite coordinate origin switching not supported.\n");
}
- stream_info = &device->strided_streams;
+ stream_info = &device->stream_info;
if (device->instance_count)
instance_count = device->instance_count;
@@ -722,7 +722,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
if (emulation)
{
- si_emulated = device->strided_streams;
+ si_emulated = device->stream_info;
remove_vbos(gl_info, state, &si_emulated);
stream_info = &si_emulated;
}
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index d6540ba..a88f701 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -4702,7 +4702,7 @@ static GLhandleARB find_glsl_vshader(const struct wined3d_context *context,
{
UINT i;
DWORD new_size;
- DWORD use_map = shader->device->strided_streams.use_map;
+ DWORD use_map = shader->device->stream_info.use_map;
struct glsl_vs_compiled_shader *gl_shaders, *new_array;
struct glsl_shader_private *shader_data;
GLhandleARB ret;
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 3aec36c..4936afe 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -1786,7 +1786,7 @@ void find_vs_compile_args(const struct wined3d_state *state,
== WINED3D_FOG_NONE ? VS_FOG_COORD : VS_FOG_Z;
args->clip_enabled = state->render_states[WINED3D_RS_CLIPPING]
&& state->render_states[WINED3D_RS_CLIPPLANEENABLE];
- args->swizzle_map = shader->device->strided_streams.swizzle_map;
+ args->swizzle_map = shader->device->stream_info.swizzle_map;
}
static BOOL match_usage(BYTE usage1, BYTE usage_idx1, BYTE usage2, BYTE usage_idx2)
@@ -2118,18 +2118,12 @@ void find_ps_compile_args(const struct wined3d_state *state,
}
if (shader->reg_maps.shader_version.major >= 3)
{
- if (device->strided_streams.position_transformed)
- {
+ if (device->stream_info.position_transformed)
args->vp_mode = pretransformed;
- }
else if (use_vs(state))
- {
args->vp_mode = vertexshader;
- }
else
- {
args->vp_mode = fixedfunction;
- }
args->fog = FOG_OFF;
}
else
@@ -2140,7 +2134,7 @@ void find_ps_compile_args(const struct wined3d_state *state,
switch (state->render_states[WINED3D_RS_FOGTABLEMODE])
{
case WINED3D_FOG_NONE:
- if (device->strided_streams.position_transformed || use_vs(state))
+ if (device->stream_info.position_transformed || use_vs(state))
{
args->fog = FOG_LINEAR;
break;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index ef86a1d..4eb466e 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -87,7 +87,7 @@ static void state_lighting(struct wined3d_context *context, const struct wined3d
return;
if (state->render_states[WINED3D_RS_LIGHTING]
- && !context->swapchain->device->strided_streams.position_transformed)
+ && !context->swapchain->device->stream_info.position_transformed)
{
gl_info->gl_ops.gl.p_glEnable(GL_LIGHTING);
checkGLcall("glEnable GL_LIGHTING");
@@ -134,7 +134,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_
if (context->gl_info->supported[ARB_DEPTH_CLAMP])
{
- if (!zenable && context->swapchain->device->strided_streams.position_transformed)
+ if (!zenable && context->swapchain->device->stream_info.position_transformed)
{
gl_info->gl_ops.gl.p_glEnable(GL_DEPTH_CLAMP);
checkGLcall("glEnable(GL_DEPTH_CLAMP)");
@@ -1283,7 +1283,7 @@ static void state_colormat(struct wined3d_context *context, const struct wined3d
}
context->num_untracked_materials = 0;
- if ((device->strided_streams.use_map & (1 << WINED3D_FFP_DIFFUSE))
+ if ((device->stream_info.use_map & (1 << WINED3D_FFP_DIFFUSE))
&& state->render_states[WINED3D_RS_COLORVERTEX])
{
TRACE("diff %d, amb %d, emis %d, spec %d\n",
@@ -1436,7 +1436,7 @@ static void state_normalize(struct wined3d_context *context, const struct wined3
* by zero and is not properly defined in opengl, so avoid it
*/
if (state->render_states[WINED3D_RS_NORMALIZENORMALS]
- && (context->swapchain->device->strided_streams.use_map & (1 << WINED3D_FFP_NORMAL)))
+ && (context->swapchain->device->stream_info.use_map & (1 << WINED3D_FFP_NORMAL)))
{
gl_info->gl_ops.gl.p_glEnable(GL_NORMALIZE);
checkGLcall("glEnable(GL_NORMALIZE);");
@@ -3338,8 +3338,8 @@ static void transform_texture(struct wined3d_context *context, const struct wine
set_texture_matrix(gl_info, &state->transforms[WINED3D_TS_TEXTURE0 + texUnit].u.m[0][0],
state->texture_states[texUnit][WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS],
generated, context->last_was_rhw,
- device->strided_streams.use_map & (1 << (WINED3D_FFP_TEXCOORD0 + coordIdx))
- ? device->strided_streams.elements[WINED3D_FFP_TEXCOORD0 + coordIdx].format->id
+ device->stream_info.use_map & (1 << (WINED3D_FFP_TEXCOORD0 + coordIdx))
+ ? device->stream_info.elements[WINED3D_FFP_TEXCOORD0 + coordIdx].format->id
: WINED3DFMT_UNKNOWN,
device->shader_backend->shader_has_ffp_proj_control(device->shader_priv));
@@ -3602,7 +3602,7 @@ static void tex_coordindex(struct wined3d_context *context, const struct wined3d
GLuint curVBO = gl_info->supported[ARB_VERTEX_BUFFER_OBJECT] ? ~0U : 0;
unload_tex_coords(gl_info);
- load_tex_coords(context, &device->strided_streams, &curVBO, state);
+ load_tex_coords(context, &device->stream_info, &curVBO, state);
}
}
@@ -4552,13 +4552,13 @@ static void streamsrc(struct wined3d_context *context, const struct wined3d_stat
if (load_numbered)
{
TRACE("Loading numbered arrays\n");
- load_numbered_arrays(context, &device->strided_streams, state);
+ load_numbered_arrays(context, &device->stream_info, state);
context->numberedArraysLoaded = TRUE;
}
else if (load_named)
{
TRACE("Loading vertex data\n");
- load_vertex_data(context, &device->strided_streams, state);
+ load_vertex_data(context, &device->stream_info, state);
context->namedArraysLoaded = TRUE;
}
}
@@ -4580,7 +4580,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine
BOOL wasrhw = context->last_was_rhw;
unsigned int i;
- transformed = device->strided_streams.position_transformed;
+ transformed = device->stream_info.position_transformed;
if (transformed != context->last_was_rhw && !useVertexShaderFunction)
updateFog = TRUE;
@@ -4894,7 +4894,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st
static void indexbuffer(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{
- const struct wined3d_stream_info *stream_info = &context->swapchain->device->strided_streams;
+ const struct wined3d_stream_info *stream_info = &context->swapchain->device->stream_info;
const struct wined3d_gl_info *gl_info = context->gl_info;
if (!state->index_buffer || !stream_info->all_vbo)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 39995a0..438f4d1 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1768,7 +1768,7 @@ struct wined3d_device
DWORD rev_tex_unit_map[MAX_COMBINED_SAMPLERS];
/* Stream source management */
- struct wined3d_stream_info strided_streams;
+ struct wined3d_stream_info stream_info;
struct wined3d_event_query *buffer_queries[MAX_ATTRIBS];
unsigned int num_buffer_queries;
--
1.8.1.5
More information about the wine-patches
mailing list