[Mesa-dev] [PATCH] glsl/distance: make sure we use clip dist varying slot for lowered var.
Ilia Mirkin
imirkin at alum.mit.edu
Tue May 24 20:04:05 UTC 2016
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On Tue, May 24, 2016 at 4:03 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> When lowering, we always want to use the clip dist varying.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/compiler/glsl/lower_distance.cpp | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/compiler/glsl/lower_distance.cpp b/src/compiler/glsl/lower_distance.cpp
> index 49a71c2..c2158f2 100644
> --- a/src/compiler/glsl/lower_distance.cpp
> +++ b/src/compiler/glsl/lower_distance.cpp
> @@ -168,6 +168,7 @@ lower_distance_visitor::visit(ir_variable *ir)
> *new_var = ir->clone(ralloc_parent(ir), NULL);
> (*new_var)->name = ralloc_strdup(*new_var, GLSL_CLIP_VAR_NAME);
> (*new_var)->data.max_array_access = new_size - 1;
> + (*new_var)->data.location = VARYING_SLOT_CLIP_DIST0;
>
> if (!ir->type->fields.array->is_array()) {
> /* gl_ClipDistance (used for vertex, tessellation evaluation and
> --
> 2.5.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list