diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/mtypes.h | 21 | ||||
-rw-r--r-- | src/mesa/main/state.c | 10 |
2 files changed, 7 insertions, 24 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 451ede8043f..200a7afb1e0 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2025,23 +2025,6 @@ struct gl_fragment_program }; -/** Compute program object */ -struct gl_compute_program -{ - struct gl_program Base; /**< base class */ - - /** - * Size specified using local_size_{x,y,z}. - */ - unsigned LocalSize[3]; - - /** - * Size of shared variables accessed by the compute shader. - */ - unsigned SharedSize; -}; - - /** * State common to vertex and fragment programs. */ @@ -2154,7 +2137,7 @@ struct gl_compute_program_state /** Currently enabled and valid program (including internal programs * and compiled shader programs). */ - struct gl_compute_program *_Current; + struct gl_program *_Current; }; @@ -2782,7 +2765,7 @@ struct gl_shader_program } Vert; /** - * Compute shader state - copied into gl_compute_program by + * Compute shader state - copied into gl_program by * _mesa_copy_linked_program_data(). */ struct { diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index b09b3fefec8..2f810b497b8 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -112,7 +112,7 @@ update_program(struct gl_context *ctx) const struct gl_program *prevGP = ctx->GeometryProgram._Current; const struct gl_program *prevTCP = ctx->TessCtrlProgram._Current; const struct gl_program *prevTEP = ctx->TessEvalProgram._Current; - const struct gl_compute_program *prevCP = ctx->ComputeProgram._Current; + const struct gl_program *prevCP = ctx->ComputeProgram._Current; GLbitfield new_state = 0x0; /* @@ -245,11 +245,11 @@ update_program(struct gl_context *ctx) if (csProg && csProg->LinkStatus && csProg->_LinkedShaders[MESA_SHADER_COMPUTE]) { /* Use GLSL compute shader */ - _mesa_reference_compprog(ctx, &ctx->ComputeProgram._Current, - gl_compute_program(csProg->_LinkedShaders[MESA_SHADER_COMPUTE]->Program)); + _mesa_reference_program(ctx, &ctx->ComputeProgram._Current, + csProg->_LinkedShaders[MESA_SHADER_COMPUTE]->Program); } else { /* no compute program */ - _mesa_reference_compprog(ctx, &ctx->ComputeProgram._Current, NULL); + _mesa_reference_program(ctx, &ctx->ComputeProgram._Current, NULL); } /* Let the driver know what's happening: @@ -298,7 +298,7 @@ update_program(struct gl_context *ctx) new_state |= _NEW_PROGRAM; if (ctx->Driver.BindProgram) { ctx->Driver.BindProgram(ctx, GL_COMPUTE_PROGRAM_NV, - (struct gl_program *) ctx->ComputeProgram._Current); + ctx->ComputeProgram._Current); } } |