diff options
author | Chia-I Wu <[email protected]> | 2013-05-30 14:37:49 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-06-07 11:13:15 +0800 |
commit | e51806ee7ab52873c773619595962582c2abf0fe (patch) | |
tree | c0c7359110ed30791757179306646e8658890b7f /src/gallium/drivers/ilo/ilo_gpe.h | |
parent | 4228cf37467688dc4f6a10c8d2c42c6243f789e9 (diff) |
ilo: introduce viewport CSO
Introduce ilo_viewport_cso and initialize it in set_viewport_states(). This
saves us from having to perform CPU-intensive calculations to construct
hardware viewport states in draw_vbo().
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_gpe.h')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_gpe.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/gallium/drivers/ilo/ilo_gpe.h b/src/gallium/drivers/ilo/ilo_gpe.h index 903d654f051..044076b522c 100644 --- a/src/gallium/drivers/ilo/ilo_gpe.h +++ b/src/gallium/drivers/ilo/ilo_gpe.h @@ -75,9 +75,23 @@ struct ilo_so_state { bool enabled; }; +struct ilo_viewport_cso { + /* matrix form */ + float m00, m11, m22, m30, m31, m32; + + /* guardband in NDC space */ + float min_gbx, min_gby, max_gbx, max_gby; + + /* viewport in screen space */ + float min_x, min_y, min_z; + float max_x, max_y, max_z; +}; + struct ilo_viewport_state { - struct pipe_viewport_state states[ILO_MAX_VIEWPORTS]; + struct ilo_viewport_cso cso[ILO_MAX_VIEWPORTS]; unsigned count; + + struct pipe_viewport_state viewport0; }; struct ilo_scissor_state { @@ -144,4 +158,9 @@ struct ilo_global_binding { unsigned count; }; +void +ilo_gpe_set_viewport_cso(const struct ilo_dev_info *dev, + const struct pipe_viewport_state *state, + struct ilo_viewport_cso *vp); + #endif /* ILO_GPE_H */ |