[Mesa-dev] [PATCH 19/27] glsl: skip location and component packing validation on patch out
eocallaghan at alterapraxis.com
eocallaghan at alterapraxis.com
Fri Apr 22 04:26:54 UTC 2016
Acked-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
On 2016-03-31 21:57, Timothy Arceri wrote:
> These outputs have a separate location domain from per-vertex outputs
> and need to be handled separately. For now just skip validation so we
> don't invalidate valid shaders.
> ---
> src/compiler/glsl/link_varyings.cpp | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/src/compiler/glsl/link_varyings.cpp
> b/src/compiler/glsl/link_varyings.cpp
> index d125a9f..4f57fb2 100644
> --- a/src/compiler/glsl/link_varyings.cpp
> +++ b/src/compiler/glsl/link_varyings.cpp
> @@ -348,8 +348,12 @@ cross_validate_outputs_to_inputs(struct
> gl_shader_program *prog,
> foreach_in_list(ir_instruction, node, producer->ir) {
> ir_variable *const var = node->as_variable();
>
> - if ((var == NULL) || (var->data.mode != ir_var_shader_out))
> - continue;
> + /* FIXME: We should also validate per patch outputs too rather
> than just
> + * skipping over them here.
> + */
> + if ((var == NULL) || var->data.patch ||
> + (var->data.mode != ir_var_shader_out))
> + continue;
>
> if (!var->data.explicit_location
> || var->data.location < VARYING_SLOT_VAR0)
> @@ -432,8 +436,12 @@ cross_validate_outputs_to_inputs(struct
> gl_shader_program *prog,
> foreach_in_list(ir_instruction, node, consumer->ir) {
> ir_variable *const input = node->as_variable();
>
> - if ((input == NULL) || (input->data.mode != ir_var_shader_in))
> - continue;
> + /* FIXME: We should also validate per patch outputs too rather
> than just
> + * skipping over them here.
> + */
> + if ((input == NULL) || input->data.patch ||
> + (input->data.mode != ir_var_shader_in))
> + continue;
>
> if (strcmp(input->name, "gl_Color") == 0 && input->data.used) {
> const ir_variable *const front_color =
More information about the mesa-dev
mailing list