summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/prog_execute.c7
-rw-r--r--src/mesa/shader/slang/slang_builtin.c4
-rw-r--r--src/mesa/shader/slang/slang_codegen.c2
3 files changed, 4 insertions, 9 deletions
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index c8a762f8ff7..69b81e724a2 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -1555,17 +1555,12 @@ _mesa_execute_program(GLcontext * ctx,
case OPCODE_TXB: /* GL_ARB_fragment_program only */
/* Texel lookup with LOD bias */
{
- const GLuint unit = machine->Samplers[inst->TexSrcUnit];
- const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
GLfloat texcoord[4], color[4], lodBias;
fetch_vector4(&inst->SrcReg[0], machine, texcoord);
/* texcoord[3] is the bias to add to lambda */
- lodBias = texUnit->LodBias + texcoord[3];
- if (texUnit->_Current) {
- lodBias += texUnit->_Current->LodBias;
- }
+ lodBias = texcoord[3];
fetch_texel(ctx, machine, inst, texcoord, lodBias, color);
diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c
index bef0f856534..e5809509c93 100644
--- a/src/mesa/shader/slang/slang_builtin.c
+++ b/src/mesa/shader/slang/slang_builtin.c
@@ -741,7 +741,7 @@ static const struct input_info vertInputs[] = {
{ "gl_MultiTexCoord5", VERT_ATTRIB_TEX5, GL_FLOAT_VEC4, SWIZZLE_NOOP },
{ "gl_MultiTexCoord6", VERT_ATTRIB_TEX6, GL_FLOAT_VEC4, SWIZZLE_NOOP },
{ "gl_MultiTexCoord7", VERT_ATTRIB_TEX7, GL_FLOAT_VEC4, SWIZZLE_NOOP },
- { NULL, 0, SWIZZLE_NOOP }
+ { NULL, 0, GL_NONE, SWIZZLE_NOOP }
};
/** Predefined fragment shader inputs */
@@ -754,7 +754,7 @@ static const struct input_info fragInputs[] = {
{ "gl_FogFragCoord", FRAG_ATTRIB_FOGC, GL_FLOAT, SWIZZLE_XXXX },
{ "gl_FrontFacing", FRAG_ATTRIB_FACE, GL_FLOAT, SWIZZLE_XXXX },
{ "gl_PointCoord", FRAG_ATTRIB_PNTC, GL_FLOAT_VEC2, SWIZZLE_XYZW },
- { NULL, 0, SWIZZLE_NOOP }
+ { NULL, 0, GL_NONE, SWIZZLE_NOOP }
};
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 349f432deca..703af9f8740 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -2775,7 +2775,7 @@ _slang_gen_while(slang_assemble_ctx * A, slang_operation *oper)
* body code (child[1])
*/
slang_ir_node *loop, *breakIf, *body;
- GLboolean isConst, constTrue;
+ GLboolean isConst, constTrue = GL_FALSE;
if (!A->EmitContReturn) {
/* We don't want to emit CONT instructions. If this while-loop has