[Mesa-dev] [PATCH 2/2] i965/vs: add support for emitting gl_ClipVertex

Paul Berry stereotype441 at gmail.com
Wed Jun 5 08:32:28 PDT 2013


On 5 June 2013 15:50, Chris Forbes <chrisf at ijw.co.nz> wrote:

> Removes the special-case suppression of gl_ClipVertex in the VUE map.
>
> Also calculate vertex outcodes for user clip planes based on
> gl_ClipVertex if written; otherwise gl_Position.
>
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
>

Reviewed-by: Paul Berry <stereotype441 at gmail.com>


> ---
>  src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 +++-
>  src/mesa/drivers/dri/i965/brw_vs.c             | 6 ------
>  2 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> index b2f8f00..33c1b24 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
> @@ -2567,8 +2567,10 @@ vec4_visitor::emit_psiz_and_flags(struct brw_reg
> reg)
>        current_annotation = "Clipping flags";
>        for (i = 0; i < key->nr_userclip_plane_consts; i++) {
>          vec4_instruction *inst;
> +         gl_varying_slot slot = (prog_data->vue_map.slots_valid &
> VARYING_BIT_CLIP_VERTEX)
> +            ? VARYING_SLOT_CLIP_VERTEX : VARYING_SLOT_POS;
>
> -        inst = emit(DP4(dst_null_f(),
> src_reg(output_reg[VARYING_SLOT_POS]),
> +        inst = emit(DP4(dst_null_f(), src_reg(output_reg[slot]),
>                           src_reg(this->userplane[i])));
>          inst->conditional_mod = BRW_CONDITIONAL_L;
>
> diff --git a/src/mesa/drivers/dri/i965/brw_vs.c
> b/src/mesa/drivers/dri/i965/brw_vs.c
> index 6eb916e..720325d 100644
> --- a/src/mesa/drivers/dri/i965/brw_vs.c
> +++ b/src/mesa/drivers/dri/i965/brw_vs.c
> @@ -63,12 +63,6 @@ brw_compute_vue_map(struct brw_context *brw, struct
> brw_vue_map *vue_map,
>  {
>     const struct intel_context *intel = &brw->intel;
>
> -   /* Prior to Gen6, don't assign a slot for VARYING_SLOT_CLIP_VERTEX,
> since
> -    * it is unsupported.
> -    */
> -   if (intel->gen < 6)
> -      slots_valid &= ~VARYING_BIT_CLIP_VERTEX;
> -
>     vue_map->slots_valid = slots_valid;
>     int i;
>
> --
> 1.8.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130605/527dda5d/attachment.html>


More information about the mesa-dev mailing list