From 295a3a3ff0c93ac81b73d756e2148cde5f42caf3 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 22 Sep 2014 11:41:53 +0800 Subject: [PATCH] ilo: create the pipeline from the builder The pipeline needs just the builder to build commands. It does not need CP. --- src/gallium/drivers/ilo/ilo_3d.c | 2 +- src/gallium/drivers/ilo/ilo_3d_pipeline.c | 14 +++++--------- src/gallium/drivers/ilo/ilo_3d_pipeline.h | 4 +--- src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c | 1 - src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c | 1 - 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/gallium/drivers/ilo/ilo_3d.c b/src/gallium/drivers/ilo/ilo_3d.c index 291ff1c102c..3ac05ad45f7 100644 --- a/src/gallium/drivers/ilo/ilo_3d.c +++ b/src/gallium/drivers/ilo/ilo_3d.c @@ -334,7 +334,7 @@ ilo_3d_create(struct ilo_cp *cp, const struct ilo_dev_info *dev) list_inithead(&hw3d->queries); - hw3d->pipeline = ilo_3d_pipeline_create(cp, dev); + hw3d->pipeline = ilo_3d_pipeline_create(&cp->builder); if (!hw3d->pipeline) { FREE(hw3d); return NULL; diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline.c b/src/gallium/drivers/ilo/ilo_3d_pipeline.c index cf7ce0bd680..9cceb84e781 100644 --- a/src/gallium/drivers/ilo/ilo_3d_pipeline.c +++ b/src/gallium/drivers/ilo/ilo_3d_pipeline.c @@ -25,12 +25,9 @@ * Chia-I Wu */ -#include "util/u_prim.h" #include "intel_winsys.h" -#include "ilo_blitter.h" -#include "ilo_cp.h" -#include "ilo_state.h" +#include "ilo_builder.h" #include "ilo_3d_pipeline_gen6.h" #include "ilo_3d_pipeline_gen7.h" #include "ilo_3d_pipeline.h" @@ -64,7 +61,7 @@ static const struct sample_position sample_position_8x[8] = { }; struct ilo_3d_pipeline * -ilo_3d_pipeline_create(struct ilo_cp *cp, const struct ilo_dev_info *dev) +ilo_3d_pipeline_create(struct ilo_builder *builder) { struct ilo_3d_pipeline *p; int i; @@ -73,9 +70,8 @@ ilo_3d_pipeline_create(struct ilo_cp *cp, const struct ilo_dev_info *dev) if (!p) return NULL; - p->dev = dev; - p->cp = cp; - p->builder = &cp->builder; + p->dev = builder->dev; + p->builder = builder; switch (ilo_dev_gen(p->dev)) { case ILO_GEN(6): @@ -94,7 +90,7 @@ ilo_3d_pipeline_create(struct ilo_cp *cp, const struct ilo_dev_info *dev) p->invalidate_flags = ILO_3D_PIPELINE_INVALIDATE_ALL; - p->workaround_bo = intel_winsys_alloc_buffer(p->cp->winsys, + p->workaround_bo = intel_winsys_alloc_buffer(builder->winsys, "PIPE_CONTROL workaround", 4096, false); if (!p->workaround_bo) { ilo_warn("failed to allocate PIPE_CONTROL workaround bo\n"); diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline.h b/src/gallium/drivers/ilo/ilo_3d_pipeline.h index 8e074bcc4a0..c2ebb2fe224 100644 --- a/src/gallium/drivers/ilo/ilo_3d_pipeline.h +++ b/src/gallium/drivers/ilo/ilo_3d_pipeline.h @@ -58,8 +58,6 @@ enum ilo_3d_pipeline_action { */ struct ilo_3d_pipeline { const struct ilo_dev_info *dev; - - struct ilo_cp *cp; struct ilo_builder *builder; uint32_t invalidate_flags; @@ -136,7 +134,7 @@ struct ilo_3d_pipeline { }; struct ilo_3d_pipeline * -ilo_3d_pipeline_create(struct ilo_cp *cp, const struct ilo_dev_info *dev); +ilo_3d_pipeline_create(struct ilo_builder *builder); void ilo_3d_pipeline_destroy(struct ilo_3d_pipeline *pipeline); diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c index 856e9ecce38..c68e4f264eb 100644 --- a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c +++ b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c @@ -34,7 +34,6 @@ #include "ilo_builder_3d.h" #include "ilo_builder_mi.h" #include "ilo_builder_render.h" -#include "ilo_cp.h" #include "ilo_query.h" #include "ilo_shader.h" #include "ilo_state.h" diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c index 9db1cedf692..d94570e36b6 100644 --- a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c +++ b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c @@ -31,7 +31,6 @@ #include "ilo_blitter.h" #include "ilo_builder_3d.h" #include "ilo_builder_render.h" -#include "ilo_cp.h" #include "ilo_shader.h" #include "ilo_state.h" #include "ilo_3d_pipeline.h" -- 2.30.2