diff options
author | Chia-I Wu <[email protected]> | 2013-06-21 11:36:14 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-06-25 13:17:56 +0800 |
commit | 54ab03523bddd3b714baf455775d63941e2bf873 (patch) | |
tree | 0aba64239d760dc0500ab816d5a3b72887e7b245 /src/gallium/drivers/ilo/ilo_gpe.h | |
parent | 851202c319701c541d52f87ffa22505504c50d57 (diff) |
ilo: convert pipe_rasterizer_state to ilo_rasterizer_wm
Add ilo_gpe_init_rasterizer_wm() to construct fixed-function part of
3DSTATE_WM once in create_rasterizer_state().
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_gpe.h')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_gpe.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_gpe.h b/src/gallium/drivers/ilo/ilo_gpe.h index e9141f7c3af..f999aaf90ab 100644 --- a/src/gallium/drivers/ilo/ilo_gpe.h +++ b/src/gallium/drivers/ilo/ilo_gpe.h @@ -125,11 +125,19 @@ struct ilo_rasterizer_sf { uint32_t dw_msaa; }; +struct ilo_rasterizer_wm { + /* 3DSTATE_WM */ + uint32_t payload[2]; + uint32_t dw_msaa_rast; + uint32_t dw_msaa_disp; +}; + struct ilo_rasterizer_state { struct pipe_rasterizer_state state; struct ilo_rasterizer_clip clip; struct ilo_rasterizer_sf sf; + struct ilo_rasterizer_wm wm; }; struct ilo_dsa_state { @@ -291,6 +299,16 @@ ilo_gpe_init_rasterizer_sf(const struct ilo_dev_info *dev, const struct pipe_rasterizer_state *state, struct ilo_rasterizer_sf *sf); +void +ilo_gpe_init_rasterizer_wm_gen6(const struct ilo_dev_info *dev, + const struct pipe_rasterizer_state *state, + struct ilo_rasterizer_wm *wm); + +void +ilo_gpe_init_rasterizer_wm_gen7(const struct ilo_dev_info *dev, + const struct pipe_rasterizer_state *state, + struct ilo_rasterizer_wm *wm); + static inline void ilo_gpe_init_rasterizer(const struct ilo_dev_info *dev, const struct pipe_rasterizer_state *state, @@ -298,6 +316,11 @@ ilo_gpe_init_rasterizer(const struct ilo_dev_info *dev, { ilo_gpe_init_rasterizer_clip(dev, state, &rasterizer->clip); ilo_gpe_init_rasterizer_sf(dev, state, &rasterizer->sf); + + if (dev->gen >= ILO_GEN(7)) + ilo_gpe_init_rasterizer_wm_gen7(dev, state, &rasterizer->wm); + else + ilo_gpe_init_rasterizer_wm_gen6(dev, state, &rasterizer->wm); } void |