diff options
author | Chia-I Wu <[email protected]> | 2013-05-31 11:52:47 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-06-07 11:13:15 +0800 |
commit | b3c9e2161f22c3c6b8b2fc83ea4bc7ea883329d7 (patch) | |
tree | 0d0a4a2ed95f136079966844681ce71c80ae23e2 /src/gallium/drivers/ilo/ilo_gpe.h | |
parent | 99725d2f8ae2e2d0dd1e80ac05b127c7f99778d3 (diff) |
ilo: introduce sampler CSO
Introduce ilo_sampler_cso and initialize it in create_sampler_state(). This
saves us from having to perform CPU-intensive calculations to construct
hardware sampler states in draw_vbo().
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_gpe.h')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_gpe.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/gallium/drivers/ilo/ilo_gpe.h b/src/gallium/drivers/ilo/ilo_gpe.h index 810a625730c..467a6b3a216 100644 --- a/src/gallium/drivers/ilo/ilo_gpe.h +++ b/src/gallium/drivers/ilo/ilo_gpe.h @@ -111,8 +111,24 @@ struct ilo_blend_state { struct pipe_blend_state state; }; +struct ilo_sampler_cso { + /* SAMPLER_STATE and SAMPLER_BORDER_COLOR_STATE */ + uint32_t payload[15]; + + uint32_t dw_filter; + uint32_t dw_filter_aniso; + uint32_t dw_wrap; + uint32_t dw_wrap_1d; + uint32_t dw_wrap_cube; + + bool anisotropic; + bool saturate_r; + bool saturate_s; + bool saturate_t; +}; + struct ilo_sampler_state { - struct pipe_sampler_state *states[ILO_MAX_SAMPLERS]; + const struct ilo_sampler_cso *cso[ILO_MAX_SAMPLERS]; unsigned count; }; @@ -175,4 +191,9 @@ void ilo_gpe_set_scissor_null(const struct ilo_dev_info *dev, struct ilo_scissor_state *scissor); +void +ilo_gpe_init_sampler_cso(const struct ilo_dev_info *dev, + const struct pipe_sampler_state *state, + struct ilo_sampler_cso *sampler); + #endif /* ILO_GPE_H */ |