intel: fix max anisotropy supported
i915 actually supports up to 4 (according to header file - not tested), i965 up to 16 (code already handled this but slightly broken), so don't use 2 for all chips, even though angular dependency is very high.
This commit is contained in:
parent
7843243dee
commit
50853be894
|
@ -98,6 +98,8 @@ i830CreateContext(const __GLcontextModes * mesaVis,
|
||||||
ctx->Const.MaxTextureRectSize = (1 << 11);
|
ctx->Const.MaxTextureRectSize = (1 << 11);
|
||||||
ctx->Const.MaxTextureUnits = I830_TEX_UNITS;
|
ctx->Const.MaxTextureUnits = I830_TEX_UNITS;
|
||||||
|
|
||||||
|
ctx->Const.MaxTextureMaxAnisotropy = 2.0;
|
||||||
|
|
||||||
ctx->Const.MaxDrawBuffers = 1;
|
ctx->Const.MaxDrawBuffers = 1;
|
||||||
|
|
||||||
_tnl_init_vertices(ctx, ctx->Const.MaxArrayLockSize + 12,
|
_tnl_init_vertices(ctx, ctx->Const.MaxArrayLockSize + 12,
|
||||||
|
|
|
@ -145,6 +145,8 @@ i915CreateContext(const __GLcontextModes * mesaVis,
|
||||||
ctx->Const.MaxTextureRectSize = (1 << 11);
|
ctx->Const.MaxTextureRectSize = (1 << 11);
|
||||||
ctx->Const.MaxTextureUnits = I915_TEX_UNITS;
|
ctx->Const.MaxTextureUnits = I915_TEX_UNITS;
|
||||||
|
|
||||||
|
ctx->Const.MaxTextureMaxAnisotropy = 4.0;
|
||||||
|
|
||||||
/* GL_ARB_fragment_program limits - don't think Mesa actually
|
/* GL_ARB_fragment_program limits - don't think Mesa actually
|
||||||
* validates programs against these, and in any case one ARB
|
* validates programs against these, and in any case one ARB
|
||||||
* instruction can translate to more than one HW instruction, so
|
* instruction can translate to more than one HW instruction, so
|
||||||
|
|
|
@ -118,6 +118,8 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
|
||||||
ctx->Const.MaxCubeTextureLevels = 12;
|
ctx->Const.MaxCubeTextureLevels = 12;
|
||||||
ctx->Const.MaxTextureRectSize = (1<<12);
|
ctx->Const.MaxTextureRectSize = (1<<12);
|
||||||
|
|
||||||
|
ctx->Const.MaxTextureMaxAnisotropy = 16.0;
|
||||||
|
|
||||||
/* if conformance mode is set, swrast can handle any size AA point */
|
/* if conformance mode is set, swrast can handle any size AA point */
|
||||||
ctx->Const.MaxPointSizeAA = 255.0;
|
ctx->Const.MaxPointSizeAA = 255.0;
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ static void brw_update_sampler_state(struct wm_sampler_entry *key,
|
||||||
sampler->ss0.mag_filter = BRW_MAPFILTER_ANISOTROPIC;
|
sampler->ss0.mag_filter = BRW_MAPFILTER_ANISOTROPIC;
|
||||||
|
|
||||||
if (key->max_aniso > 2.0) {
|
if (key->max_aniso > 2.0) {
|
||||||
sampler->ss3.max_aniso = MAX2((key->max_aniso - 2) / 2,
|
sampler->ss3.max_aniso = MIN2((key->max_aniso - 2) / 2,
|
||||||
BRW_ANISORATIO_16);
|
BRW_ANISORATIO_16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -528,8 +528,6 @@ intelInitContext(struct intel_context *intel,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->Const.MaxTextureMaxAnisotropy = 2.0;
|
|
||||||
|
|
||||||
/* This doesn't yet catch all non-conformant rendering, but it's a
|
/* This doesn't yet catch all non-conformant rendering, but it's a
|
||||||
* start.
|
* start.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue