[Mesa-dev] [PATCH 12/30] i965/gs: Add a case to brwNewProgram() for geometry shaders.

Paul Berry stereotype441 at gmail.com
Thu Aug 22 07:51:52 PDT 2013


On 20 August 2013 11:30, Paul Berry <stereotype441 at gmail.com> wrote:

> ---
>  src/mesa/drivers/dri/i965/brw_program.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_program.c
> b/src/mesa/drivers/dri/i965/brw_program.c
> index fdb2848..c40d506 100644
> --- a/src/mesa/drivers/dri/i965/brw_program.c
> +++ b/src/mesa/drivers/dri/i965/brw_program.c
> @@ -102,6 +102,17 @@ static struct gl_program *brwNewProgram( struct
> gl_context *ctx,
>          return NULL;
>     }
>
> +   case MESA_GEOMETRY_PROGRAM: {
> +      struct brw_geometry_program *prog =
> CALLOC_STRUCT(brw_geometry_program);
> +      if (prog) {
> +         prog->id = get_new_program_id(brw->intelScreen);
> +
> +         return _mesa_init_geometry_program(ctx, &prog->program, target,
> id);
> +      } else {
> +         return NULL;
> +      }
> +   }
> +
>     default:
>        return _mesa_new_program(ctx, target, id);
>     }
>

>From our in-person code review yesterday:

As a follow up patch, make the default case assert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130822/c64f9eca/attachment.html>


More information about the mesa-dev mailing list