[Mesa-dev] [PATCH] i965: Move select_clip_planes to brw_vs.c

Jason Ekstrand jason at jlekstrand.net
Wed Mar 1 20:23:07 UTC 2017


On Wed, Mar 1, 2017 at 12:21 PM, Matt Turner <mattst88 at gmail.com> wrote:

> On Wed, Mar 1, 2017 at 12:16 PM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
> > ---
> >  src/mesa/drivers/dri/i965/brw_shader.cpp | 25 -------------------------
> >  src/mesa/drivers/dri/i965/brw_vs.c       | 25 +++++++++++++++++++++++++
> >  2 files changed, 25 insertions(+), 25 deletions(-)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp
> b/src/mesa/drivers/dri/i965/brw_shader.cpp
> > index 28ed8dc..53576da 100644
> > --- a/src/mesa/drivers/dri/i965/brw_shader.cpp
> > +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
> > @@ -1137,31 +1137,6 @@ backend_shader::calculate_cfg()
> >     cfg = new(mem_ctx) cfg_t(&this->instructions);
> >  }
> >
> > -/**
> > - * Decide which set of clip planes should be used when clipping via
> > - * gl_Position or gl_ClipVertex.
> > - */
> > -gl_clip_plane *brw_select_clip_planes(struct gl_context *ctx)
> > -{
> > -   if (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]) {
> > -      /* There is currently a GLSL vertex shader, so clip according to
> GLSL
> > -       * rules, which means compare gl_ClipVertex (or gl_Position, if
> > -       * gl_ClipVertex wasn't assigned) against the eye-coordinate clip
> planes
> > -       * that were stored in EyeUserPlane at the time the clip planes
> were
> > -       * specified.
> > -       */
> > -      return ctx->Transform.EyeUserPlane;
> > -   } else {
> > -      /* Either we are using fixed function or an ARB vertex program.
> In
> > -       * either case the clip planes are going to be compared against
> > -       * gl_Position (which is in clip coordinates) so we have to clip
> using
> > -       * _ClipUserPlane, which was transformed into clip coordinates by
> Mesa
> > -       * core.
> > -       */
> > -      return ctx->Transform._ClipUserPlane;
> > -   }
> > -}
> > -
> >  extern "C" const unsigned *
> >  brw_compile_tes(const struct brw_compiler *compiler,
> >                  void *log_data,
> > diff --git a/src/mesa/drivers/dri/i965/brw_vs.c
> b/src/mesa/drivers/dri/i965/brw_vs.c
> > index 3f11a76..fa54eb5 100644
> > --- a/src/mesa/drivers/dri/i965/brw_vs.c
> > +++ b/src/mesa/drivers/dri/i965/brw_vs.c
> > @@ -43,6 +43,31 @@
> >
> >  #include "util/ralloc.h"
> >
> > +/**
> > + * Decide which set of clip planes should be used when clipping via
> > + * gl_Position or gl_ClipVertex.
> > + */
> > +gl_clip_plane *brw_select_clip_planes(struct gl_context *ctx)
>
> Fix the function declaration to be BSD-style while we're moving it.
>

Will do


> Reviewed-by: Matt Turner <mattst88 at gmail.com>
>

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170301/1be1dbd7/attachment.html>


More information about the mesa-dev mailing list