diff options
author | Eric Anholt <[email protected]> | 2013-10-02 14:07:40 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-10-15 10:18:42 -0700 |
commit | 3c9dc2d31b80fc73bffa1f40a91443a53229c8e2 (patch) | |
tree | 0b254db5106e9a93aad131d79c6e1399a6301db6 /src/mesa/drivers/dri/i965/brw_gs_surface_state.c | |
parent | 5463b5bbbdf133986ac89fd6afdf2bc9622e3ca6 (diff) |
i965: Make a brw_stage_prog_data for storing the SURF_INDEX information.
It would be nice to be able to pack our binding table so that programs
that use 1 render target don't upload an extra BRW_MAX_DRAW_BUFFERS - 1
binding table entries. To do that, we need the compiled program to have
information on where its surfaces go.
v2: Rename size to size_bytes to be more explicit.
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_gs_surface_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_gs_surface_state.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 d0ce412e846..55152c27a02 100644 --- a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c @@ -67,7 +67,6 @@ static void brw_upload_gs_ubo_surfaces(struct brw_context *brw) { struct gl_context *ctx = &brw->ctx; - struct brw_stage_state *stage_state = &brw->gs.base; /* _NEW_PROGRAM */ struct gl_shader_program *prog = ctx->Shader.CurrentGeometryProgram; @@ -75,15 +74,16 @@ brw_upload_gs_ubo_surfaces(struct brw_context *brw) if (!prog) return; + /* CACHE_NEW_GS_PROG */ brw_upload_ubo_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_GEOMETRY], - &stage_state->surf_offset[SURF_INDEX_VEC4_UBO(0)]); + &brw->gs.base, &brw->gs.prog_data->base.base); } const struct brw_tracked_state brw_gs_ubo_surfaces = { .dirty = { .mesa = _NEW_PROGRAM, .brw = BRW_NEW_BATCH | BRW_NEW_UNIFORM_BUFFER, - .cache = 0, + .cache = CACHE_NEW_GS_PROG, }, .emit = brw_upload_gs_ubo_surfaces, }; |