summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-11-15 22:02:51 +0100
committerMarek Olšák <[email protected]>2018-02-13 01:00:45 +0100
commit07c10cc59c164ddd0109e061dac8edf47437d8ca (patch)
treead38e5e0408a4fe07fb41a77b0bacef2e19a7100 /src/mesa/swrast
parent79aca14f5f37de32140fb710970133c72886a0f2 (diff)
mesa: separate legacy stuff from gl_texture_unit into gl_fixedfunc_texture_unit
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_context.c2
-rw-r--r--src/mesa/swrast/s_texcombine.c3
-rw-r--r--src/mesa/swrast/s_triangle.c10
3 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index f7f08b19dd9..0c12a63ae0b 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -185,7 +185,7 @@ _swrast_update_texture_env( struct gl_context *ctx )
for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
const struct gl_tex_env_combine_state *combine =
- ctx->Texture.Unit[i]._CurrentCombine;
+ ctx->Texture.FixedFuncUnit[i]._CurrentCombine;
GLuint term;
for (term = 0; term < combine->_NumArgsRGB; term++) {
if (combine->SourceRGB[term] == GL_PRIMARY_COLOR) {
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index da4a013634c..743ee4015bb 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -84,7 +84,8 @@ texture_combine( struct gl_context *ctx, GLuint unit,
SWspan *span )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const struct gl_texture_unit *textureUnit = &(ctx->Texture.Unit[unit]);
+ const struct gl_fixedfunc_texture_unit *textureUnit =
+ &ctx->Texture.FixedFuncUnit[unit];
const struct gl_tex_env_combine_state *combine = textureUnit->_CurrentCombine;
float4_array argRGB[MAX_COMBINER_TERMS];
float4_array argA[MAX_COMBINER_TERMS];
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index c84cfec93d3..d80ab180bac 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -539,7 +539,7 @@ affine_span(struct gl_context *ctx, SWspan *span,
#define SETUP_CODE \
struct affine_info info; \
- struct gl_texture_unit *unit = ctx->Texture.Unit+0; \
+ struct gl_fixedfunc_texture_unit *unit = ctx->Texture.FixedFuncUnit+0; \
const struct gl_texture_object *obj = \
ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; \
const struct gl_texture_image *texImg = \
@@ -808,7 +808,7 @@ fast_persp_span(struct gl_context *ctx, SWspan *span,
#define SETUP_CODE \
struct persp_info info; \
- const struct gl_texture_unit *unit = ctx->Texture.Unit+0; \
+ const struct gl_fixedfunc_texture_unit *unit = ctx->Texture.FixedFuncUnit+0; \
const struct gl_texture_object *obj = \
ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; \
const struct gl_texture_image *texImg = \
@@ -1066,7 +1066,7 @@ _swrast_choose_triangle( struct gl_context *ctx )
format = texImg ? texImg->TexFormat : MESA_FORMAT_NONE;
minFilter = texObj2D ? samp->MinFilter : GL_NONE;
magFilter = texObj2D ? samp->MagFilter : GL_NONE;
- envMode = ctx->Texture.Unit[0].EnvMode;
+ envMode = ctx->Texture.FixedFuncUnit[0].EnvMode;
/* First see if we can use an optimized 2-D texture function */
if (ctx->Texture._EnabledCoordUnits == 0x1
@@ -1085,8 +1085,8 @@ _swrast_choose_triangle( struct gl_context *ctx )
&& minFilter == magFilter
&& ctx->Light.Model.ColorControl == GL_SINGLE_COLOR
&& !swrast->_FogEnabled
- && ctx->Texture.Unit[0].EnvMode != GL_COMBINE_EXT
- && ctx->Texture.Unit[0].EnvMode != GL_COMBINE4_NV) {
+ && ctx->Texture.FixedFuncUnit[0].EnvMode != GL_COMBINE_EXT
+ && ctx->Texture.FixedFuncUnit[0].EnvMode != GL_COMBINE4_NV) {
if (ctx->Hint.PerspectiveCorrection==GL_FASTEST) {
if (minFilter == GL_NEAREST
&& format == MESA_FORMAT_BGR_UNORM8