diff options
author | Chia-I Wu <[email protected]> | 2013-06-18 12:33:15 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-06-18 16:23:13 +0800 |
commit | 443dc15cf77edcaa7804c4277f0cce5d7c1d6b25 (patch) | |
tree | 2373d502ca0da8d105400371b41f9fa6a953f912 /src/gallium/drivers/ilo/ilo_state.c | |
parent | eb2021507556633cd6ba64cda26653e3c43e80df (diff) |
ilo: construct depth/stencil command in create_surface()
Add ilo_gpe_init_zs_surface() to construct
3DSTATE_DEPTH_BUFFER
3DSTATE_STENCIL_BUFFER
3DSTATE_HIER_DEPTH_BUFFER
at surface creation time. This allows fast state emission in draw_vbo().
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_state.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_state.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state.c b/src/gallium/drivers/ilo/ilo_state.c index 3210bb4bf33..ba0efdd09ce 100644 --- a/src/gallium/drivers/ilo/ilo_state.c +++ b/src/gallium/drivers/ilo/ilo_state.c @@ -952,7 +952,11 @@ ilo_create_surface(struct pipe_context *pipe, else { assert(res->target != PIPE_BUFFER); - /* will construct dynamically */ + ilo_gpe_init_zs_surface(ilo->dev, ilo_texture(res), + templ->format, templ->u.tex.level, + templ->u.tex.first_layer, + templ->u.tex.last_layer - templ->u.tex.first_layer + 1, + &surf->u.zs); } return &surf->base; @@ -1133,6 +1137,9 @@ ilo_init_states(struct ilo_context *ilo) { ilo_gpe_set_scissor_null(ilo->dev, &ilo->scissor); + ilo_gpe_init_zs_surface(ilo->dev, NULL, + PIPE_FORMAT_NONE, 0, 0, 1, &ilo->fb.null_zs); + ilo->dirty = ILO_DIRTY_ALL; } |