Lines Matching refs:qual
2871 const ast_type_qualifier *qual) in apply_explicit_binding() argument
2873 if (!qual->flags.q.uniform && !qual->flags.q.buffer) { in apply_explicit_binding()
2881 if (!process_qualifier_constant(state, loc, "binding", qual->binding, in apply_explicit_binding()
2902 if (qual->flags.q.uniform && in apply_explicit_binding()
2920 if (qual->flags.q.buffer && in apply_explicit_binding()
3075 const struct ast_type_qualifier *qual, in validate_interpolation_qualifier() argument
3144 && qual->flags.q.varying) { in validate_interpolation_qualifier()
3148 if (qual->flags.q.centroid) in validate_interpolation_qualifier()
3163 interpret_interpolation_qualifier(const struct ast_type_qualifier *qual, in interpret_interpolation_qualifier() argument
3170 if (qual->flags.q.flat) in interpret_interpolation_qualifier()
3172 else if (qual->flags.q.noperspective) in interpret_interpolation_qualifier()
3174 else if (qual->flags.q.smooth) in interpret_interpolation_qualifier()
3181 qual, var_type, mode); in interpret_interpolation_qualifier()
3188 apply_explicit_location(const struct ast_type_qualifier *qual, in apply_explicit_location() argument
3196 if (!process_qualifier_constant(state, loc, "location", qual->location, in apply_explicit_location()
3202 if (qual->flags.q.uniform) { in apply_explicit_location()
3329 if (qual->flags.q.explicit_index && qual->is_subroutine_decl()) { in apply_explicit_location()
3336 if (qual->flags.q.explicit_index && in apply_explicit_location()
3337 process_qualifier_constant(state, loc, "index", qual->index, in apply_explicit_location()
3408 const struct ast_type_qualifier *qual, in validate_memory_qualifier_for_type() argument
3417 if (!type->is_image() && !qual->flags.q.buffer) { in validate_memory_qualifier_for_type()
3418 if (qual->flags.q.read_only || in validate_memory_qualifier_for_type()
3419 qual->flags.q.write_only || in validate_memory_qualifier_for_type()
3420 qual->flags.q.coherent || in validate_memory_qualifier_for_type()
3421 qual->flags.q._volatile || in validate_memory_qualifier_for_type()
3422 qual->flags.q.restrict_flag) { in validate_memory_qualifier_for_type()
3435 const struct ast_type_qualifier *qual, in validate_image_format_qualifier_for_type() argument
3443 if (!type->is_image() && qual->flags.q.explicit_image_format) { in validate_image_format_qualifier_for_type()
3452 apply_image_qualifier_to_variable(const struct ast_type_qualifier *qual, in apply_image_qualifier_to_variable() argument
3459 if (!validate_image_format_qualifier_for_type(state, loc, qual, base_type) || in apply_image_qualifier_to_variable()
3460 !validate_memory_qualifier_for_type(state, loc, qual, base_type)) in apply_image_qualifier_to_variable()
3469 var->data.memory_read_only |= qual->flags.q.read_only; in apply_image_qualifier_to_variable()
3470 var->data.memory_write_only |= qual->flags.q.write_only; in apply_image_qualifier_to_variable()
3471 var->data.memory_coherent |= qual->flags.q.coherent; in apply_image_qualifier_to_variable()
3472 var->data.memory_volatile |= qual->flags.q._volatile; in apply_image_qualifier_to_variable()
3473 var->data.memory_restrict |= qual->flags.q.restrict_flag; in apply_image_qualifier_to_variable()
3475 if (qual->flags.q.explicit_image_format) { in apply_image_qualifier_to_variable()
3481 if (qual->image_base_type != base_type->sampled_type) { in apply_image_qualifier_to_variable()
3486 var->data.image_format = qual->image_format; in apply_image_qualifier_to_variable()
3498 } else if (!qual->flags.q.write_only) { in apply_image_qualifier_to_variable()
3539 const struct ast_type_qualifier *qual) in is_conflicting_fragcoord_redeclaration() argument
3545 return (state->fs_pixel_center_integer != qual->flags.q.pixel_center_integer in is_conflicting_fragcoord_redeclaration()
3546 || state->fs_origin_upper_left != qual->flags.q.origin_upper_left); in is_conflicting_fragcoord_redeclaration()
3554 const struct ast_type_qualifier *qual) in is_conflicting_layer_redeclaration() argument
3557 return state->layer_viewport_relative != qual->flags.q.viewport_relative; in is_conflicting_layer_redeclaration()
3582 apply_bindless_qualifier_to_variable(const struct ast_type_qualifier *qual, in apply_bindless_qualifier_to_variable() argument
3587 bool has_local_qualifiers = qual->flags.q.bindless_sampler || in apply_bindless_qualifier_to_variable()
3588 qual->flags.q.bindless_image || in apply_bindless_qualifier_to_variable()
3589 qual->flags.q.bound_sampler || in apply_bindless_qualifier_to_variable()
3590 qual->flags.q.bound_image; in apply_bindless_qualifier_to_variable()
3601 if (has_local_qualifiers && !qual->flags.q.uniform) { in apply_bindless_qualifier_to_variable()
3613 if ((qual->flags.q.bindless_sampler || qual->flags.q.bound_sampler) && in apply_bindless_qualifier_to_variable()
3620 if ((qual->flags.q.bindless_image || qual->flags.q.bound_image) && in apply_bindless_qualifier_to_variable()
3632 var->data.bindless = qual->flags.q.bindless_sampler || in apply_bindless_qualifier_to_variable()
3633 qual->flags.q.bindless_image || in apply_bindless_qualifier_to_variable()
3637 var->data.bound = qual->flags.q.bound_sampler || in apply_bindless_qualifier_to_variable()
3638 qual->flags.q.bound_image || in apply_bindless_qualifier_to_variable()
3645 apply_layout_qualifier_to_variable(const struct ast_type_qualifier *qual, in apply_layout_qualifier_to_variable() argument
3672 if (is_conflicting_fragcoord_redeclaration(state, qual)) { in apply_layout_qualifier_to_variable()
3674 get_layout_qualifier_string(qual->flags.q.origin_upper_left, in apply_layout_qualifier_to_variable()
3675 qual->flags.q.pixel_center_integer); in apply_layout_qualifier_to_variable()
3687 state->fs_origin_upper_left = qual->flags.q.origin_upper_left; in apply_layout_qualifier_to_variable()
3688 state->fs_pixel_center_integer = qual->flags.q.pixel_center_integer; in apply_layout_qualifier_to_variable()
3690 !qual->flags.q.origin_upper_left && !qual->flags.q.pixel_center_integer; in apply_layout_qualifier_to_variable()
3697 if ((qual->flags.q.origin_upper_left || qual->flags.q.pixel_center_integer) in apply_layout_qualifier_to_variable()
3699 const char *const qual_string = (qual->flags.q.origin_upper_left) in apply_layout_qualifier_to_variable()
3708 if (qual->flags.q.explicit_location) { in apply_layout_qualifier_to_variable()
3709 apply_explicit_location(qual, var, state, loc); in apply_layout_qualifier_to_variable()
3711 if (qual->flags.q.explicit_component) { in apply_layout_qualifier_to_variable()
3714 qual->component, &qual_component)) { in apply_layout_qualifier_to_variable()
3743 } else if (qual->flags.q.explicit_index) { in apply_layout_qualifier_to_variable()
3744 if (!qual->subroutine_list) in apply_layout_qualifier_to_variable()
3747 } else if (qual->flags.q.explicit_component) { in apply_layout_qualifier_to_variable()
3752 if (qual->flags.q.explicit_binding) { in apply_layout_qualifier_to_variable()
3753 apply_explicit_binding(state, loc, var, var->type, qual); in apply_layout_qualifier_to_variable()
3757 qual->flags.q.out && qual->flags.q.stream) { in apply_layout_qualifier_to_variable()
3759 if (process_qualifier_constant(state, loc, "stream", qual->stream, in apply_layout_qualifier_to_variable()
3766 if (qual->flags.q.out && qual->flags.q.xfb_buffer) { in apply_layout_qualifier_to_variable()
3769 qual->xfb_buffer, &qual_xfb_buffer) && in apply_layout_qualifier_to_variable()
3772 if (qual->flags.q.explicit_xfb_buffer) in apply_layout_qualifier_to_variable()
3777 if (qual->flags.q.explicit_xfb_offset) { in apply_layout_qualifier_to_variable()
3782 qual->offset, &qual_xfb_offset) && in apply_layout_qualifier_to_variable()
3790 if (qual->flags.q.explicit_xfb_stride) { in apply_layout_qualifier_to_variable()
3793 qual->xfb_stride, &qual_xfb_stride)) { in apply_layout_qualifier_to_variable()
3850 const bool uses_deprecated_qualifier = qual->flags.q.attribute in apply_layout_qualifier_to_variable()
3851 || qual->flags.q.varying; in apply_layout_qualifier_to_variable()
3852 if (qual->has_layout() && uses_deprecated_qualifier) { in apply_layout_qualifier_to_variable()
3867 if (qual->flags.q.depth_type in apply_layout_qualifier_to_variable()
3875 } else if (qual->flags.q.depth_type in apply_layout_qualifier_to_variable()
3882 switch (qual->depth_type) { in apply_layout_qualifier_to_variable()
3900 if (qual->flags.q.std140 || in apply_layout_qualifier_to_variable()
3901 qual->flags.q.std430 || in apply_layout_qualifier_to_variable()
3902 qual->flags.q.packed || in apply_layout_qualifier_to_variable()
3903 qual->flags.q.shared) { in apply_layout_qualifier_to_variable()
3911 if (qual->flags.q.row_major || qual->flags.q.column_major) { in apply_layout_qualifier_to_variable()
3924 if (qual->flags.q.early_fragment_tests) { in apply_layout_qualifier_to_variable()
3929 if (qual->flags.q.inner_coverage) { in apply_layout_qualifier_to_variable()
3934 if (qual->flags.q.post_depth_coverage) { in apply_layout_qualifier_to_variable()
3940 apply_bindless_qualifier_to_variable(qual, var, state, loc); in apply_layout_qualifier_to_variable()
3942 if (qual->flags.q.pixel_interlock_ordered || in apply_layout_qualifier_to_variable()
3943 qual->flags.q.pixel_interlock_unordered || in apply_layout_qualifier_to_variable()
3944 qual->flags.q.sample_interlock_ordered || in apply_layout_qualifier_to_variable()
3945 qual->flags.q.sample_interlock_unordered) { in apply_layout_qualifier_to_variable()
3953 if (is_conflicting_layer_redeclaration(state, qual)) { in apply_layout_qualifier_to_variable()
3958 if (qual->flags.q.viewport_relative) { in apply_layout_qualifier_to_variable()
3961 } else if (qual->flags.q.viewport_relative) { in apply_layout_qualifier_to_variable()
3969 apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, in apply_type_qualifier_to_variable() argument
3975 STATIC_ASSERT(sizeof(qual->flags.q) <= sizeof(qual->flags.i)); in apply_type_qualifier_to_variable()
3977 if (qual->flags.q.invariant) { in apply_type_qualifier_to_variable()
3989 if (qual->flags.q.precise) { in apply_type_qualifier_to_variable()
4000 if (qual->is_subroutine_decl() && !qual->flags.q.uniform) { in apply_type_qualifier_to_variable()
4006 if (qual->flags.q.constant || qual->flags.q.attribute in apply_type_qualifier_to_variable()
4007 || qual->flags.q.uniform in apply_type_qualifier_to_variable()
4008 || (qual->flags.q.varying && (state->stage == MESA_SHADER_FRAGMENT))) in apply_type_qualifier_to_variable()
4011 if (qual->flags.q.centroid) in apply_type_qualifier_to_variable()
4014 if (qual->flags.q.sample) in apply_type_qualifier_to_variable()
4020 select_gles_precision(qual->precision, var->type, state, loc); in apply_type_qualifier_to_variable()
4023 if (qual->flags.q.patch) in apply_type_qualifier_to_variable()
4026 if (qual->flags.q.attribute && state->stage != MESA_SHADER_VERTEX) { in apply_type_qualifier_to_variable()
4035 if (qual->flags.q.prim_type) { in apply_type_qualifier_to_variable()
4050 if (is_parameter && qual->flags.q.constant && qual->flags.q.out) { in apply_type_qualifier_to_variable()
4060 if (qual->flags.q.in && qual->flags.q.out) in apply_type_qualifier_to_variable()
4062 else if (qual->flags.q.in) in apply_type_qualifier_to_variable()
4064 else if (qual->flags.q.attribute in apply_type_qualifier_to_variable()
4065 || (qual->flags.q.varying && (state->stage == MESA_SHADER_FRAGMENT))) in apply_type_qualifier_to_variable()
4067 else if (qual->flags.q.out) in apply_type_qualifier_to_variable()
4069 else if (qual->flags.q.varying && (state->stage == MESA_SHADER_VERTEX)) in apply_type_qualifier_to_variable()
4071 else if (qual->flags.q.uniform) in apply_type_qualifier_to_variable()
4073 else if (qual->flags.q.buffer) in apply_type_qualifier_to_variable()
4075 else if (qual->flags.q.shared_storage) in apply_type_qualifier_to_variable()
4081 var->data.fb_fetch_output = qual->flags.q.in && qual->flags.q.out; in apply_type_qualifier_to_variable()
4088 var->data.memory_coherent = !qual->flags.q.non_coherent; in apply_type_qualifier_to_variable()
4108 if (qual->flags.q.non_coherent) in apply_type_qualifier_to_variable()
4199 interpret_interpolation_qualifier(qual, var->type, in apply_type_qualifier_to_variable()
4206 const bool uses_deprecated_qualifier = qual->flags.q.attribute in apply_type_qualifier_to_variable()
4207 || qual->flags.q.varying; in apply_type_qualifier_to_variable()
4227 if (qual->flags.q.sample && (!is_varying_var(var, state->stage) || uses_deprecated_qualifier)) { in apply_type_qualifier_to_variable()
4232 if (qual->flags.q.centroid && !is_varying_var(var, state->stage)) { in apply_type_qualifier_to_variable()
4238 if (qual->flags.q.shared_storage && state->stage != MESA_SHADER_COMPUTE) { in apply_type_qualifier_to_variable()
4244 apply_image_qualifier_to_variable(qual, var, state, loc); in apply_type_qualifier_to_variable()
7336 const struct ast_type_qualifier *const qual = in ast_process_struct_or_iface_block_members() local
7384 if (qual->flags.q.explicit_binding) { in ast_process_struct_or_iface_block_members()
7394 !qual->flags.q.explicit_location) || in ast_process_struct_or_iface_block_members()
7396 qual->flags.q.explicit_location))) { in ast_process_struct_or_iface_block_members()
7407 qual->flags.q.explicit_location; in ast_process_struct_or_iface_block_members()
7411 if (qual->flags.q.std140 || in ast_process_struct_or_iface_block_members()
7412 qual->flags.q.std430 || in ast_process_struct_or_iface_block_members()
7413 qual->flags.q.packed || in ast_process_struct_or_iface_block_members()
7414 qual->flags.q.shared) { in ast_process_struct_or_iface_block_members()
7422 if (qual->flags.q.constant) { in ast_process_struct_or_iface_block_members()
7428 validate_memory_qualifier_for_type(state, &loc, qual, decl_type); in ast_process_struct_or_iface_block_members()
7429 validate_image_format_qualifier_for_type(state, &loc, qual, decl_type); in ast_process_struct_or_iface_block_members()
7437 if (qual->flags.q.explicit_stream) { in ast_process_struct_or_iface_block_members()
7440 qual->stream, &qual_stream) && in ast_process_struct_or_iface_block_members()
7451 if (qual->flags.q.explicit_xfb_buffer) { in ast_process_struct_or_iface_block_members()
7454 qual->xfb_buffer, &qual_xfb_buffer)) { in ast_process_struct_or_iface_block_members()
7470 if (qual->flags.q.explicit_xfb_stride) { in ast_process_struct_or_iface_block_members()
7473 qual->xfb_stride, &qual_xfb_stride)) { in ast_process_struct_or_iface_block_members()
7478 if (qual->flags.q.uniform && qual->has_interpolation()) { in ast_process_struct_or_iface_block_members()
7484 if ((qual->flags.q.uniform || !is_interface) && in ast_process_struct_or_iface_block_members()
7485 qual->has_auxiliary_storage()) { in ast_process_struct_or_iface_block_members()
7491 if (qual->flags.q.row_major || qual->flags.q.column_major) { in ast_process_struct_or_iface_block_members()
7492 if (!qual->flags.q.uniform && !qual->flags.q.buffer) { in ast_process_struct_or_iface_block_members()
7513 interpret_interpolation_qualifier(qual, field_type, in ast_process_struct_or_iface_block_members()
7515 fields[i].centroid = qual->flags.q.centroid ? 1 : 0; in ast_process_struct_or_iface_block_members()
7516 fields[i].sample = qual->flags.q.sample ? 1 : 0; in ast_process_struct_or_iface_block_members()
7517 fields[i].patch = qual->flags.q.patch ? 1 : 0; in ast_process_struct_or_iface_block_members()
7523 if (qual->flags.q.explicit_location) { in ast_process_struct_or_iface_block_members()
7526 qual->location, &qual_location)) { in ast_process_struct_or_iface_block_members()
7548 if (qual->flags.q.row_major || in ast_process_struct_or_iface_block_members()
7564 if (qual->flags.q.explicit_offset) { in ast_process_struct_or_iface_block_members()
7567 qual->offset, &qual_offset)) { in ast_process_struct_or_iface_block_members()
7587 if (qual->flags.q.explicit_align || expl_align != 0) { in ast_process_struct_or_iface_block_members()
7593 } else if (qual->flags.q.explicit_align) { in ast_process_struct_or_iface_block_members()
7596 qual->align, &member_align)) { in ast_process_struct_or_iface_block_members()
7610 } else if (!qual->flags.q.explicit_offset) { in ast_process_struct_or_iface_block_members()
7624 if (qual->flags.q.explicit_xfb_offset) { in ast_process_struct_or_iface_block_members()
7627 qual->offset, &xfb_offset)) { in ast_process_struct_or_iface_block_members()
7654 if (qual->flags.q.row_major) in ast_process_struct_or_iface_block_members()
7656 else if (qual->flags.q.column_major) in ast_process_struct_or_iface_block_members()
7674 if (qual->flags.q.read_only || qual->flags.q.write_only) { in ast_process_struct_or_iface_block_members()
7675 fields[i].memory_read_only = qual->flags.q.read_only; in ast_process_struct_or_iface_block_members()
7676 fields[i].memory_write_only = qual->flags.q.write_only; in ast_process_struct_or_iface_block_members()
7687 fields[i].memory_coherent = qual->flags.q.coherent || in ast_process_struct_or_iface_block_members()
7689 fields[i].memory_volatile = qual->flags.q._volatile || in ast_process_struct_or_iface_block_members()
7691 fields[i].memory_restrict = qual->flags.q.restrict_flag || in ast_process_struct_or_iface_block_members()
7695 if (qual->flags.q.explicit_image_format) { in ast_process_struct_or_iface_block_members()
7696 if (qual->image_base_type != in ast_process_struct_or_iface_block_members()
7702 fields[i].image_format = qual->image_format; in ast_process_struct_or_iface_block_members()
7704 if (!qual->flags.q.write_only) { in ast_process_struct_or_iface_block_members()
7717 fields[i].precision = select_gles_precision(qual->precision, in ast_process_struct_or_iface_block_members()
7722 fields[i].precision = qual->precision; in ast_process_struct_or_iface_block_members()