diff options
author | Chia-I Wu <[email protected]> | 2013-08-08 13:43:57 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-08-08 13:46:01 +0800 |
commit | f9a4288bd282dfab97a40fc6dc9c046812e7d681 (patch) | |
tree | 3e12e3a048e9807add097c64a135a6ed803252c7 /src/gallium/drivers/ilo/ilo_gpe_gen7.c | |
parent | 19204081ce7edce1d9847d3826f355fde65d4783 (diff) |
ilo: get rid of GPE tables completely
Move the estimate functions out of the tables and kill the tables.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_gpe_gen7.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_gpe_gen7.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen7.c b/src/gallium/drivers/ilo/ilo_gpe_gen7.c index 54846ec5787..f6cc6e92710 100644 --- a/src/gallium/drivers/ilo/ilo_gpe_gen7.c +++ b/src/gallium/drivers/ilo/ilo_gpe_gen7.c @@ -650,10 +650,10 @@ ilo_gpe_init_view_surface_for_texture_gen7(const struct ilo_dev_info *dev, surf->bo = tex->bo; } -static int -gen7_estimate_command_size(const struct ilo_dev_info *dev, - enum ilo_gpe_gen7_command cmd, - int arg) +int +ilo_gpe_gen7_estimate_command_size(const struct ilo_dev_info *dev, + enum ilo_gpe_gen7_command cmd, + int arg) { static const struct { int header; @@ -738,10 +738,10 @@ gen7_estimate_command_size(const struct ilo_dev_info *dev, return (likely(count)) ? header + body * count : 0; } -static int -gen7_estimate_state_size(const struct ilo_dev_info *dev, - enum ilo_gpe_gen7_state state, - int arg) +int +ilo_gpe_gen7_estimate_state_size(const struct ilo_dev_info *dev, + enum ilo_gpe_gen7_state state, + int arg) { static const struct { int alignment; @@ -787,21 +787,3 @@ gen7_estimate_state_size(const struct ilo_dev_info *dev, return estimate; } - -static void -gen7_init(struct ilo_gpe_gen7 *gen7) -{ - gen7->estimate_command_size = gen7_estimate_command_size; - gen7->estimate_state_size = gen7_estimate_state_size; -} - -static struct ilo_gpe_gen7 gen7_gpe; - -const struct ilo_gpe_gen7 * -ilo_gpe_gen7_get(void) -{ - if (!gen7_gpe.estimate_command_size) - gen7_init(&gen7_gpe); - - return &gen7_gpe; -} |