summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_compiler.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h13
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c10
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs_surface_state.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c14
-rw-r--r--src/mesa/drivers/dri/i965/gen6_gs_state.c3
7 files changed, 10 insertions, 37 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.h b/src/mesa/drivers/dri/i965/brw_compiler.h
index 772c11ee170..819c7d604e1 100644
--- a/src/mesa/drivers/dri/i965/brw_compiler.h
+++ b/src/mesa/drivers/dri/i965/brw_compiler.h
@@ -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 {
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 4feb3f7ec17..0c887510acd 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -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)
{
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 8fba6fadd9b..0f052d21b0a 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -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));
diff --git a/src/mesa/drivers/dri/i965/brw_gs.h b/src/mesa/drivers/dri/i965/brw_gs.h
index 7ccd22e5112..e1f8c4db0d3 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.h
+++ b/src/mesa/drivers/dri/i965/brw_gs.h
@@ -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
diff --git a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c
index 686ddb4b940..4d0f50c9c11 100644
--- a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index 69c467d9a3d..cb73f424f33 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -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) {
diff --git a/src/mesa/drivers/dri/i965/gen6_gs_state.c b/src/mesa/drivers/dri/i965/gen6_gs_state.c
index 492376426c6..a2520d86314 100644
--- a/src/mesa/drivers/dri/i965/gen6_gs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_gs_state.c
@@ -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 */