i965/cs: Create the brw_compute_program struct, and the code to initialize it.

v2: Fix comment.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Paul Berry
2014-01-07 15:51:13 -08:00
parent 1fe274b3d7
commit 3bbf93045a
2 changed files with 19 additions and 0 deletions
+8
View File
@@ -316,6 +316,14 @@ struct brw_fragment_program {
GLuint id; /**< serial no. to identify frag progs, never re-used */
};
/** Subclass of Mesa compute program */
struct brw_compute_program {
struct gl_compute_program program;
unsigned id; /**< serial no. to identify compute progs, never re-used */
};
struct brw_shader {
struct gl_shader base;
+11
View File
@@ -113,6 +113,17 @@ static struct gl_program *brwNewProgram( struct gl_context *ctx,
}
}
case GL_COMPUTE_PROGRAM_NV: {
struct brw_compute_program *prog = CALLOC_STRUCT(brw_compute_program);
if (prog) {
prog->id = get_new_program_id(brw->intelScreen);
return _mesa_init_compute_program(ctx, &prog->program, target, id);
} else {
return NULL;
}
}
default:
assert(!"Unsupported target in brwNewProgram()");
return NULL;