i965/gs: Add a case to brwNewProgram() for geometry shaders.
authorPaul Berry <stereotype441@gmail.com>
Tue, 2 Jul 2013 15:02:47 +0000 (08:02 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 23 Aug 2013 18:03:05 +0000 (11:03 -0700)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_program.c

index fdb2848261c936af1e05d78b069b5bb0fac5e381..c40d506750ee6e58c938bdb4d650cf1abefa35bf 100644 (file)
@@ -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);
    }