summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-04-10 02:45:23 +0800
committerChia-I Wu <[email protected]>2014-04-14 20:45:04 +0800
commit8fa8e9b1b8cd4b36adaaf7d61785cb00ed086257 (patch)
treea97207d12ee3e131066d824019897bfe668128db /src/gallium/drivers/ilo
parentbdd0546d7c2d82ce1f1870481a9d0291db345aa4 (diff)
ilo: remove GPE command size estimation
Use size defines from genhw.
Diffstat (limited to 'src/gallium/drivers/ilo')
-rw-r--r--src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c96
-rw-r--r--src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c92
-rw-r--r--src/gallium/drivers/ilo/ilo_gpe_gen6.c65
-rw-r--r--src/gallium/drivers/ilo/ilo_gpe_gen6.h58
-rw-r--r--src/gallium/drivers/ilo/ilo_gpe_gen7.c93
-rw-r--r--src/gallium/drivers/ilo/ilo_gpe_gen7.h86
6 files changed, 87 insertions, 403 deletions
diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c
index bba35bc758e..cd64b1b0e5c 100644
--- a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c
+++ b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c
@@ -1743,49 +1743,43 @@ gen6_pipeline_estimate_commands(const struct ilo_3d_pipeline *p,
const struct ilo_context *ilo)
{
static int size;
- enum ilo_gpe_gen6_command cmd;
-
- if (size)
- return size;
-
- for (cmd = 0; cmd < ILO_GPE_GEN6_COMMAND_COUNT; cmd++) {
- int count;
-
- switch (cmd) {
- case ILO_GPE_GEN6_PIPE_CONTROL:
- /* for the workaround */
- count = 2;
- /* another one after 3DSTATE_URB */
- count += 1;
- /* and another one after 3DSTATE_CONSTANT_VS */
- count += 1;
- break;
- case ILO_GPE_GEN6_3DSTATE_GS_SVB_INDEX:
- /* there are 4 SVBIs */
- count = 4;
- break;
- case ILO_GPE_GEN6_3DSTATE_VERTEX_BUFFERS:
- count = 33;
- break;
- case ILO_GPE_GEN6_3DSTATE_VERTEX_ELEMENTS:
- count = 34;
- break;
- case ILO_GPE_GEN6_MEDIA_VFE_STATE:
- case ILO_GPE_GEN6_MEDIA_CURBE_LOAD:
- case ILO_GPE_GEN6_MEDIA_INTERFACE_DESCRIPTOR_LOAD:
- case ILO_GPE_GEN6_MEDIA_GATEWAY_STATE:
- case ILO_GPE_GEN6_MEDIA_STATE_FLUSH:
- case ILO_GPE_GEN6_MEDIA_OBJECT_WALKER:
- /* media commands */
- count = 0;
- break;
- default:
- count = 1;
- break;
- }
- if (count)
- size += ilo_gpe_gen6_estimate_command_size(p->dev, cmd, count);
+ if (!size) {
+ size += GEN6_3DSTATE_CONSTANT_ANY__SIZE * 3;
+ size += GEN6_3DSTATE_GS_SVB_INDEX__SIZE * 4;
+ size += GEN6_PIPE_CONTROL__SIZE * 5;
+
+ size +=
+ GEN6_STATE_BASE_ADDRESS__SIZE +
+ GEN6_STATE_SIP__SIZE +
+ GEN6_3DSTATE_VF_STATISTICS__SIZE +
+ GEN6_PIPELINE_SELECT__SIZE +
+ GEN6_3DSTATE_BINDING_TABLE_POINTERS__SIZE +
+ GEN6_3DSTATE_SAMPLER_STATE_POINTERS__SIZE +
+ GEN6_3DSTATE_URB__SIZE +
+ GEN6_3DSTATE_VERTEX_BUFFERS__SIZE +
+ GEN6_3DSTATE_VERTEX_ELEMENTS__SIZE +
+ GEN6_3DSTATE_INDEX_BUFFER__SIZE +
+ GEN6_3DSTATE_VIEWPORT_STATE_POINTERS__SIZE +
+ GEN6_3DSTATE_CC_STATE_POINTERS__SIZE +
+ GEN6_3DSTATE_SCISSOR_STATE_POINTERS__SIZE +
+ GEN6_3DSTATE_VS__SIZE +
+ GEN6_3DSTATE_GS__SIZE +
+ GEN6_3DSTATE_CLIP__SIZE +
+ GEN6_3DSTATE_SF__SIZE +
+ GEN6_3DSTATE_WM__SIZE +
+ GEN6_3DSTATE_SAMPLE_MASK__SIZE +
+ GEN6_3DSTATE_DRAWING_RECTANGLE__SIZE +
+ GEN6_3DSTATE_DEPTH_BUFFER__SIZE +
+ GEN6_3DSTATE_POLY_STIPPLE_OFFSET__SIZE +
+ GEN6_3DSTATE_POLY_STIPPLE_PATTERN__SIZE +
+ GEN6_3DSTATE_LINE_STIPPLE__SIZE +
+ GEN6_3DSTATE_AA_LINE_PARAMETERS__SIZE +
+ GEN6_3DSTATE_MULTISAMPLE__SIZE +
+ GEN6_3DSTATE_STENCIL_BUFFER__SIZE +
+ GEN6_3DSTATE_HIER_DEPTH_BUFFER__SIZE +
+ GEN6_3DSTATE_CLEAR_PARAMS__SIZE +
+ GEN6_3DPRIMITIVE__SIZE;
}
return size;
@@ -1911,28 +1905,22 @@ ilo_3d_pipeline_estimate_size_gen6(struct ilo_3d_pipeline *p,
}
break;
case ILO_3D_PIPELINE_FLUSH:
- size = ilo_gpe_gen6_estimate_command_size(p->dev,
- ILO_GPE_GEN6_PIPE_CONTROL, 1) * 3;
+ size = GEN6_PIPE_CONTROL__SIZE * 3;
break;
case ILO_3D_PIPELINE_WRITE_TIMESTAMP:
- size = ilo_gpe_gen6_estimate_command_size(p->dev,
- ILO_GPE_GEN6_PIPE_CONTROL, 1) * 2;
+ size = GEN6_PIPE_CONTROL__SIZE * 2;
break;
case ILO_3D_PIPELINE_WRITE_DEPTH_COUNT:
- size = ilo_gpe_gen6_estimate_command_size(p->dev,
- ILO_GPE_GEN6_PIPE_CONTROL, 1) * 3;
+ size = GEN6_PIPE_CONTROL__SIZE * 3;
break;
case ILO_3D_PIPELINE_WRITE_STATISTICS:
{
const int num_regs = 8;
const int num_pads = 3;
- size = ilo_gpe_gen6_estimate_command_size(p->dev,
- ILO_GPE_GEN6_PIPE_CONTROL, 1);
- size += ilo_gpe_gen6_estimate_command_size(p->dev,
- ILO_GPE_GEN6_MI_STORE_REGISTER_MEM, 1) * 2 * num_regs;
- size += ilo_gpe_gen6_estimate_command_size(p->dev,
- ILO_GPE_GEN6_MI_STORE_DATA_IMM, 1) * num_pads;
+ size = GEN6_PIPE_CONTROL__SIZE;
+ size += GEN6_MI_STORE_REGISTER_MEM__SIZE * 2 * num_regs;
+ size += GEN6_MI_STORE_DATA_IMM__SIZE * num_pads;
}
break;
case ILO_3D_PIPELINE_RECTLIST:
diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c
index e1be5e7ca47..a712a46f6bb 100644
--- a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c
+++ b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c
@@ -885,46 +885,48 @@ gen7_pipeline_estimate_commands(const struct ilo_3d_pipeline *p,
const struct ilo_context *ilo)
{
static int size;
- enum ilo_gpe_gen7_command cmd;
-
- if (size)
- return size;
-
- for (cmd = 0; cmd < ILO_GPE_GEN7_COMMAND_COUNT; cmd++) {
- int count;
-
- switch (cmd) {
- case ILO_GPE_GEN7_PIPE_CONTROL:
- /* for the workaround */
- count = 2;
- /* another one after 3DSTATE_URB */
- count += 1;
- /* and another one after 3DSTATE_CONSTANT_VS */
- count += 1;
- break;
- case ILO_GPE_GEN7_3DSTATE_VERTEX_BUFFERS:
- count = 33;
- break;
- case ILO_GPE_GEN7_3DSTATE_VERTEX_ELEMENTS:
- count = 34;
- break;
- case ILO_GPE_GEN7_MEDIA_VFE_STATE:
- case ILO_GPE_GEN7_MEDIA_CURBE_LOAD:
- case ILO_GPE_GEN7_MEDIA_INTERFACE_DESCRIPTOR_LOAD:
- case ILO_GPE_GEN7_MEDIA_STATE_FLUSH:
- case ILO_GPE_GEN7_GPGPU_WALKER:
- /* media commands */
- count = 0;
- break;
- default:
- count = 1;
- break;
- }
- if (count) {
- size += ilo_gpe_gen7_estimate_command_size(p->dev,
- cmd, count);
- }
+ if (!size) {
+ size += GEN7_3DSTATE_URB_ANY__SIZE * 4;
+ size += GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_ANY__SIZE * 5;
+ size += GEN6_3DSTATE_CONSTANT_ANY__SIZE * 5;
+ size += GEN7_3DSTATE_POINTERS_ANY__SIZE * (5 + 5 + 4);
+ size += GEN7_3DSTATE_SO_BUFFER__SIZE * 4;
+ size += GEN6_PIPE_CONTROL__SIZE * 5;
+
+ size +=
+ GEN6_STATE_BASE_ADDRESS__SIZE +
+ GEN6_STATE_SIP__SIZE +
+ GEN6_3DSTATE_VF_STATISTICS__SIZE +
+ GEN6_PIPELINE_SELECT__SIZE +
+ GEN6_3DSTATE_CLEAR_PARAMS__SIZE +
+ GEN6_3DSTATE_DEPTH_BUFFER__SIZE +
+ GEN6_3DSTATE_STENCIL_BUFFER__SIZE +
+ GEN6_3DSTATE_HIER_DEPTH_BUFFER__SIZE +
+ GEN6_3DSTATE_VERTEX_BUFFERS__SIZE +
+ GEN6_3DSTATE_VERTEX_ELEMENTS__SIZE +
+ GEN6_3DSTATE_INDEX_BUFFER__SIZE +
+ GEN75_3DSTATE_VF__SIZE +
+ GEN6_3DSTATE_VS__SIZE +
+ GEN6_3DSTATE_GS__SIZE +
+ GEN6_3DSTATE_CLIP__SIZE +
+ GEN6_3DSTATE_SF__SIZE +
+ GEN6_3DSTATE_WM__SIZE +
+ GEN6_3DSTATE_SAMPLE_MASK__SIZE +
+ GEN7_3DSTATE_HS__SIZE +
+ GEN7_3DSTATE_TE__SIZE +
+ GEN7_3DSTATE_DS__SIZE +
+ GEN7_3DSTATE_STREAMOUT__SIZE +
+ GEN7_3DSTATE_SBE__SIZE +
+ GEN7_3DSTATE_PS__SIZE +
+ GEN6_3DSTATE_DRAWING_RECTANGLE__SIZE +
+ GEN6_3DSTATE_POLY_STIPPLE_OFFSET__SIZE +
+ GEN6_3DSTATE_POLY_STIPPLE_PATTERN__SIZE +
+ GEN6_3DSTATE_LINE_STIPPLE__SIZE +
+ GEN6_3DSTATE_AA_LINE_PARAMETERS__SIZE +
+ GEN6_3DSTATE_MULTISAMPLE__SIZE +
+ GEN7_3DSTATE_SO_DECL_LIST__SIZE +
+ GEN6_3DPRIMITIVE__SIZE;
}
return size;
@@ -1036,20 +1038,16 @@ ilo_3d_pipeline_estimate_size_gen7(struct ilo_3d_pipeline *p,
case ILO_3D_PIPELINE_FLUSH:
case ILO_3D_PIPELINE_WRITE_TIMESTAMP:
case ILO_3D_PIPELINE_WRITE_DEPTH_COUNT:
- size = ilo_gpe_gen7_estimate_command_size(p->dev,
- ILO_GPE_GEN7_PIPE_CONTROL, 1);
+ size = GEN6_PIPE_CONTROL__SIZE;
break;
case ILO_3D_PIPELINE_WRITE_STATISTICS:
{
const int num_regs = 10;
const int num_pads = 1;
- size = ilo_gpe_gen7_estimate_command_size(p->dev,
- ILO_GPE_GEN7_PIPE_CONTROL, 1);
- size += ilo_gpe_gen7_estimate_command_size(p->dev,
- ILO_GPE_GEN7_MI_STORE_REGISTER_MEM, 1) * 2 * num_regs;
- size += ilo_gpe_gen7_estimate_command_size(p->dev,
- ILO_GPE_GEN7_MI_STORE_DATA_IMM, 1) * num_pads;
+ size = GEN6_PIPE_CONTROL__SIZE;
+ size += GEN6_MI_STORE_REGISTER_MEM__SIZE * 2 * num_regs;
+ size += GEN6_MI_STORE_DATA_IMM__SIZE * num_pads;
}
break;
case ILO_3D_PIPELINE_RECTLIST:
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen6.c b/src/gallium/drivers/ilo/ilo_gpe_gen6.c
index 9f416ed67f1..3e5ebfcb34c 100644
--- a/src/gallium/drivers/ilo/ilo_gpe_gen6.c
+++ b/src/gallium/drivers/ilo/ilo_gpe_gen6.c
@@ -2572,71 +2572,6 @@ ilo_gpe_set_fb(const struct ilo_dev_info *dev,
}
int
-ilo_gpe_gen6_estimate_command_size(const struct ilo_dev_info *dev,
- enum ilo_gpe_gen6_command cmd,
- int arg)
-{
- static const struct {
- int header;
- int body;
- } gen6_command_size_table[ILO_GPE_GEN6_COMMAND_COUNT] = {
- [ILO_GPE_GEN6_MI_STORE_DATA_IMM] = { 0, 5 },
- [ILO_GPE_GEN6_MI_LOAD_REGISTER_IMM] = { 0, 3 },
- [ILO_GPE_GEN6_MI_STORE_REGISTER_MEM] = { 0, 3 },
- [ILO_GPE_GEN6_MI_REPORT_PERF_COUNT] = { 0, 3 },
- [ILO_GPE_GEN6_STATE_BASE_ADDRESS] = { 0, 10 },
- [ILO_GPE_GEN6_STATE_SIP] = { 0, 2 },
- [ILO_GPE_GEN6_3DSTATE_VF_STATISTICS] = { 0, 1 },
- [ILO_GPE_GEN6_PIPELINE_SELECT] = { 0, 1 },
- [ILO_GPE_GEN6_MEDIA_VFE_STATE] = { 0, 8 },
- [ILO_GPE_GEN6_MEDIA_CURBE_LOAD] = { 0, 4 },
- [ILO_GPE_GEN6_MEDIA_INTERFACE_DESCRIPTOR_LOAD] = { 0, 4 },
- [ILO_GPE_GEN6_MEDIA_GATEWAY_STATE] = { 0, 2 },
- [ILO_GPE_GEN6_MEDIA_STATE_FLUSH] = { 0, 2 },
- [ILO_GPE_GEN6_MEDIA_OBJECT_WALKER] = { 17, 1 },
- [ILO_GPE_GEN6_3DSTATE_BINDING_TABLE_POINTERS] = { 0, 4 },
- [ILO_GPE_GEN6_3DSTATE_SAMPLER_STATE_POINTERS] = { 0, 4 },
- [ILO_GPE_GEN6_3DSTATE_URB] = { 0, 3 },
- [ILO_GPE_GEN6_3DSTATE_VERTEX_BUFFERS] = { 1, 4 },
- [ILO_GPE_GEN6_3DSTATE_VERTEX_ELEMENTS] = { 1, 2 },
- [ILO_GPE_GEN6_3DSTATE_INDEX_BUFFER] = { 0, 3 },
- [ILO_GPE_GEN6_3DSTATE_VIEWPORT_STATE_POINTERS] = { 0, 4 },
- [ILO_GPE_GEN6_3DSTATE_CC_STATE_POINTERS] = { 0, 4 },
- [ILO_GPE_GEN6_3DSTATE_SCISSOR_STATE_POINTERS] = { 0, 2 },
- [ILO_GPE_GEN6_3DSTATE_VS] = { 0, 6 },
- [ILO_GPE_GEN6_3DSTATE_GS] = { 0, 7 },
- [ILO_GPE_GEN6_3DSTATE_CLIP] = { 0, 4 },
- [ILO_GPE_GEN6_3DSTATE_SF] = { 0, 20 },
- [ILO_GPE_GEN6_3DSTATE_WM] = { 0, 9 },
- [ILO_GPE_GEN6_3DSTATE_CONSTANT_VS] = { 0, 5 },
- [ILO_GPE_GEN6_3DSTATE_CONSTANT_GS] = { 0, 5 },
- [ILO_GPE_GEN6_3DSTATE_CONSTANT_PS] = { 0, 5 },
- [ILO_GPE_GEN6_3DSTATE_SAMPLE_MASK] = { 0, 2 },
- [ILO_GPE_GEN6_3DSTATE_DRAWING_RECTANGLE] = { 0, 4 },
- [ILO_GPE_GEN6_3DSTATE_DEPTH_BUFFER] = { 0, 7 },
- [ILO_GPE_GEN6_3DSTATE_POLY_STIPPLE_OFFSET] = { 0, 2 },
- [ILO_GPE_GEN6_3DSTATE_POLY_STIPPLE_PATTERN] = { 0, 33 },
- [ILO_GPE_GEN6_3DSTATE_LINE_STIPPLE] = { 0, 3 },
- [ILO_GPE_GEN6_3DSTATE_AA_LINE_PARAMETERS] = { 0, 3 },
- [ILO_GPE_GEN6_3DSTATE_GS_SVB_INDEX] = { 0, 4 },
- [ILO_GPE_GEN6_3DSTATE_MULTISAMPLE] = { 0, 3 },
- [ILO_GPE_GEN6_3DSTATE_STENCIL_BUFFER] = { 0, 3 },
- [ILO_GPE_GEN6_3DSTATE_HIER_DEPTH_BUFFER] = { 0, 3 },
- [ILO_GPE_GEN6_3DSTATE_CLEAR_PARAMS] = { 0, 2 },
- [ILO_GPE_GEN6_PIPE_CONTROL] = { 0, 5 },
- [ILO_GPE_GEN6_3DPRIMITIVE] = { 0, 6 },
- };
- const int header = gen6_command_size_table[cmd].header;
- const int body = gen6_command_size_table[arg].body;
- const int count = arg;
-
- ILO_GPE_VALID_GEN(dev, 6, 6);
- assert(cmd < ILO_GPE_GEN6_COMMAND_COUNT);
-
- return (likely(count)) ? header + body * count : 0;
-}
-
-int
ilo_gpe_gen6_estimate_state_size(const struct ilo_dev_info *dev,
enum ilo_gpe_gen6_state state,
int arg)
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen6.h b/src/gallium/drivers/ilo/ilo_gpe_gen6.h
index c1aafd92f63..9652b609d24 100644
--- a/src/gallium/drivers/ilo/ilo_gpe_gen6.h
+++ b/src/gallium/drivers/ilo/ilo_gpe_gen6.h
@@ -47,59 +47,6 @@
(0x3 << 29 | (pipeline) << 27 | (op) << 24 | (subop) << 16)
/**
- * Commands that GEN6 GPE could emit.
- */
-enum ilo_gpe_gen6_command {
- ILO_GPE_GEN6_MI_STORE_DATA_IMM, /* ILO_GPE_MI(0x20) */
- ILO_GPE_GEN6_MI_LOAD_REGISTER_IMM, /* ILO_GPE_MI(0x22) */
- ILO_GPE_GEN6_MI_STORE_REGISTER_MEM, /* ILO_GPE_MI(0x24) */
- ILO_GPE_GEN6_MI_REPORT_PERF_COUNT, /* ILO_GPE_MI(0x28) */
- ILO_GPE_GEN6_STATE_BASE_ADDRESS, /* (0x0, 0x1, 0x01) */
- ILO_GPE_GEN6_STATE_SIP, /* (0x0, 0x1, 0x02) */
- ILO_GPE_GEN6_3DSTATE_VF_STATISTICS, /* (0x1, 0x0, 0x0b) */
- ILO_GPE_GEN6_PIPELINE_SELECT, /* (0x1, 0x1, 0x04) */
- ILO_GPE_GEN6_MEDIA_VFE_STATE, /* (0x2, 0x0, 0x00) */
- ILO_GPE_GEN6_MEDIA_CURBE_LOAD, /* (0x2, 0x0, 0x01) */
- ILO_GPE_GEN6_MEDIA_INTERFACE_DESCRIPTOR_LOAD, /* (0x2, 0x0, 0x02) */
- ILO_GPE_GEN6_MEDIA_GATEWAY_STATE, /* (0x2, 0x0, 0x03) */
- ILO_GPE_GEN6_MEDIA_STATE_FLUSH, /* (0x2, 0x0, 0x04) */
- ILO_GPE_GEN6_MEDIA_OBJECT_WALKER, /* (0x2, 0x1, 0x03) */
- ILO_GPE_GEN6_3DSTATE_BINDING_TABLE_POINTERS, /* (0x3, 0x0, 0x01) */
- ILO_GPE_GEN6_3DSTATE_SAMPLER_STATE_POINTERS, /* (0x3, 0x0, 0x02) */
- ILO_GPE_GEN6_3DSTATE_URB, /* (0x3, 0x0, 0x05) */
- ILO_GPE_GEN6_3DSTATE_VERTEX_BUFFERS, /* (0x3, 0x0, 0x08) */
- ILO_GPE_GEN6_3DSTATE_VERTEX_ELEMENTS, /* (0x3, 0x0, 0x09) */
- ILO_GPE_GEN6_3DSTATE_INDEX_BUFFER, /* (0x3, 0x0, 0x0a) */
- ILO_GPE_GEN6_3DSTATE_VIEWPORT_STATE_POINTERS, /* (0x3, 0x0, 0x0d) */
- ILO_GPE_GEN6_3DSTATE_CC_STATE_POINTERS, /* (0x3, 0x0, 0x0e) */
- ILO_GPE_GEN6_3DSTATE_SCISSOR_STATE_POINTERS, /* (0x3, 0x0, 0x0f) */
- ILO_GPE_GEN6_3DSTATE_VS, /* (0x3, 0x0, 0x10) */
- ILO_GPE_GEN6_3DSTATE_GS, /* (0x3, 0x0, 0x11) */
- ILO_GPE_GEN6_3DSTATE_CLIP, /* (0x3, 0x0, 0x12) */
- ILO_GPE_GEN6_3DSTATE_SF, /* (0x3, 0x0, 0x13) */
- ILO_GPE_GEN6_3DSTATE_WM, /* (0x3, 0x0, 0x14) */
- ILO_GPE_GEN6_3DSTATE_CONSTANT_VS, /* (0x3, 0x0, 0x15) */
- ILO_GPE_GEN6_3DSTATE_CONSTANT_GS, /* (0x3, 0x0, 0x16) */
- ILO_GPE_GEN6_3DSTATE_CONSTANT_PS, /* (0x3, 0x0, 0x17) */
- ILO_GPE_GEN6_3DSTATE_SAMPLE_MASK, /* (0x3, 0x0, 0x18) */
- ILO_GPE_GEN6_3DSTATE_DRAWING_RECTANGLE, /* (0x3, 0x1, 0x00) */
- ILO_GPE_GEN6_3DSTATE_DEPTH_BUFFER, /* (0x3, 0x1, 0x05) */
- ILO_GPE_GEN6_3DSTATE_POLY_STIPPLE_OFFSET, /* (0x3, 0x1, 0x06) */
- ILO_GPE_GEN6_3DSTATE_POLY_STIPPLE_PATTERN, /* (0x3, 0x1, 0x07) */
- ILO_GPE_GEN6_3DSTATE_LINE_STIPPLE, /* (0x3, 0x1, 0x08) */
- ILO_GPE_GEN6_3DSTATE_AA_LINE_PARAMETERS, /* (0x3, 0x1, 0x0a) */
- ILO_GPE_GEN6_3DSTATE_GS_SVB_INDEX, /* (0x3, 0x1, 0x0b) */
- ILO_GPE_GEN6_3DSTATE_MULTISAMPLE, /* (0x3, 0x1, 0x0d) */
- ILO_GPE_GEN6_3DSTATE_STENCIL_BUFFER, /* (0x3, 0x1, 0x0e) */
- ILO_GPE_GEN6_3DSTATE_HIER_DEPTH_BUFFER, /* (0x3, 0x1, 0x0f) */
- ILO_GPE_GEN6_3DSTATE_CLEAR_PARAMS, /* (0x3, 0x1, 0x10) */
- ILO_GPE_GEN6_PIPE_CONTROL, /* (0x3, 0x2, 0x00) */
- ILO_GPE_GEN6_3DPRIMITIVE, /* (0x3, 0x3, 0x00) */
-
- ILO_GPE_GEN6_COMMAND_COUNT,
-};
-
-/**
* Indirect states that GEN6 GPE could emit.
*/
enum ilo_gpe_gen6_state {
@@ -121,11 +68,6 @@ enum ilo_gpe_gen6_state {
};
int
-ilo_gpe_gen6_estimate_command_size(const struct ilo_dev_info *dev,
- enum ilo_gpe_gen6_command cmd,
- int arg);
-
-int
ilo_gpe_gen6_estimate_state_size(const struct ilo_dev_info *dev,
enum ilo_gpe_gen6_state state,
int arg);
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen7.c b/src/gallium/drivers/ilo/ilo_gpe_gen7.c
index fea600a1c3f..e6c1556e3e2 100644
--- a/src/gallium/drivers/ilo/ilo_gpe_gen7.c
+++ b/src/gallium/drivers/ilo/ilo_gpe_gen7.c
@@ -672,99 +672,6 @@ ilo_gpe_init_view_surface_for_texture_gen7(const struct ilo_dev_info *dev,
}
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;
- int body;
- } gen7_command_size_table[ILO_GPE_GEN7_COMMAND_COUNT] = {
- [ILO_GPE_GEN7_MI_STORE_DATA_IMM] = { 0, 5 },
- [ILO_GPE_GEN7_MI_LOAD_REGISTER_IMM] = { 0, 3 },
- [ILO_GPE_GEN7_MI_STORE_REGISTER_MEM] = { 0, 3 },
- [ILO_GPE_GEN7_MI_REPORT_PERF_COUNT] = { 0, 3 },
- [ILO_GPE_GEN7_STATE_BASE_ADDRESS] = { 0, 10 },
- [ILO_GPE_GEN7_STATE_SIP] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_VF_STATISTICS] = { 0, 1 },
- [ILO_GPE_GEN7_PIPELINE_SELECT] = { 0, 1 },
- [ILO_GPE_GEN7_MEDIA_VFE_STATE] = { 0, 8 },
- [ILO_GPE_GEN7_MEDIA_CURBE_LOAD] = { 0, 4 },
- [ILO_GPE_GEN7_MEDIA_INTERFACE_DESCRIPTOR_LOAD] = { 0, 4 },
- [ILO_GPE_GEN7_MEDIA_STATE_FLUSH] = { 0, 2 },
- [ILO_GPE_GEN7_GPGPU_WALKER] = { 0, 11 },
- [ILO_GPE_GEN7_3DSTATE_CLEAR_PARAMS] = { 0, 3 },
- [ILO_GPE_GEN7_3DSTATE_DEPTH_BUFFER] = { 0, 7 },
- [ILO_GPE_GEN7_3DSTATE_STENCIL_BUFFER] = { 0, 3 },
- [ILO_GPE_GEN7_3DSTATE_HIER_DEPTH_BUFFER] = { 0, 3 },
- [ILO_GPE_GEN7_3DSTATE_VERTEX_BUFFERS] = { 1, 4 },
- [ILO_GPE_GEN7_3DSTATE_VERTEX_ELEMENTS] = { 1, 2 },
- [ILO_GPE_GEN7_3DSTATE_INDEX_BUFFER] = { 0, 3 },
- [ILO_GPE_GEN7_3DSTATE_VF] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_CC_STATE_POINTERS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_SCISSOR_STATE_POINTERS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_VS] = { 0, 6 },
- [ILO_GPE_GEN7_3DSTATE_GS] = { 0, 7 },
- [ILO_GPE_GEN7_3DSTATE_CLIP] = { 0, 4 },
- [ILO_GPE_GEN7_3DSTATE_SF] = { 0, 7 },
- [ILO_GPE_GEN7_3DSTATE_WM] = { 0, 3 },
- [ILO_GPE_GEN7_3DSTATE_CONSTANT_VS] = { 0, 7 },
- [ILO_GPE_GEN7_3DSTATE_CONSTANT_GS] = { 0, 7 },
- [ILO_GPE_GEN7_3DSTATE_CONSTANT_PS] = { 0, 7 },
- [ILO_GPE_GEN7_3DSTATE_SAMPLE_MASK] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_CONSTANT_HS] = { 0, 7 },
- [ILO_GPE_GEN7_3DSTATE_CONSTANT_DS] = { 0, 7 },
- [ILO_GPE_GEN7_3DSTATE_HS] = { 0, 7 },
- [ILO_GPE_GEN7_3DSTATE_TE] = { 0, 4 },
- [ILO_GPE_GEN7_3DSTATE_DS] = { 0, 6 },
- [ILO_GPE_GEN7_3DSTATE_STREAMOUT] = { 0, 3 },
- [ILO_GPE_GEN7_3DSTATE_SBE] = { 0, 14 },
- [ILO_GPE_GEN7_3DSTATE_PS] = { 0, 8 },
- [ILO_GPE_GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_BLEND_STATE_POINTERS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_BINDING_TABLE_POINTERS_GS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_URB_VS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_URB_HS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_URB_DS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_URB_GS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_DRAWING_RECTANGLE] = { 0, 4 },
- [ILO_GPE_GEN7_3DSTATE_POLY_STIPPLE_OFFSET] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_POLY_STIPPLE_PATTERN] = { 0, 33, },
- [ILO_GPE_GEN7_3DSTATE_LINE_STIPPLE] = { 0, 3 },
- [ILO_GPE_GEN7_3DSTATE_AA_LINE_PARAMETERS] = { 0, 3 },
- [ILO_GPE_GEN7_3DSTATE_MULTISAMPLE] = { 0, 4 },
- [ILO_GPE_GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS] = { 0, 2 },
- [ILO_GPE_GEN7_3DSTATE_SO_DECL_LIST] = { 3, 2 },
- [ILO_GPE_GEN7_3DSTATE_SO_BUFFER] = { 0, 4 },
- [ILO_GPE_GEN7_PIPE_CONTROL] = { 0, 5 },
- [ILO_GPE_GEN7_3DPRIMITIVE] = { 0, 7 },
- };
- const int header = gen7_command_size_table[cmd].header;
- const int body = gen7_command_size_table[cmd].body;
- const int count = arg;
-
- ILO_GPE_VALID_GEN(dev, 7, 7.5);
- assert(cmd < ILO_GPE_GEN7_COMMAND_COUNT);
-
- return (likely(count)) ? header + body * count : 0;
-}
-
-int
ilo_gpe_gen7_estimate_state_size(const struct ilo_dev_info *dev,
enum ilo_gpe_gen7_state state,
int arg)
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen7.h b/src/gallium/drivers/ilo/ilo_gpe_gen7.h
index 2bb2fef3104..097852090d8 100644
--- a/src/gallium/drivers/ilo/ilo_gpe_gen7.h
+++ b/src/gallium/drivers/ilo/ilo_gpe_gen7.h
@@ -37,87 +37,6 @@
#include "ilo_gpe_gen6.h"
/**
- * Commands that GEN7 GPE could emit.
- */
-enum ilo_gpe_gen7_command {
- ILO_GPE_GEN7_MI_STORE_DATA_IMM, /* ILO_GPE_MI(0x20) */
- ILO_GPE_GEN7_MI_LOAD_REGISTER_IMM, /* ILO_GPE_MI(0x22) */
- ILO_GPE_GEN7_MI_STORE_REGISTER_MEM, /* ILO_GPE_MI(0x24) */
- ILO_GPE_GEN7_MI_REPORT_PERF_COUNT, /* ILO_GPE_MI(0x28) */
- ILO_GPE_GEN7_STATE_BASE_ADDRESS, /* (0x0, 0x1, 0x01) */
- ILO_GPE_GEN7_STATE_SIP, /* (0x0, 0x1, 0x02) */
- ILO_GPE_GEN7_3DSTATE_VF_STATISTICS, /* (0x1, 0x0, 0x0b) */
- ILO_GPE_GEN7_PIPELINE_SELECT, /* (0x1, 0x1, 0x04) */
- ILO_GPE_GEN7_MEDIA_VFE_STATE, /* (0x2, 0x0, 0x00) */
- ILO_GPE_GEN7_MEDIA_CURBE_LOAD, /* (0x2, 0x0, 0x01) */
- ILO_GPE_GEN7_MEDIA_INTERFACE_DESCRIPTOR_LOAD, /* (0x2, 0x0, 0x02) */
- ILO_GPE_GEN7_MEDIA_STATE_FLUSH, /* (0x2, 0x0, 0x04) */
- ILO_GPE_GEN7_GPGPU_WALKER, /* (0x2, 0x1, 0x05) */
- ILO_GPE_GEN7_3DSTATE_CLEAR_PARAMS, /* (0x3, 0x0, 0x04) */
- ILO_GPE_GEN7_3DSTATE_DEPTH_BUFFER, /* (0x3, 0x0, 0x05) */
- ILO_GPE_GEN7_3DSTATE_STENCIL_BUFFER, /* (0x3, 0x0, 0x06) */
- ILO_GPE_GEN7_3DSTATE_HIER_DEPTH_BUFFER, /* (0x3, 0x0, 0x07) */
- ILO_GPE_GEN7_3DSTATE_VERTEX_BUFFERS, /* (0x3, 0x0, 0x08) */
- ILO_GPE_GEN7_3DSTATE_VERTEX_ELEMENTS, /* (0x3, 0x0, 0x09) */
- ILO_GPE_GEN7_3DSTATE_INDEX_BUFFER, /* (0x3, 0x0, 0x0a) */
- ILO_GPE_GEN7_3DSTATE_VF, /* (0x3, 0x0, 0x0c) */
- ILO_GPE_GEN7_3DSTATE_CC_STATE_POINTERS, /* (0x3, 0x0, 0x0e) */
- ILO_GPE_GEN7_3DSTATE_SCISSOR_STATE_POINTERS, /* (0x3, 0x0, 0x0f) */
- ILO_GPE_GEN7_3DSTATE_VS, /* (0x3, 0x0, 0x10) */
- ILO_GPE_GEN7_3DSTATE_GS, /* (0x3, 0x0, 0x11) */
- ILO_GPE_GEN7_3DSTATE_CLIP, /* (0x3, 0x0, 0x12) */
- ILO_GPE_GEN7_3DSTATE_SF, /* (0x3, 0x0, 0x13) */
- ILO_GPE_GEN7_3DSTATE_WM, /* (0x3, 0x0, 0x14) */
- ILO_GPE_GEN7_3DSTATE_CONSTANT_VS, /* (0x3, 0x0, 0x15) */
- ILO_GPE_GEN7_3DSTATE_CONSTANT_GS, /* (0x3, 0x0, 0x16) */
- ILO_GPE_GEN7_3DSTATE_CONSTANT_PS, /* (0x3, 0x0, 0x17) */
- ILO_GPE_GEN7_3DSTATE_SAMPLE_MASK, /* (0x3, 0x0, 0x18) */
- ILO_GPE_GEN7_3DSTATE_CONSTANT_HS, /* (0x3, 0x0, 0x19) */
- ILO_GPE_GEN7_3DSTATE_CONSTANT_DS, /* (0x3, 0x0, 0x1a) */
- ILO_GPE_GEN7_3DSTATE_HS, /* (0x3, 0x0, 0x1b) */
- ILO_GPE_GEN7_3DSTATE_TE, /* (0x3, 0x0, 0x1c) */
- ILO_GPE_GEN7_3DSTATE_DS, /* (0x3, 0x0, 0x1d) */
- ILO_GPE_GEN7_3DSTATE_STREAMOUT, /* (0x3, 0x0, 0x1e) */
- ILO_GPE_GEN7_3DSTATE_SBE, /* (0x3, 0x0, 0x1f) */
- ILO_GPE_GEN7_3DSTATE_PS, /* (0x3, 0x0, 0x20) */
- ILO_GPE_GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP, /* (0x3, 0x0, 0x21) */
- ILO_GPE_GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC, /* (0x3, 0x0, 0x23) */
- ILO_GPE_GEN7_3DSTATE_BLEND_STATE_POINTERS, /* (0x3, 0x0, 0x24) */
- ILO_GPE_GEN7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS, /* (0x3, 0x0, 0x25) */
- ILO_GPE_GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS, /* (0x3, 0x0, 0x26) */
- ILO_GPE_GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS, /* (0x3, 0x0, 0x27) */
- ILO_GPE_GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS, /* (0x3, 0x0, 0x28) */
- ILO_GPE_GEN7_3DSTATE_BINDING_TABLE_POINTERS_GS, /* (0x3, 0x0, 0x29) */
- ILO_GPE_GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS, /* (0x3, 0x0, 0x2a) */
- ILO_GPE_GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS, /* (0x3, 0x0, 0x2b) */
- ILO_GPE_GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS, /* (0x3, 0x0, 0x2c) */
- ILO_GPE_GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS, /* (0x3, 0x0, 0x2d) */
- ILO_GPE_GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS, /* (0x3, 0x0, 0x2e) */
- ILO_GPE_GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS, /* (0x3, 0x0, 0x2f) */
- ILO_GPE_GEN7_3DSTATE_URB_VS, /* (0x3, 0x0, 0x30) */
- ILO_GPE_GEN7_3DSTATE_URB_HS, /* (0x3, 0x0, 0x31) */
- ILO_GPE_GEN7_3DSTATE_URB_DS, /* (0x3, 0x0, 0x32) */
- ILO_GPE_GEN7_3DSTATE_URB_GS, /* (0x3, 0x0, 0x33) */
- ILO_GPE_GEN7_3DSTATE_DRAWING_RECTANGLE, /* (0x3, 0x1, 0x00) */
- ILO_GPE_GEN7_3DSTATE_POLY_STIPPLE_OFFSET, /* (0x3, 0x1, 0x06) */
- ILO_GPE_GEN7_3DSTATE_POLY_STIPPLE_PATTERN, /* (0x3, 0x1, 0x07) */
- ILO_GPE_GEN7_3DSTATE_LINE_STIPPLE, /* (0x3, 0x1, 0x08) */
- ILO_GPE_GEN7_3DSTATE_AA_LINE_PARAMETERS, /* (0x3, 0x1, 0x0a) */
- ILO_GPE_GEN7_3DSTATE_MULTISAMPLE, /* (0x3, 0x1, 0x0d) */
- ILO_GPE_GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS, /* (0x3, 0x1, 0x12) */
- ILO_GPE_GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS, /* (0x3, 0x1, 0x13) */
- ILO_GPE_GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS, /* (0x3, 0x1, 0x14) */
- ILO_GPE_GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS, /* (0x3, 0x1, 0x15) */
- ILO_GPE_GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS, /* (0x3, 0x1, 0x16) */
- ILO_GPE_GEN7_3DSTATE_SO_DECL_LIST, /* (0x3, 0x1, 0x17) */
- ILO_GPE_GEN7_3DSTATE_SO_BUFFER, /* (0x3, 0x1, 0x18) */
- ILO_GPE_GEN7_PIPE_CONTROL, /* (0x3, 0x2, 0x00) */
- ILO_GPE_GEN7_3DPRIMITIVE, /* (0x3, 0x3, 0x00) */
-
- ILO_GPE_GEN7_COMMAND_COUNT,
-};
-
-/**
* Indirect states that GEN7 GPE could emit.
*/
enum ilo_gpe_gen7_state {
@@ -138,11 +57,6 @@ enum ilo_gpe_gen7_state {
};
int
-ilo_gpe_gen7_estimate_command_size(const struct ilo_dev_info *dev,
- enum ilo_gpe_gen7_command cmd,
- int arg);
-
-int
ilo_gpe_gen7_estimate_state_size(const struct ilo_dev_info *dev,
enum ilo_gpe_gen7_state state,
int arg);