"compute shader variables cannot be given "
"explicit locations");
return;
+ default:
+ fail = true;
+ break;
};
if (fail) {
? (qual_location + FRAG_RESULT_DATA0)
: (qual_location + VARYING_SLOT_VAR0);
break;
- case MESA_SHADER_COMPUTE:
+ default:
assert(!"Unexpected shader type");
break;
}
case MESA_SHADER_COMPUTE:
/* Invariance isn't meaningful in compute shaders. */
break;
+ default:
+ break;
}
}
case MESA_SHADER_COMPUTE:
/* Compute shaders don't have varyings. */
break;
+ default:
+ break;
}
}
case MESA_SHADER_COMPUTE:
gen.generate_cs_special_vars();
break;
+ default:
+ break;
}
}
if (!disable_varying_packing &&
(needs_flat_qualifier ||
- (consumer_stage != -1 && consumer_stage != MESA_SHADER_FRAGMENT))) {
+ (consumer_stage != MESA_SHADER_NONE && consumer_stage != MESA_SHADER_FRAGMENT))) {
/* Since this varying is not being consumed by the fragment shader, its
* interpolation type varying cannot possibly affect rendering.
* Also, this variable is non-flat and is (or contains) an integer
varying_matches matches(disable_varying_packing, xfb_enabled,
ctx->Extensions.ARB_enhanced_layouts,
- producer ? producer->Stage : (gl_shader_stage)-1,
- consumer ? consumer->Stage : (gl_shader_stage)-1);
+ producer ? producer->Stage : MESA_SHADER_NONE,
+ consumer ? consumer->Stage : MESA_SHADER_NONE);
hash_table *tfeedback_candidates =
_mesa_hash_table_create(NULL, _mesa_key_hash_string,
_mesa_key_string_equal);
*/
typedef enum
{
+ MESA_SHADER_NONE = -1,
MESA_SHADER_VERTEX = 0,
MESA_SHADER_TESS_CTRL = 1,
MESA_SHADER_TESS_EVAL = 2,
return GL_TESS_CONTROL_SUBROUTINE;
case MESA_SHADER_TESS_EVAL:
return GL_TESS_EVALUATION_SUBROUTINE;
+ case MESA_SHADER_NONE:
+ break;
}
unreachable("not reached");
}
return GL_TESS_CONTROL_SUBROUTINE_UNIFORM;
case MESA_SHADER_TESS_EVAL:
return GL_TESS_EVALUATION_SUBROUTINE_UNIFORM;
+ case MESA_SHADER_NONE:
+ break;
}
unreachable("not reached");
}
case MESA_SHADER_COMPUTE:
type = "comp";
break;
+ default:
+ break;
}
_mesa_snprintf(filename, sizeof(filename), "shader_%u.%s", shader->Name, type);
return PIPE_SHADER_TESS_EVAL;
case MESA_SHADER_COMPUTE:
return PIPE_SHADER_COMPUTE;
+ default:
+ break;
}
assert(!"should not be reached");