wined3d: Rename the device "strided_streams" field to "stream_info".

The "strided" in there is mostly historic, it hasn't really been accurate for
a while now.
This commit is contained in:
Henri Verbeet 2013-04-22 15:18:43 +02:00 committed by Alexandre Julliard
parent 82a06a0a36
commit c756496326
9 changed files with 22 additions and 28 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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;