Commit 15140e76 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Rename the "textures" field of struct wined3d_gl_limits to "ffp_textures".

parent fbee3cf2
......@@ -2890,7 +2890,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
GLint gl_max;
gl_info->limits.buffers = 1;
gl_info->limits.textures = 0;
gl_info->limits.ffp_textures = 0;
gl_info->limits.texture_coords = 0;
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
{
......@@ -2954,8 +2954,8 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT])
{
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_max);
gl_info->limits.textures = min(WINED3D_MAX_FFP_TEXTURES, gl_max);
TRACE("Max textures: %d.\n", gl_info->limits.textures);
gl_info->limits.ffp_textures = min(WINED3D_MAX_FFP_TEXTURES, gl_max);
TRACE("Max textures: %d.\n", gl_info->limits.ffp_textures);
if (gl_info->supported[ARB_FRAGMENT_PROGRAM])
{
......@@ -2964,7 +2964,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
}
else
{
gl_info->limits.texture_coords = gl_info->limits.textures;
gl_info->limits.texture_coords = gl_info->limits.ffp_textures;
}
TRACE("Max texture coords: %d.\n", gl_info->limits.texture_coords);
}
......@@ -2976,7 +2976,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
}
else
{
gl_info->limits.samplers[WINED3D_SHADER_TYPE_PIXEL] = gl_info->limits.textures;
gl_info->limits.samplers[WINED3D_SHADER_TYPE_PIXEL] = gl_info->limits.ffp_textures;
}
TRACE("Max fragment samplers: %d.\n", gl_info->limits.samplers[WINED3D_SHADER_TYPE_PIXEL]);
......@@ -3034,7 +3034,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
}
else
{
gl_info->limits.textures = 1;
gl_info->limits.ffp_textures = 1;
gl_info->limits.texture_coords = 1;
}
......
......@@ -490,7 +490,7 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[WINED3D_MAX_FFP_TE
checkGLcall("GL_EXTCALL(glBeginFragmentShaderATI())");
/* Pass 1: Generate sampling instructions for perturbation maps */
for (stage = 0; stage < gl_info->limits.textures; ++stage)
for (stage = 0; stage < gl_info->limits.ffp_textures; ++stage)
{
if (op[stage].cop == WINED3D_TOP_DISABLE)
break;
......@@ -517,7 +517,7 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[WINED3D_MAX_FFP_TE
}
/* Pass 2: Generate perturbation calculations */
for (stage = 0; stage < gl_info->limits.textures; ++stage)
for (stage = 0; stage < gl_info->limits.ffp_textures; ++stage)
{
GLuint argmodextra_x, argmodextra_y;
struct color_fixup_desc fixup;
......@@ -568,7 +568,7 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[WINED3D_MAX_FFP_TE
}
/* Pass 3: Generate sampling instructions for regular textures */
for (stage = 0; stage < gl_info->limits.textures; ++stage)
for (stage = 0; stage < gl_info->limits.ffp_textures; ++stage)
{
if (op[stage].cop == WINED3D_TOP_DISABLE)
break;
......
......@@ -2252,7 +2252,7 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi
/* Set up the previous texture input for all shader units. This applies to bump mapping, and in d3d
* the previous texture where to source the offset from is always unit - 1.
*/
for (i = 1; i < gl_info->limits.textures; ++i)
for (i = 1; i < gl_info->limits.ffp_textures; ++i)
{
wined3d_context_gl_active_texture(context_gl, gl_info, i);
gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_SHADER_NV,
......@@ -2283,7 +2283,7 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi
if (gl_info->supported[ARB_POINT_SPRITE])
{
for (i = 0; i < gl_info->limits.textures; ++i)
for (i = 0; i < gl_info->limits.ffp_textures; ++i)
{
wined3d_context_gl_active_texture(context_gl, gl_info, i);
gl_info->gl_ops.gl.p_glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);
......@@ -3373,7 +3373,7 @@ void wined3d_context_gl_apply_ffp_blit_state(struct wined3d_context_gl *context_
/* Disable all textures. The caller can then bind a texture it wants to blit
* from. */
for (i = gl_info->limits.textures - 1; i > 0 ; --i)
for (i = gl_info->limits.ffp_textures - 1; i > 0 ; --i)
{
wined3d_context_gl_active_texture(context_gl, gl_info, i);
......@@ -5409,7 +5409,7 @@ void wined3d_context_gl_load_tex_coords(const struct wined3d_context_gl *context
if (gl_info->supported[NV_REGISTER_COMBINERS])
{
/* The number of the mapped stages increases monotonically, so it's fine to use the last used one. */
for (texture_idx = mapped_stage + 1; texture_idx < gl_info->limits.textures; ++texture_idx)
for (texture_idx = mapped_stage + 1; texture_idx < gl_info->limits.ffp_textures; ++texture_idx)
{
GL_EXTCALL(glMultiTexCoord4fARB(GL_TEXTURE0_ARB + texture_idx, 0, 0, 0, 1));
}
......
......@@ -496,7 +496,7 @@ static void nvrc_colorop(struct wined3d_context *context, const struct wined3d_s
if (mapped_stage != WINED3D_UNMAPPED_STAGE)
{
if (tex_used && mapped_stage >= gl_info->limits.textures)
if (tex_used && mapped_stage >= gl_info->limits.ffp_textures)
{
FIXME("Attempt to enable unsupported stage!\n");
return;
......@@ -533,7 +533,7 @@ static void nvrc_colorop(struct wined3d_context *context, const struct wined3d_s
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_RECTANGLE_ARB);
checkGLcall("glDisable(GL_TEXTURE_RECTANGLE_ARB)");
}
if (gl_info->supported[NV_TEXTURE_SHADER2] && mapped_stage < gl_info->limits.textures)
if (gl_info->supported[NV_TEXTURE_SHADER2] && mapped_stage < gl_info->limits.ffp_textures)
{
gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE);
}
......@@ -609,7 +609,7 @@ static void nvts_texdim(struct wined3d_context *context, const struct wined3d_st
/* No need to enable / disable anything here for unused samplers. The tex_colorop
* handler takes care. Also no action is needed with pixel shaders, or if tex_colorop
* will take care of this business. */
if (mapped_stage == WINED3D_UNMAPPED_STAGE || mapped_stage >= context_gl->gl_info->limits.textures)
if (mapped_stage == WINED3D_UNMAPPED_STAGE || mapped_stage >= context_gl->gl_info->limits.ffp_textures)
return;
if (sampler >= context->lowest_disabled_stage)
return;
......@@ -633,7 +633,7 @@ static void nvts_bumpenvmat(struct wined3d_context *context, const struct wined3
* map is read from a specified source stage(always stage - 1 for d3d). Thus set the matrix
* for stage + 1. Keep the nvrc tex unit mapping in mind too
*/
if (mapped_stage < gl_info->limits.textures)
if (mapped_stage < gl_info->limits.ffp_textures)
{
wined3d_context_gl_active_texture(context_gl, gl_info, mapped_stage);
......@@ -748,7 +748,7 @@ static void nvrc_fragment_get_caps(const struct wined3d_adapter *adapter, struct
#endif
caps->MaxTextureBlendStages = min(WINED3D_MAX_FFP_TEXTURES, gl_info->limits.general_combiners);
caps->MaxSimultaneousTextures = gl_info->limits.textures;
caps->MaxSimultaneousTextures = gl_info->limits.ffp_textures;
}
static unsigned int nvrc_fragment_get_emul_mask(const struct wined3d_adapter *adapter)
......
......@@ -3073,7 +3073,7 @@ static void tex_colorop(struct wined3d_context *context, const struct wined3d_st
if (mapped_stage != WINED3D_UNMAPPED_STAGE)
{
if (tex_used && mapped_stage >= gl_info->limits.textures)
if (tex_used && mapped_stage >= gl_info->limits.ffp_textures)
{
FIXME("Attempt to enable unsupported stage!\n");
return;
......@@ -3131,7 +3131,7 @@ void tex_alphaop(struct wined3d_context *context, const struct wined3d_state *st
/* Do not care for enabled / disabled stages, just assign the settings. colorop disables / enables required stuff */
if (mapped_stage != WINED3D_UNMAPPED_STAGE)
{
if (tex_used && mapped_stage >= gl_info->limits.textures)
if (tex_used && mapped_stage >= gl_info->limits.ffp_textures)
{
FIXME("Attempt to enable unsupported stage!\n");
return;
......@@ -3232,7 +3232,7 @@ static void transform_texture(struct wined3d_context *context, const struct wine
}
if (mapped_stage == WINED3D_UNMAPPED_STAGE) return;
if (mapped_stage >= gl_info->limits.textures) return;
if (mapped_stage >= gl_info->limits.ffp_textures) return;
wined3d_context_gl_active_texture(context_gl, gl_info, mapped_stage);
gl_info->gl_ops.gl.p_glMatrixMode(GL_TEXTURE);
......@@ -5185,8 +5185,8 @@ static void ffp_fragment_get_caps(const struct wined3d_adapter *adapter, struct
if (gl_info->supported[ARB_TEXTURE_ENV_DOT3])
caps->TextureOpCaps |= WINED3DTEXOPCAPS_DOTPRODUCT3;
caps->MaxTextureBlendStages = gl_info->limits.textures;
caps->MaxSimultaneousTextures = gl_info->limits.textures;
caps->MaxTextureBlendStages = gl_info->limits.ffp_textures;
caps->MaxSimultaneousTextures = gl_info->limits.ffp_textures;
}
static unsigned int ffp_fragment_get_emul_mask(const struct wined3d_adapter *adapter)
......
......@@ -6805,7 +6805,7 @@ void sampler_texdim(struct wined3d_context *context, const struct wined3d_state
* tex_colorop handler takes care. Also no action is needed with pixel
* shaders, or if tex_colorop will take care of this business. */
mapped_stage = context_gl->tex_unit_map[sampler];
if (mapped_stage == WINED3D_UNMAPPED_STAGE || mapped_stage >= context_gl->gl_info->limits.textures)
if (mapped_stage == WINED3D_UNMAPPED_STAGE || mapped_stage >= context_gl->gl_info->limits.ffp_textures)
return;
if (sampler >= context->lowest_disabled_stage)
return;
......
......@@ -276,7 +276,7 @@ struct wined3d_gl_limits
{
unsigned int buffers;
unsigned int lights;
unsigned int textures;
unsigned int ffp_textures;
unsigned int texture_coords;
unsigned int uniform_blocks[WINED3D_SHADER_TYPE_COUNT];
unsigned int samplers[WINED3D_SHADER_TYPE_COUNT];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment