summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-19 12:11:06 +1100
committerTimothy Arceri <[email protected]>2016-10-26 14:29:36 +1100
commit9605b98a078654f6f76e85221599e5fa8c073de6 (patch)
treee5b3666d491fa200674dee9a635684d721d4f84d /src/mesa/main
parent5a228c0aae347ce68009f165427581e149611d65 (diff)
i965/mesa/st: eliminate gl_compute_program
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/mtypes.h21
-rw-r--r--src/mesa/main/state.c10
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);
}
}