struct ra_regs;
struct nir_shader;
-struct brw_geometry_program;
+struct brw_program;
union gl_constant_value;
struct brw_compiler {
};
-/** Subclass of Mesa geometry program */
-struct brw_geometry_program {
- struct gl_program program;
- unsigned id; /**< serial no. to identify geom progs, never re-used */
-};
-
-
/** Subclass of Mesa fragment program */
struct brw_fragment_program {
struct gl_program program;
return (struct brw_tess_eval_program *) p;
}
-static inline struct brw_geometry_program *
-brw_geometry_program(struct gl_program *p)
-{
- return (struct brw_geometry_program *) p;
-}
-
static inline struct brw_fragment_program *
brw_fragment_program(struct gl_program *p)
{
bool
brw_codegen_gs_prog(struct brw_context *brw,
struct gl_shader_program *prog,
- struct brw_geometry_program *gp,
+ struct brw_program *gp,
struct brw_gs_prog_key *key)
{
struct brw_compiler *compiler = brw->screen->compiler;
struct brw_gs_prog_key *key)
{
struct gl_context *ctx = &brw->ctx;
- struct brw_geometry_program *gp =
- (struct brw_geometry_program *) brw->geometry_program;
+ struct brw_program *gp = (struct brw_program *) brw->geometry_program;
memset(key, 0, sizeof(*key));
struct brw_stage_state *stage_state = &brw->gs.base;
struct brw_gs_prog_key key;
/* BRW_NEW_GEOMETRY_PROGRAM */
- struct brw_geometry_program *gp =
- (struct brw_geometry_program *) brw->geometry_program;
+ struct brw_program *gp = (struct brw_program *) brw->geometry_program;
if (!brw_gs_state_dirty(brw))
return;
struct brw_stage_prog_data *old_prog_data = brw->gs.base.prog_data;
bool success;
- struct brw_geometry_program *bgp = brw_geometry_program(prog);
+ struct brw_program *bgp = brw_program(prog);
memset(&key, 0, sizeof(key));
bool
brw_codegen_gs_prog(struct brw_context *brw,
struct gl_shader_program *prog,
- struct brw_geometry_program *gp,
+ struct brw_program *gp,
struct brw_gs_prog_key *key);
#ifdef __cplusplus
struct brw_stage_state *stage_state = &brw->gs.base;
/* BRW_NEW_GEOMETRY_PROGRAM */
- struct brw_geometry_program *gp =
- (struct brw_geometry_program *) brw->geometry_program;
+ struct brw_program *gp = (struct brw_program *) brw->geometry_program;
if (!gp)
return;
struct brw_context *brw = brw_context(ctx);
switch (target) {
- case GL_VERTEX_PROGRAM_ARB: {
+ case GL_VERTEX_PROGRAM_ARB:
+ case GL_GEOMETRY_PROGRAM_NV: {
struct brw_program *prog = CALLOC_STRUCT(brw_program);
if (prog) {
prog->id = get_new_program_id(brw->screen);
return NULL;
}
- case GL_GEOMETRY_PROGRAM_NV: {
- struct brw_geometry_program *prog = CALLOC_STRUCT(brw_geometry_program);
- if (prog) {
- prog->id = get_new_program_id(brw->screen);
-
- return _mesa_init_gl_program(&prog->program, target, id);
- } else {
- return NULL;
- }
- }
-
case GL_TESS_CONTROL_PROGRAM_NV: {
struct brw_tess_ctrl_program *prog = CALLOC_STRUCT(brw_tess_ctrl_program);
if (prog) {
struct brw_stage_state *stage_state = &brw->gs.base;
/* BRW_NEW_GEOMETRY_PROGRAM */
- const struct brw_geometry_program *gp =
- (struct brw_geometry_program *) brw->geometry_program;
+ const struct brw_program *gp = brw_program_const(brw->geometry_program);
if (gp) {
/* BRW_NEW_GS_PROG_DATA */