* interpolation qualifiers of variables of the same name do not
* match."
*/
- if (prog->IsES || prog->Version < 440)
+ if (prog->IsES || prog->data->Version < 440)
if (c->fields.structure[i].interpolation !=
p->fields.structure[i].interpolation)
return true;
* The table in Section 9.2.1 Linked Shaders of the GLSL ES 3.2 spec
* says that sample need not match for varyings.
*/
- if (!prog->IsES || prog->Version < 310)
+ if (!prog->IsES || prog->data->Version < 310)
if (c->fields.structure[i].centroid !=
p->fields.structure[i].centroid)
return true;
*/
if ((a->data.how_declared != ir_var_declared_implicitly ||
b->data.how_declared != ir_var_declared_implicitly) &&
- (!prog->IsES || prog->Version != 310 ||
+ (!prog->IsES || prog->data->Version != 310 ||
interstage_member_mismatch(prog, a->get_interface_type(),
b->get_interface_type())))
return false;
* OpenGLES 3.0 drivers, so we relax the checking in all cases.
*/
if (false /* always skip the centroid check */ &&
- prog->Version < (prog->IsES ? 310 : 430) &&
+ prog->data->Version < (prog->IsES ? 310 : 430) &&
input->data.centroid != output->data.centroid) {
linker_error(prog,
"%s shader output `%s' %s centroid qualifier, "
* and fragment shaders must match."
*/
if (input->data.invariant != output->data.invariant &&
- prog->Version < (prog->IsES ? 300 : 430)) {
+ prog->data->Version < (prog->IsES ? 300 : 430)) {
linker_error(prog,
"%s shader output `%s' %s invariant qualifier, "
"but %s shader input %s invariant qualifier\n",
*
*/
if (input->data.interpolation != output->data.interpolation &&
- prog->Version < 440) {
+ prog->data->Version < 440) {
linker_error(prog,
"%s shader output `%s' specifies %s "
"interpolation qualifier, "
if (var && var->data.mode == ir_var_shader_in &&
var->data.is_unmatched_generic_inout) {
- if (!prog->IsES && prog->Version <= 120) {
+ if (!prog->IsES && prog->data->Version <= 120) {
/* On page 25 (page 31 of the PDF) of the GLSL 1.20 spec:
*
* Only those varying variables used (i.e. read) in
*clip_distance_array_size = 0;
*cull_distance_array_size = 0;
- if (prog->Version >= (prog->IsES ? 300 : 130)) {
+ if (prog->data->Version >= (prog->IsES ? 300 : 130)) {
/* From section 7.1 (Vertex Shader Special Variables) of the
* GLSL 1.30 spec:
*
* All GLSL ES Versions are similar to GLSL 1.40--failing to write to
* gl_Position is not an error.
*/
- if (prog->Version < (prog->IsES ? 300 : 140)) {
+ if (prog->data->Version < (prog->IsES ? 300 : 140)) {
find_assignment_visitor find("gl_Position");
find.run(shader->ir);
if (!find.variable_found()) {
* In GLSL ES 3.00 and ES 3.20, precision qualifier for each block
* member should match.
*/
- if (prog->IsES && (prog->Version != 310 || !var->get_interface_type()) &&
+ if (prog->IsES && (prog->data->Version != 310 ||
+ !var->get_interface_type()) &&
existing->data.precision != var->data.precision) {
linker_error(prog, "declarations for %s `%s` have "
"mismatching precision qualifiers\n",
linked_shader->info.BlendSupport = 0;
if (linked_shader->Stage != MESA_SHADER_FRAGMENT ||
- (prog->Version < 150 && !prog->ARB_fragment_coord_conventions_enable))
+ (prog->data->Version < 150 &&
+ !prog->ARB_fragment_coord_conventions_enable))
return;
for (unsigned i = 0; i < num_shaders; i++) {
/* No in/out qualifiers defined for anything but GLSL 1.50+
* geometry shaders so far.
*/
- if (linked_shader->Stage != MESA_SHADER_GEOMETRY || prog->Version < 150)
+ if (linked_shader->Stage != MESA_SHADER_GEOMETRY ||
+ prog->data->Version < 150)
return;
/* From the GLSL 1.50 spec, page 46:
}
}
} else if (target_index == MESA_SHADER_FRAGMENT ||
- (prog->IsES && prog->Version >= 300)) {
+ (prog->IsES && prog->data->Version >= 300)) {
linker_error(prog, "overlapping location is assigned "
"to %s `%s' %d %d %d\n", string, var->name,
used_locations, use_mask, attr);
"expressions is forbidden in GLSL %s %u";
/* Backend has indicated that it has no dynamic indexing support. */
if (no_dynamic_indexing) {
- linker_error(prog, msg, prog->IsES ? "ES" : "", prog->Version);
+ linker_error(prog, msg, prog->IsES ? "ES" : "",
+ prog->data->Version);
return false;
} else {
- linker_warning(prog, msg, prog->IsES ? "ES" : "", prog->Version);
+ linker_warning(prog, msg, prog->IsES ? "ES" : "",
+ prog->data->Version);
}
}
}
goto done;
}
- prog->Version = max_version;
+ prog->data->Version = max_version;
prog->IsES = prog->Shaders[0]->IsES;
/* Some shaders have to be linked with some other shaders present.
* with loop induction variable. This check emits a warning or error
* depending if backend can handle dynamic indexing.
*/
- if ((!prog->IsES && prog->Version < 130) ||
- (prog->IsES && prog->Version < 300)) {
+ if ((!prog->IsES && prog->data->Version < 130) ||
+ (prog->IsES && prog->data->Version < 300)) {
if (!validate_sampler_array_indexing(ctx, prog))
goto done;
}