diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2014-09-20 00:46:35 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2014-09-20 10:13:53 +0800 |
commit | 6c0de4b979520583c1033794380b1c2e6785064e (patch) | |
tree | ac8437e1ab0654ad92b39fd152248a2e7ce05db3 /src/gallium/drivers/ilo/ilo_blit.h | |
parent | 284d767be0589143d5c20fdf1f3b52cadf2663f6 (diff) | |
download | external_mesa3d-6c0de4b979520583c1033794380b1c2e6785064e.zip external_mesa3d-6c0de4b979520583c1033794380b1c2e6785064e.tar.gz external_mesa3d-6c0de4b979520583c1033794380b1c2e6785064e.tar.bz2 |
ilo: add a new struct for context states
Move pipe states in ilo_context to the new ilo_state_vector. The motivation
is that ilo_context consists of several loosely related things. When we need
an ilo_context somewhere, we usually need only one or two of the things in it.
This change makes ilo_state_vector one such thing.
An immediate result is that we no longer need ilo_context in 3D pipelines,
something we have planned for since early days.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_blit.h')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_blit.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/drivers/ilo/ilo_blit.h b/src/gallium/drivers/ilo/ilo_blit.h index fe228f8..fed8776 100644 --- a/src/gallium/drivers/ilo/ilo_blit.h +++ b/src/gallium/drivers/ilo/ilo_blit.h @@ -33,8 +33,6 @@ #include "ilo_state.h" #include "ilo_resource.h" -struct ilo_context; - void ilo_blit_resolve_slices_for_hiz(struct ilo_context *ilo, struct pipe_resource *res, unsigned level, @@ -157,14 +155,15 @@ ilo_blit_resolve_view(struct ilo_context *ilo, static inline void ilo_blit_resolve_framebuffer(struct ilo_context *ilo) { - const struct pipe_framebuffer_state *fb = &ilo->fb.state; + struct ilo_state_vector *vec = &ilo->state_vector; + const struct pipe_framebuffer_state *fb = &vec->fb.state; unsigned sh, i; /* Not all bound views are sampled by the shaders. How do we tell? */ - for (sh = 0; sh < Elements(ilo->view); sh++) { - for (i = 0; i < ilo->view[sh].count; i++) { - if (ilo->view[sh].states[i]) - ilo_blit_resolve_view(ilo, ilo->view[sh].states[i]); + for (sh = 0; sh < Elements(vec->view); sh++) { + for (i = 0; i < vec->view[sh].count; i++) { + if (vec->view[sh].states[i]) + ilo_blit_resolve_view(ilo, vec->view[sh].states[i]); } } |