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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user