summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/ilo/ilo_gpe_gen7.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_gpe_gen7.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_gpe_gen7.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen7.c b/src/gallium/drivers/ilo/ilo_gpe_gen7.c
index e6c1556e3e2..6d3397f2d62 100644
--- a/src/gallium/drivers/ilo/ilo_gpe_gen7.c
+++ b/src/gallium/drivers/ilo/ilo_gpe_gen7.c
@@ -670,53 +670,3 @@ ilo_gpe_init_view_surface_for_texture_gen7(const struct ilo_dev_info *dev,
/* do not increment reference count */
surf->bo = tex->bo;
}
-
-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;
- int body;
- bool is_array;
- } gen7_state_size_table[ILO_GPE_GEN7_STATE_COUNT] = {
- [ILO_GPE_GEN7_INTERFACE_DESCRIPTOR_DATA] = { 8, 8, true },
- [ILO_GPE_GEN7_SF_CLIP_VIEWPORT] = { 16, 16, true },
- [ILO_GPE_GEN7_CC_VIEWPORT] = { 8, 2, true },
- [ILO_GPE_GEN7_COLOR_CALC_STATE] = { 16, 6, false },
- [ILO_GPE_GEN7_BLEND_STATE] = { 16, 2, true },
- [ILO_GPE_GEN7_DEPTH_STENCIL_STATE] = { 16, 3, false },
- [ILO_GPE_GEN7_SCISSOR_RECT] = { 8, 2, true },
- [ILO_GPE_GEN7_BINDING_TABLE_STATE] = { 8, 1, true },
- [ILO_GPE_GEN7_SURFACE_STATE] = { 8, 8, false },
- [ILO_GPE_GEN7_SAMPLER_STATE] = { 8, 4, true },
- [ILO_GPE_GEN7_SAMPLER_BORDER_COLOR_STATE] = { 8, 4, false },
- [ILO_GPE_GEN7_PUSH_CONSTANT_BUFFER] = { 8, 1, true },
- };
- const int alignment = gen7_state_size_table[state].alignment;
- const int body = gen7_state_size_table[state].body;
- const bool is_array = gen7_state_size_table[state].is_array;
- const int count = arg;
- int estimate;
-
- ILO_GPE_VALID_GEN(dev, 7, 7.5);
- assert(state < ILO_GPE_GEN7_STATE_COUNT);
-
- if (likely(count)) {
- if (is_array) {
- estimate = (alignment - 1) + body * count;
- }
- else {
- estimate = (alignment - 1) + body;
- /* all states are aligned */
- if (count > 1)
- estimate += util_align_npot(body, alignment) * (count - 1);
- }
- }
- else {
- estimate = 0;
- }
-
- return estimate;
-}