summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_render_gen7.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-09-30 10:32:53 +0800
committerChia-I Wu <[email protected]>2014-09-30 16:41:32 +0800
commit2d13b5ac81a8c2aa1f36be7e3350b12fbdbd65e8 (patch)
tree4aae00663c4bdb2fd84bf1f11389665620844a22 /src/gallium/drivers/ilo/ilo_render_gen7.c
parent2b4c8ffc30c097cb89b2e76e64a764eb258d5491 (diff)
ilo: add a pass to finalize ilo_ve_state
Add finalize_vertex_elements() to finalize ilo_ve_state. This fixes a potential issue with URB entry allocation for VS and move the complexity of gen6_3DSTATE_VERTEX_ELEMENTS() to the new function. Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_render_gen7.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_render_gen7.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/ilo/ilo_render_gen7.c b/src/gallium/drivers/ilo/ilo_render_gen7.c
index 373f800e071..9aefc6fa446 100644
--- a/src/gallium/drivers/ilo/ilo_render_gen7.c
+++ b/src/gallium/drivers/ilo/ilo_render_gen7.c
@@ -245,8 +245,8 @@ gen7_draw_common_urb(struct ilo_render *r,
* Allocation Size must be sized to the maximum of the vertex input
* and output structures."
*/
- if (vs_entry_size < vec->ve->count)
- vs_entry_size = vec->ve->count;
+ if (vs_entry_size < vec->ve->count + vec->ve->prepend_nosrc_cso)
+ vs_entry_size = vec->ve->count + vec->ve->prepend_nosrc_cso;
vs_entry_size *= sizeof(float) * 4;
vs_total_size = r->dev->urb_size - offset;
@@ -716,7 +716,8 @@ gen7_rectlist_urb(struct ilo_render *r,
(ilo_dev_gen(r->dev) == ILO_GEN(7.5) && r->dev->gt == 3) ? 32768 : 16384;
gen7_3DSTATE_URB_VS(r->builder, offset, r->dev->urb_size - offset,
- blitter->ve.count * 4 * sizeof(float));
+ (blitter->ve.count + blitter->ve.prepend_nosrc_cso) *
+ 4 * sizeof(float));
gen7_3DSTATE_URB_GS(r->builder, offset, 0, 0);
gen7_3DSTATE_URB_HS(r->builder, offset, 0, 0);
@@ -839,8 +840,7 @@ ilo_render_emit_rectlist_commands_gen7(struct ilo_render *r,
session->vb_start, session->vb_end,
sizeof(blitter->vertices[0]));
- gen6_3DSTATE_VERTEX_ELEMENTS(r->builder,
- &blitter->ve, false, false);
+ gen6_3DSTATE_VERTEX_ELEMENTS(r->builder, &blitter->ve);
gen7_rectlist_pcb_alloc(r, blitter);