mesa/cs: Update program.c for compute shaders.
authorPaul Berry <stereotype441@gmail.com>
Sat, 11 Jan 2014 05:39:25 +0000 (21:39 -0800)
committerJordan Justen <jordan.l.justen@intel.com>
Sat, 2 May 2015 07:34:28 +0000 (00:34 -0700)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/program/program.c

index 4f28e2a3b547052f00c1a4972557b7d87d89e6b6..fb61f4d360d500cebe57dd7518a91f775e47db0b 100644 (file)
@@ -102,6 +102,8 @@ _mesa_init_program(struct gl_context *ctx)
    _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current,
                             NULL);
 
+   _mesa_reference_compprog(ctx, &ctx->ComputeProgram.Current, NULL);
+
    /* XXX probably move this stuff */
    ctx->ATIFragmentShader.Enabled = GL_FALSE;
    ctx->ATIFragmentShader.Current = ctx->Shared->DefaultFragmentShader;
@@ -121,6 +123,7 @@ _mesa_free_program_data(struct gl_context *ctx)
    _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL);
    _mesa_delete_shader_cache(ctx, ctx->FragmentProgram.Cache);
    _mesa_reference_geomprog(ctx, &ctx->GeometryProgram.Current, NULL);
+   _mesa_reference_compprog(ctx, &ctx->ComputeProgram.Current, NULL);
 
    /* XXX probably move this stuff */
    if (ctx->ATIFragmentShader.Current) {