diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2015-10-08 14:39:56 -0700 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2015-10-19 08:47:03 -0700 |
commit | 657863bb5c895fac7f5e52dfd025d07bf52f94a8 (patch) | |
tree | 0967f25a7901ec92d3b0d65fd444bef233f7b276 /src/mesa/drivers/dri/i965/brw_gs.c | |
parent | 5d8bf6de6166a686a006478a420bcd373860e9ee (diff) | |
download | external_mesa3d-657863bb5c895fac7f5e52dfd025d07bf52f94a8.zip external_mesa3d-657863bb5c895fac7f5e52dfd025d07bf52f94a8.tar.gz external_mesa3d-657863bb5c895fac7f5e52dfd025d07bf52f94a8.tar.bz2 |
i965/gs: Rework gs_emit to take a nir_shader and a brw_compiler
This commit removes all dependence on GL state by getting rid of the
brw_context parameter and the GL data structures. Unfortunately, we still
have to pass in the gl_shader_program for gen6 because it's needed for
transform feedback.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_gs.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_gs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index e0165fb..469a6fb 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -57,6 +57,7 @@ brw_codegen_gs_prog(struct brw_context *brw, struct brw_geometry_program *gp, struct brw_gs_prog_key *key) { + struct gl_shader *shader = prog->_LinkedShaders[MESA_SHADER_GEOMETRY]; struct brw_stage_state *stage_state = &brw->gs.base; struct brw_gs_compile c; memset(&c, 0, sizeof(c)); @@ -300,8 +301,11 @@ brw_codegen_gs_prog(struct brw_context *brw, void *mem_ctx = ralloc_context(NULL); unsigned program_size; + char *error_str; const unsigned *program = - brw_gs_emit(brw, prog, &c, mem_ctx, st_index, &program_size); + brw_gs_emit(brw->intelScreen->compiler, brw, &c, + shader->Program->nir, prog, + mem_ctx, st_index, &program_size, &error_str); if (program == NULL) { ralloc_free(mem_ctx); return false; |