};
-/** Subclass of Mesa compute program */
-struct brw_compute_program {
- struct gl_program program;
- unsigned id; /**< serial no. to identify compute progs, never re-used */
-};
-
-
struct brw_shader {
struct gl_linked_shader base;
return (const struct brw_program *) p;
}
-static inline struct brw_compute_program *
-brw_compute_program(struct gl_program *p)
-{
- return (struct brw_compute_program *) p;
-}
-
/**
* Pre-gen6, the register file of the EUs was shared between threads,
* and each thread used some subset allocated on a 16-register block
static bool
brw_codegen_cs_prog(struct brw_context *brw,
struct gl_shader_program *prog,
- struct brw_compute_program *cp,
+ struct brw_program *cp,
struct brw_cs_prog_key *key)
{
const struct gen_device_info *devinfo = &brw->screen->devinfo;
{
struct gl_context *ctx = &brw->ctx;
/* BRW_NEW_COMPUTE_PROGRAM */
- const struct brw_compute_program *cp =
- (struct brw_compute_program *) brw->compute_program;
+ const struct brw_program *cp = (struct brw_program *) brw->compute_program;
const struct gl_program *prog = (struct gl_program *) cp;
memset(key, 0, sizeof(*key));
{
struct gl_context *ctx = &brw->ctx;
struct brw_cs_prog_key key;
- struct brw_compute_program *cp = (struct brw_compute_program *)
- brw->compute_program;
+ struct brw_program *cp = (struct brw_program *) brw->compute_program;
if (!cp)
return;
struct brw_context *brw = brw_context(ctx);
struct brw_cs_prog_key key;
- struct brw_compute_program *bcp = brw_compute_program(prog);
+ struct brw_program *bcp = brw_program(prog);
memset(&key, 0, sizeof(key));
key.program_string_id = bcp->id;
case GL_VERTEX_PROGRAM_ARB:
case GL_TESS_CONTROL_PROGRAM_NV:
case GL_TESS_EVALUATION_PROGRAM_NV:
- case GL_GEOMETRY_PROGRAM_NV: {
+ case GL_GEOMETRY_PROGRAM_NV:
+ case GL_COMPUTE_PROGRAM_NV: {
struct brw_program *prog = CALLOC_STRUCT(brw_program);
if (prog) {
prog->id = get_new_program_id(brw->screen);
return NULL;
}
- case GL_COMPUTE_PROGRAM_NV: {
- struct brw_compute_program *prog = CALLOC_STRUCT(brw_compute_program);
- if (prog) {
- prog->id = get_new_program_id(brw->screen);
-
- return _mesa_init_gl_program(&prog->program, target, id);
- } else {
- return NULL;
- }
- }
-
default:
unreachable("Unsupported target in brwNewProgram()");
}
struct brw_stage_state *stage_state = &brw->cs.base;
/* BRW_NEW_COMPUTE_PROGRAM */
- const struct brw_compute_program *cp =
- (struct brw_compute_program *) brw->compute_program;
+ const struct brw_program *cp = (struct brw_program *) brw->compute_program;
if (cp) {
/* BRW_NEW_CS_PROG_DATA */
struct brw_stage_state *stage_state = &brw->cs.base;
/* BRW_NEW_COMPUTE_PROGRAM */
- struct brw_compute_program *cp =
- (struct brw_compute_program *) brw->compute_program;
+ struct brw_program *cp = (struct brw_program *) brw->compute_program;
/* BRW_NEW_CS_PROG_DATA */
const struct brw_stage_prog_data *prog_data = brw->cs.base.prog_data;