diff options
author | Chia-I Wu <[email protected]> | 2013-06-03 15:34:13 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-06-07 11:13:16 +0800 |
commit | 4006f4ce265199b1ad8dfc9e8ca7fb5176a44527 (patch) | |
tree | 7d05b96a673719b1b5eb16dd27ac96d5d850b893 /src/gallium/drivers/ilo/ilo_gpe_gen6.c | |
parent | 5354dc742899c498a97fe6f64cc5d9237beb1e9f (diff) |
ilo: use emit_SURFACE_STATE() for render targets
Introduce ilo_surface_cso and initialize it in create_surface(). With the
change, we can emit SURFACE_STATE directly from the CSO and remove
emit_surf_SURFACE_STATE(). We do not deal with depth/stencil surfaces yet.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_gpe_gen6.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_gpe_gen6.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen6.c b/src/gallium/drivers/ilo/ilo_gpe_gen6.c index 082cb38a4fc..77a5cb6cabe 100644 --- a/src/gallium/drivers/ilo/ilo_gpe_gen6.c +++ b/src/gallium/drivers/ilo/ilo_gpe_gen6.c @@ -4187,36 +4187,6 @@ gen6_emit_SURFACE_STATE(const struct ilo_dev_info *dev, } static uint32_t -gen6_emit_surf_SURFACE_STATE(const struct ilo_dev_info *dev, - const struct pipe_surface *surface, - struct ilo_cp *cp) -{ - struct ilo_view_surface surf; - - ILO_GPE_VALID_GEN(dev, 6, 6); - - if (surface && surface->texture) { - struct ilo_texture *tex = ilo_texture(surface->texture); - - /* - * classic i965 sets render_cache_rw for constant buffers and sol - * surfaces but not render buffers. Why? - */ - ilo_gpe_init_view_surface_for_texture_gen6(dev, tex, surface->format, - surface->u.tex.level, 1, - surface->u.tex.first_layer, - surface->u.tex.last_layer - surface->u.tex.first_layer + 1, - true, true, &surf); - } - else { - ilo_gpe_init_view_surface_null_gen6(dev, - surface->width, surface->height, 1, 0, &surf); - } - - return gen6_emit_SURFACE_STATE(dev, &surf, true, cp); -} - -static uint32_t gen6_emit_so_SURFACE_STATE(const struct ilo_dev_info *dev, const struct pipe_stream_output_target *so, const struct pipe_stream_output_info *so_info, @@ -4942,7 +4912,6 @@ static const struct ilo_gpe_gen6 gen6_gpe = { GEN6_SET(SCISSOR_RECT), GEN6_SET(BINDING_TABLE_STATE), GEN6_SET(SURFACE_STATE), - GEN6_SET(surf_SURFACE_STATE), GEN6_SET(so_SURFACE_STATE), GEN6_SET(SAMPLER_STATE), GEN6_SET(SAMPLER_BORDER_COLOR_STATE), |