i965: replace brw_geomerty_program with brw_program
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -34,7 +34,7 @@ extern "C" {
|
||||
|
||||
struct ra_regs;
|
||||
struct nir_shader;
|
||||
struct brw_geometry_program;
|
||||
struct brw_program;
|
||||
union gl_constant_value;
|
||||
|
||||
struct brw_compiler {
|
||||
|
||||
@@ -348,13 +348,6 @@ struct brw_tess_eval_program {
|
||||
};
|
||||
|
||||
|
||||
/** 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;
|
||||
@@ -1723,12 +1716,6 @@ brw_tess_eval_program(struct gl_program *p)
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -94,7 +94,7 @@ assign_gs_binding_table_offsets(const struct gen_device_info *devinfo,
|
||||
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;
|
||||
@@ -210,8 +210,7 @@ brw_gs_populate_key(struct brw_context *brw,
|
||||
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));
|
||||
|
||||
@@ -229,8 +228,7 @@ brw_upload_gs_prog(struct brw_context *brw)
|
||||
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;
|
||||
@@ -275,7 +273,7 @@ brw_gs_precompile(struct gl_context *ctx,
|
||||
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));
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ brw_gs_populate_key(struct brw_context *brw,
|
||||
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
|
||||
|
||||
@@ -41,8 +41,7 @@ brw_upload_gs_pull_constants(struct brw_context *brw)
|
||||
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;
|
||||
|
||||
@@ -130,7 +130,8 @@ static struct gl_program *brwNewProgram( struct gl_context *ctx,
|
||||
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);
|
||||
@@ -160,17 +161,6 @@ static struct gl_program *brwNewProgram( struct gl_context *ctx,
|
||||
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) {
|
||||
|
||||
@@ -37,8 +37,7 @@ gen6_upload_gs_push_constants(struct brw_context *brw)
|
||||
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 */
|
||||
|
||||
Reference in New Issue
Block a user