Re: [Mesa-dev] [PATCH 29/30] i965/cs: Create the brw_compute_program struct, and the code to initialize it.

2014-02-03 Thread Paul Berry
On 1 February 2014 22:37, Jordan Justen  wrote:

> On Thu, Jan 9, 2014 at 6:19 PM, Paul Berry 
> wrote:
> > ---
> >  src/mesa/drivers/dri/i965/brw_context.h |  8 
> >  src/mesa/drivers/dri/i965/brw_program.c | 11 +++
> >  2 files changed, 19 insertions(+)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_context.h
> b/src/mesa/drivers/dri/i965/brw_context.h
> > index df32ccb..abc1783 100644
> > --- a/src/mesa/drivers/dri/i965/brw_context.h
> > +++ b/src/mesa/drivers/dri/i965/brw_context.h
> > @@ -316,6 +316,14 @@ struct brw_fragment_program {
> > GLuint id;  /**< serial no. to identify frag progs, never re-used */
> >  };
> >
> > +
> > +/** Subclass of Mesa compute program */
> > +struct brw_compute_program {
> > +   struct gl_compute_program program;
> > +   unsigned id;  /**< serial no. to identify frag progs, never re-used
> */
>
> "frag" in comment
>

Whoops, thanks.  I've changed it to "serial no. to identify compute
progs...".


>
> Reviewed-by: Jordan Justen 
>
> > +};
> > +
> > +
> >  struct brw_shader {
> > struct gl_shader base;
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_program.c
> b/src/mesa/drivers/dri/i965/brw_program.c
> > index 90844e5..2d92acb 100644
> > --- a/src/mesa/drivers/dri/i965/brw_program.c
> > +++ b/src/mesa/drivers/dri/i965/brw_program.c
> > @@ -113,6 +113,17 @@ static struct gl_program *brwNewProgram( struct
> gl_context *ctx,
> >}
> > }
> >
> > +   case GL_COMPUTE_PROGRAM_NV: {
> > +  struct brw_compute_program *prog =
> CALLOC_STRUCT(brw_compute_program);
> > +  if (prog) {
> > + prog->id = get_new_program_id(brw->intelScreen);
> > +
> > + return _mesa_init_compute_program(ctx, &prog->program, target,
> id);
> > +  } else {
> > + return NULL;
> > +  }
> > +   }
> > +
> > default:
> >assert(!"Unsupported target in brwNewProgram()");
> >return NULL;
> > --
> > 1.8.5.2
> >
> > ___
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 29/30] i965/cs: Create the brw_compute_program struct, and the code to initialize it.

2014-02-01 Thread Jordan Justen
On Thu, Jan 9, 2014 at 6:19 PM, Paul Berry  wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_context.h |  8 
>  src/mesa/drivers/dri/i965/brw_program.c | 11 +++
>  2 files changed, 19 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.h 
> b/src/mesa/drivers/dri/i965/brw_context.h
> index df32ccb..abc1783 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.h
> +++ b/src/mesa/drivers/dri/i965/brw_context.h
> @@ -316,6 +316,14 @@ struct brw_fragment_program {
> GLuint id;  /**< serial no. to identify frag progs, never re-used */
>  };
>
> +
> +/** Subclass of Mesa compute program */
> +struct brw_compute_program {
> +   struct gl_compute_program program;
> +   unsigned id;  /**< serial no. to identify frag progs, never re-used */

"frag" in comment

Reviewed-by: Jordan Justen 

> +};
> +
> +
>  struct brw_shader {
> struct gl_shader base;
>
> diff --git a/src/mesa/drivers/dri/i965/brw_program.c 
> b/src/mesa/drivers/dri/i965/brw_program.c
> index 90844e5..2d92acb 100644
> --- a/src/mesa/drivers/dri/i965/brw_program.c
> +++ b/src/mesa/drivers/dri/i965/brw_program.c
> @@ -113,6 +113,17 @@ static struct gl_program *brwNewProgram( struct 
> gl_context *ctx,
>}
> }
>
> +   case GL_COMPUTE_PROGRAM_NV: {
> +  struct brw_compute_program *prog = CALLOC_STRUCT(brw_compute_program);
> +  if (prog) {
> + prog->id = get_new_program_id(brw->intelScreen);
> +
> + return _mesa_init_compute_program(ctx, &prog->program, target, id);
> +  } else {
> + return NULL;
> +  }
> +   }
> +
> default:
>assert(!"Unsupported target in brwNewProgram()");
>return NULL;
> --
> 1.8.5.2
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 29/30] i965/cs: Create the brw_compute_program struct, and the code to initialize it.

2014-01-09 Thread Paul Berry
---
 src/mesa/drivers/dri/i965/brw_context.h |  8 
 src/mesa/drivers/dri/i965/brw_program.c | 11 +++
 2 files changed, 19 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_context.h 
b/src/mesa/drivers/dri/i965/brw_context.h
index df32ccb..abc1783 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -316,6 +316,14 @@ struct brw_fragment_program {
GLuint id;  /**< serial no. to identify frag progs, never re-used */
 };
 
+
+/** Subclass of Mesa compute program */
+struct brw_compute_program {
+   struct gl_compute_program program;
+   unsigned id;  /**< serial no. to identify frag progs, never re-used */
+};
+
+
 struct brw_shader {
struct gl_shader base;
 
diff --git a/src/mesa/drivers/dri/i965/brw_program.c 
b/src/mesa/drivers/dri/i965/brw_program.c
index 90844e5..2d92acb 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -113,6 +113,17 @@ static struct gl_program *brwNewProgram( struct gl_context 
*ctx,
   }
}
 
+   case GL_COMPUTE_PROGRAM_NV: {
+  struct brw_compute_program *prog = CALLOC_STRUCT(brw_compute_program);
+  if (prog) {
+ prog->id = get_new_program_id(brw->intelScreen);
+
+ return _mesa_init_compute_program(ctx, &prog->program, target, id);
+  } else {
+ return NULL;
+  }
+   }
+
default:
   assert(!"Unsupported target in brwNewProgram()");
   return NULL;
-- 
1.8.5.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev